Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Old appMeasurement plugins

Avatar

Avatar
Validate 1
Level 2
KrispySalsa
Level 2

Likes

9 likes

Total Posts

10 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
KrispySalsa
Level 2

Likes

9 likes

Total Posts

10 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
KrispySalsa
Level 2

13-06-2018

Hi All,

we are in the process of implementing Launch, we have quite a few plugins that we used to use in Appmeasurement and would would still like to use, can anyone tell me

1.  Where to place the plugin code?

2.  How do I reference the plugins so they populate the relevant s.props?

Any advice help will be much appreciated.

Best regards.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
MVP
StewSchilling
MVP

Likes

334 likes

Total Posts

267 posts

Correct Reply

83 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile

Avatar
Springboard
MVP
StewSchilling
MVP

Likes

334 likes

Total Posts

267 posts

Correct Reply

83 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile
StewSchilling
MVP

13-06-2018

Under Extensions in Launch, you'll need to install and configure the Adobe Analytics extension (I assume that you've gotten this far).

Within the extension configuration, you'll find a section named "Configure Tracker Using Custom Code".  This is the place where you will add your plug-in functions and set up your s.doPlugins function.

Screen Shot 2018-06-13 at 8.53.08 AM.png

Here is some example implementation code :

Screen Shot 2018-06-13 at 9.05.38 AM.png

In the code above, there are a few things to note:

1) Timing - This code is executed just after the Adobe Analytics library is loaded which is just after the Launch library inits.  In other words, this will run very early in the scheme of things.

2) The first part  (blocked by comments Start ... End) of this code simply defines the plugin functions on the "s" object. This makes them available for use later.

3) line 24 - s.usePlugins=true.  This is a flag for Adobe Analytics that tells it to execute the doPlugins function just before sending beacons across the wire ( as part of s.t, s.tl, activityMap, and link tracking).

4) Lines 25-27 s.doPlugins = ...   This is the function that will be run.  This is where you set you props, evars, events and do anything else you want to accomplish on every beacon that you send.

5) This example shows the structure of things.  You can add more plug-ins and more logic to your doPlugins function.

6) This code would also be a good place for other AA customizations like loading the media module for video tracking.

Links to the documentation are here:

Implementation Plug-ins

s.usePlugins

s.doPlugins

Answers (4)

Answers (4)

Avatar

Avatar
Validate 1
Level 8
thomas_amsler
Level 8

Likes

241 likes

Total Posts

159 posts

Correct Reply

26 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 8
thomas_amsler
Level 8

Likes

241 likes

Total Posts

159 posts

Correct Reply

26 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
thomas_amsler
Level 8

02-07-2018

Be aware some plugins may not work in Launch due to the new compiler/compressor of the scripts. It renames all the variables and "s" isn't always called "s" anymore in the built library.

One I found an already reported via Customer Care is the getVisitNum

Here a fixed verison of that plugin:

/*

* Plugin: getVisitNum - version 3.0

*/

s.getVisitNum=new Function("tp","c","c2",""

+"var s=this,e=new Date,cval,cvisit,ct=e.getTime(),d;if(!tp){tp='m';}"

+"if(tp=='m'||tp=='w'||tp=='d'){eo=s.endof(tp),y=eo.getTime();e.setTi"

+"me(y);}else {d=tp*86400000;e.setTime(ct+d);}if(!c){c='s_vnum';}if(!"

+"c2){c2='s_invisit';}cval=s.c_r(c);if(cval){var i=cval.indexOf('&vn="

+"'),str=cval.substring(i+4,cval.length),k;}cvisit=s.c_r(c2);if(cvisi"

+"t){if(str){e.setTime(ct+1800000);s.c_w(c2,'true',e);return str;}els"

+"e {return 'unknown visit number';}}else {if(str){str++;k=cval.substri"

+"ng(0,i);e.setTime(k);s.c_w(c,k+'&vn='+str,e);e.setTime(ct+1800000);"

+"s.c_w(c2,'true',e);return str;}else {s.c_w(c,e.getTime()+'&vn=1',e)"

+";e.setTime(ct+1800000);s.c_w(c2,'true',e);return 1;}}");

s.dimo=new Function("m","y",""

+"var d=new Date(y,m+1,0);return d.getDate();");

s.endof=new Function("x",""

+"var s=this,t=new Date;t.setHours(0);t.setMinutes(0);t.setSeconds(0);if(x=="

+"'m'){d=s.dimo(t.getMonth(),t.getFullYear())-t.getDate()+1;}else if("

+"x=='w'){d=7-t.getDay();}else {d=1;}t.setDate(t.getDate()+d);return "

+"t;");

The fix is to add "s=this" before "t=new Date" in the "s.endof" function, else the "s.dimo" call in line 19 fails.

Avatar

Avatar
Springboard
MVP
StewSchilling
MVP

Likes

334 likes

Total Posts

267 posts

Correct Reply

83 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile

Avatar
Springboard
MVP
StewSchilling
MVP

Likes

334 likes

Total Posts

267 posts

Correct Reply

83 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile
StewSchilling
MVP

22-06-2018

It's nothing to worry about. 

I get those too when pasting these plugIns into Launch.  You are safe to ignore them. 

Avatar

Avatar
Validate 1
Level 2
KrispySalsa
Level 2

Likes

9 likes

Total Posts

10 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
KrispySalsa
Level 2

Likes

9 likes

Total Posts

10 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
KrispySalsa
Level 2

13-06-2018

Hi Stewart,

Thank you for the info.  You are a life saver!!!.

Kind regards

Chris.

Avatar

Avatar
Validate 1
Level 2
Chand856
Level 2

Likes

6 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
Chand856
Level 2

Likes

6 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
Chand856
Level 2

22-06-2018

I have done the same steps , but i am getting the warning icon . Could you please help me why i am getting this.

1513789_pastedImage_0.png