How can i get the ID or title of the current exprience in the page where is tested?

Avatar

Avatar

tut54841492

Avatar

tut54841492

tut54841492

03-06-2017

For example , I make Experiences A and Experiences B , and deploy on my site, now I want get the current experience name or id  with javascript , how should i do ?

thanks a lot !

View Entire Topic

Avatar

Avatar

ParitMittal

Avatar

ParitMittal

ParitMittal

04-06-2017

Hi ,

As suggested by Thomas, You can use the pass the below code in custom code section of each experience variation of the test to fetch the experience ID etc.

<script type="text/javascript">

var sCampaignName='${campaign.name}';

var sExperienceName = '${campaign.recipe.name}';

var scampId='${campaign.id}';

var sExpId=${campaign.recipe.id}'

alert("Your Campaign name is " + '${campaign.name}' + " :Your Experience name is "+ '${campaign.recipe.name}'+" :Your campaign Id is "+'${campaign.id}' +" :Your Experience ID is "+ '${campaign.recipe.id}' );

</script>

Regards

Parit Mittal