Hi Matthew,
I tried the code you mentioned in below, but I could not see the activity name or any details in Google Analytics
Although when I tried the variable mentioned in script in alert box it popped up.
For configuring following script I have added this into custom code of each experience using VEC & accordingly passed
GA account ID in each experience.
Can anybody tell what could be the issue & where to check the target experience details in google analytics ?
It will be very helpful if some one can provide some documentation.
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-#######-1']);
try {
if (typeof(s_tnt) == 'undefined') {
var s_tnt = '';
}
if (typeof(_gaq) == 'undefined') {
var _gaq = [];
}
s_tnt += '${campaign.id}:${campaign.recipe.id}:${campaign.recipe.trafficType},';
var sCampaignName = '${campaign.name}';
var sRecipeName = '${campaign.recipe.name}';
if (sCampaignName.length > 0 && sRecipeName.length > 0) {
_gaq.push(['_setCustomVar',1,'Target:' + sCampaignName,sRecipeName,1]);
_gaq.push(['_trackEvent','Adobe Target',sCampaignName,sRecipeName,undefined,true]);
}
}
catch(e){
console.log(e.message);
}
</script>
Thanks,
Ketan Pardeshi