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

Can't Get Analytics Plugins Working

Avatar

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile
MktgCloudUser
Level 2

04-10-2018

Hello,

I can't get Adobe Analytics Plugins working.  Keep getting errors in console or Analytics doesn't load at all.  Below is a simple example using an Adobe plugin; here's my setup:

Analytics Extension

Manage the library for me (checked)

Custom Code Section (below)

2018-10-04_18-33-34.jpg

Load Rule

Set Variables > Custom Code

  if (_satellite.getVar('Page: External Campaign (URL)') != '') {

    s.events=s.apl(s.events,"event3",",",1)

  }

I've tried several variations of putting all of the plugin code in the Load Rule, Extension and half-in-half, they all generate some form of client error like below:

Uncaught (in promise) TypeError: t.apl is not a function

How do I get plugins working.

Accepted Solutions (1)

Accepted Solutions (1)

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

08-10-2018

You have to define your plugins before your doPlugins function and only call them within doPlugins. doPlugins will get executed after your rule so s.apl isn't defined yet.

As you posted an image and not code I am not gonna retype everything but to get you an idea:

s.apl=newFunction(...);

s.split=new Function(...);

s.usePlugins=true;

s.doPlugins=function(s) {

//...

}

Answers (0)