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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Appmeasurement.js event is overriding the direct call rule event

sidh19884490
Level 3
Level 3

Hi

I've some ajax pages on my site and I'm using direct call rule to track them. On some of the direct call rule I added some page / step specific events but these events are getting overridden by the event set ( which s.events="event4="+s_getLoadTime();) in the core appmeasurement.js. The specific events in the direct call rules get tracked if I remove s.events="event4="+s_getLoadTime(); from appmeasurment.js. Is there any workaround for this. or Is there a way to tell DTM to prioritize the events set in the direct call rule over the JS settings and override the JS events (s.events="event4="+s_getLoadTime();)?

Thanks

1 Accepted Solution
sidh19884490
Correct answer by
Level 3
Level 3

Yes, as I said if remove s.events from appmeasurment.js , then the direct call rule event works. However, I now used the s.events with s.apl plugin in the appmeasurement.js and the direct call rule events aren't getting overridden any more. My issue is resolved and everything is being tracked with this solution but posting it here for the information of the others if anyone is experiencing similar issue.

View solution in original post

3 Replies
jantzen_belliston-Adobe
Level 10
Level 10

It sounds like you are tying to set the s.events variable in two different places

  • In your core Analytics code library (AppMeasurement)
  • In a direct call rule

Whichever portion of code runs last it likely overwriting the previous variable value. I'm not aware of any work around for this or way of setting precedence.

I'd recommend pulling the s.events variable out of your core library if possible and only setting via rules.

sidh19884490
Correct answer by
Level 3
Level 3

Yes, as I said if remove s.events from appmeasurment.js , then the direct call rule event works. However, I now used the s.events with s.apl plugin in the appmeasurement.js and the direct call rule events aren't getting overridden any more. My issue is resolved and everything is being tracked with this solution but posting it here for the information of the others if anyone is experiencing similar issue.

View solution in original post

jantzen_belliston-Adobe
Level 10
Level 10

Thank you for posting the resolution! I'll go ahead and mark your own answer as correct.