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

DTM: Custom Page Code does not load properly

Avatar

Avatar
Validate 1
Level 2
kasper_rasmusse
Level 2

Likes

7 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
kasper_rasmusse
Level 2

Likes

7 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
kasper_rasmusse
Level 2

15-10-2015

We are having some difficulties using the Custom Page Code for Adobe Analytics in a Page Load Rule. 

The general setup is as follows:
    - A fresh s_code is hosted with DTM (Managed). 
    - The Load order for this general Adobe Analytics tag is set to bottom, as its dependent on DOM elementets (tracking object = s). 

Now we want to assign an action to a specific page, fx. a product view. For this we create a new Page Load Rule (Load Order = Bottom of page), and because DTM currently does not support the s.products in the UI, we are going to write the behavior in the Custom Page Code under the Adobe Analytics tab. However, the data assigned to the s object in this script, is not send with the pageView tracking - in fact, it is not visible at all. Using the predefined fields in the UI (eVar, prop events, etc.) data is perfectly send with the pageView tracking - the error only occurs using the Custom Page Code. 

Using the debugger - _satellite.setDebug(true) - it seems like the Page Load Rule is handled first, and then the s object is overwritten with the general Analytics code afterwards?

We have also tried using "s=window.s", but it casts a undefined exception when accessing the s object. Experimenting with alert boxes etc. i can see the load order as:
    - Page Load Rule for product views (set variables)
    - Load Adobe Analytics tag (set variables)
    - Track pageView

Have anyone else faced similar problems? When is the s object actually loaded and accessible?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 1
Level 1
anthony_avolio1
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
View profile

Avatar
Affirm 1
Level 1
anthony_avolio1
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
View profile
anthony_avolio1
Level 1

15-10-2015

This bug appears to have been fixed in the 1/16/2014 release. The problem I described above is no longer happening to me.

Thanks,

Anthony

Answers (5)

Answers (5)

Avatar

Avatar
Level 1
toby_ho
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
toby_ho
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
toby_ho
Level 1

15-10-2015

Could you please send me?

  1. The URL to the page you are testing
  2. The URL to the rule in the DTM admin console

Avatar

Avatar
Validate 1
Level 2
kasper_rasmusse
Level 2

Likes

7 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
kasper_rasmusse
Level 2

Likes

7 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
kasper_rasmusse
Level 2

15-10-2015

Thank you and yes, it was a typo in my question. 

Avatar

Avatar
Level 1
claudios1578915
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
claudios1578915
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
claudios1578915
Level 1

15-10-2015

Hello everyone,

we are experiencing the same problem.

We have debugged the code and it seem that the code added through the Custom Page Code section of a Page Load Rule is wrapped in a function with only one parameter ("t") but this fuction is called by another one which pass it 2 parameters and the second one is the SiteCatalyst Tracking Object, not the first one.

To me this is a bug of the product.

Do you think i'm right or i made some mistakes?

Thanks,

Claudio.

Avatar

Avatar
Level 1
toby_ho
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
toby_ho
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
toby_ho
Level 1

15-10-2015

Is "s = windows.s" a typo? It should be "s = window.s". If it had been a typo it would explain the undefined excption.

Avatar

Avatar
Affirm 1
Level 1
anthony_avolio1
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
View profile

Avatar
Affirm 1
Level 1
anthony_avolio1
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
View profile
anthony_avolio1
Level 1

15-10-2015

I'm experiencing the same issue - inconsistent behavior in the Custom Page Code section of Adobe Analytics at the Tool-level vs. Page Load Rule-level.

In the installed tool section, placing the following snippet within the Custom Page Code section successfully populates prop4 in the analytics call:

if(true) s.prop4="prop4text";

However, in the page load rule section, the following snippet within the Custom Page Code section has no effect:

if(true) s.prop3="prop3text";

In order to keep the total number of rules more manageable, I was hoping to perform some logical tests within the Custom Page Code section of a page-level rule in order to set additional Analytics values. Is this possible?

Thanks,

Anthony