- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
09-02-2019 04:36 AM
Team,
We are planning to track the "new or repeat" visitors through doPlugins function. We have made all the initial configuration and the necessary settings to track those visitors from the plug in. However, Still we don't see the right data on the respective variable (Conversion variable). We feel like that we are missing or making some information incorrectly. We are using Tealium IQ as our tag management system and have added the plug in code under the java script extension. Also, using "Adobe Analytics App Measurement for JS" as a tag.
Please check the below and assist me to get the "new or repeat" visitors as expected.
----------------------------------Actual Code on my JavaScript extension---------------------
//initialize AppMeasurement
var s_account="ageo1xxlonsamplepeeranalytics";
var s=s_gi(s_account);
/******** VISITOR ID SERVICE CONFIG - REQUIRES VisitorAPI.js ********/
s.visitor=Visitor.getInstance("INSERT-MCORG-ID-HERE");
/************************** CONFIG SECTION **************************/
/* You may add or alter any code config here. */
/* Link Tracking Config */
s.trackDownloadLinks=true;
s.trackExternalLinks=true;
s.trackInlineStats=true;
s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx";
s.linkInternalFilters="javascript:,tealiumecommerce.com"; //optional: add your internal domain here
s.linkLeaveQueryString=false;
s.linkTrackVars="None";
s.linkTrackEvents="None";
/*
* Plugin: getNewRepeat 1.2 - Returns whether user is new or repeat
*/
s.getNewRepeat=new Function("d","cn",""
+"var s=this,e=new Date(),cval,sval,ct=e.getTime();d=d?d:30;cn=cn?cn:"
+"'s_nr';e.setTime(ct+d*24*60*60*1000);cval=s.c_r(cn);if(cval.length="
+"=0){s.c_w(cn,ct+'-New',e);return'New';}sval=s.split(cval,'-');if(ct"
+"-sval[0]<30*60*1000&&sval[1]=='New'){s.c_w(cn,ct+'-New',e);return'N"
+"ew';}else{s.c_w(cn,ct+'-Repeat',e);return'Repeat';}");
/*
* Utility Function: split v1.5 (JS 1.0 compatible)
*/
s.split=new Function("l","d",""
+"var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x"
+"++]=l.substring(0,i);l=l.substring(i+d.length);}return a");
s.usePlugins=true;
s.doPlugins=function(s) {
s.eVar13 = s.getNewRepeat(30,'s_getNewRepeat');
};
//s.doPlugins=s_doPlugins;
s.trackingServer="sstats.adobe.com";
s.trackingServerSecure="tealiumecommerce.sc.omtrdc.net";
------------------------------------------------------------------------------------------ -------------------------------------------------
Thank you,
Jay
09-03-2019 06:15 AM
Hi did you put this in your JS extensions of tealium?
If you did then that might be the issue.
What oyu have to do is go to the tag,
Edit configuration scroll all the way to the bottom until you see "Advanced Settings" then click on Edit template
In here you input that code as instructed on adobes website
Once you edited the template save profile and publish to dev to test it.
Hope this helps
09-04-2019 01:07 AM
thanks for your reply. Now I have disbaled my javascript extension and added the code on the tag section. However, still it is not firing as expected.
Suggestred -- Place the following code within the s_doPlugins() function, which is located in the area of the s_code.js file labeled Plugin Config .
Since I am using AppMeasurement for JS tag I don't find exact s_code.js. So I was trying to implement in above the appmeasurement fucntion call on the tag template and also in different format on the tag but still I don'tsee my prop4 is firing.
Please suggest me to take necessary action to fire this plugin.
Regards,
Jay.
12-12-2019 10:59 AM
@jayap3 Have you seen this article (and video) that shows how to add the doPlugins()
code?
Configuring Adobe Analytics in Tealium iQ
Copyright All Rights Reserved © 2008-2023