Expand my Community achievements bar.

SOLVED

DTM Multiple Page Tags Firing

Avatar

Level 3

Hi Rudy,

I can also see, DTM Page Load Rules are firing twice. I have put these rules to be fired at the bottom of the page but not sure what causing them to fire twice. Yes, I can see a lot of legacy scode in DTM Analytics Editor where lot of analytics variables are getting set.

But, how is that making my Rules to fire twice? As per my understanding, scode legacy code will override the variables already set by DTM Rules since doPlugins is the last function which gets called before sending image request to Analytics Server. But, I am just trying to understand why this is making my rules to fire twice and what can I do rectify this?

I am looking for a solution urgently since this is affecting our production site.

Thanks in advance,

-J

1 Accepted Solution

Avatar

Correct answer by
Level 10

As far as I'm aware, dynamically inserting the DTM footer code is not a supported deployment method. Is there any reason you can't have the footer code included statically with the page?

View solution in original post

4 Replies

Avatar

Employee

Can you provide a link where we can see this ?

Avatar

Level 3

I am afraid, I can not share the URL since this needs VPN login. But looks like, since I am making a callback function to include DTM footer code dynamically (which is taking time on page load) and before it gets included, page already reaches into 'DOM Ready' state and DTM realizes that pagebottom Rules haven't been fired yet.  Hence, DTM makes a call to 'pagebottom trigger function' from the DOM ready state which triggers all the pagebottom rules. And then later, when DTM footer code gets included, this makes a call again to pagebottom rules.

If I change the condition of the rule to 'DOM Ready' state, this gets fired only once.

This is my assumption that this is how DTM load order works.

Please correct me if I am wrong and let me know if there is anyway I can make this work without changing condtion to 'DOM ready' state.

Avatar

Correct answer by
Level 10

As far as I'm aware, dynamically inserting the DTM footer code is not a supported deployment method. Is there any reason you can't have the footer code included statically with the page?

Avatar

Level 10

Any updates here? Were you able to solve the issue?