Expand my Community achievements bar.

SOLVED

DTM Page Load Rule Firing Twice?

Avatar

Level 2

Hi there,

I'm trying to troubleshoot why I'm seeing my page load rules and SiteCatalyst code is appearing twice in my debugger tool.  I've attached a screenshot that shows the SiteCatalyst account showing up twice and that shows "event10, event11, event10, event11" appearing to fire twice.  The site I'm working on is: https://www.tysonfoods.com/

Is anyone out there able to help me troubleshoot this?

Thanks in advance!Double Firing_Adobe.jpg

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Here's what I'm seeing:

1386696_pastedImage_0.png

I'm only seeing one GA tag and one AA tag fire.

The reason we are seeing different things has to do with timing:

Normal loading:

  1. DTM JS library is loaded
  2. Page body loads
  3. if _satellite.pageBottom is in the <body>, it fires the AA tag.

   3b. if _satellite.pageBottom is not in the <body>, then DTM automatically calls pageBottom at DOM Ready.

However, with the defer html attribute:

  1. DTM JS library is deferred
  2. Page body begins to load
  3. DTM JS library beings to load
  4. If DOM Ready occurs before the _satellite.pageBottom in the body fires, DTM calls it automatically, and fires the AA tag.
  5. Then the _satellite.pageBottom in the body is called, firing a second AA tag.

I also noticed some timeout logic around the _satellite.pageBottom call. This isn't necessary instead, consider:

     if(typeof _satellite == 'object') _satellite.pageBottom()

That should be the maximum amount of customization to that method necessary, since DTM will fire pageBottom automatically if it the _satellite object doesn't exist when that code is called.

Hope that helps!

View solution in original post

4 Replies

Avatar

Employee Advisor

Hi there,

I just checked https://www.tysonfoods.com/who-we-are and am not seeing this issue, however, I may have the solution to the problem:

It looks like the satellite library is getting loaded with a defer html tag.

1386667_pastedImage_1.png

This is a very big no-no when it comes to DTM, as it highly affects the timing of the DTM JS loading - essentially making DTM unsupported. Per this document, HTML script defer Attribute , causes the JS file to not execute until the page has finished parsing. And this will very largely affect DTM's ability to serve tags properly.

I couldn't recommend that this defer attribute be remove more highly.

Avatar

Level 2

Thank you so much!  ericmatisoff Could you send a screenshot of what you are seeing in the debugger tool?  I still see the SiteCatalyst account firing twice.  I've since removed the page load rule to fire, so now I just see the account firing twice with the Google Account only firing once.

Avatar

Correct answer by
Employee Advisor

Here's what I'm seeing:

1386696_pastedImage_0.png

I'm only seeing one GA tag and one AA tag fire.

The reason we are seeing different things has to do with timing:

Normal loading:

  1. DTM JS library is loaded
  2. Page body loads
  3. if _satellite.pageBottom is in the <body>, it fires the AA tag.

   3b. if _satellite.pageBottom is not in the <body>, then DTM automatically calls pageBottom at DOM Ready.

However, with the defer html attribute:

  1. DTM JS library is deferred
  2. Page body begins to load
  3. DTM JS library beings to load
  4. If DOM Ready occurs before the _satellite.pageBottom in the body fires, DTM calls it automatically, and fires the AA tag.
  5. Then the _satellite.pageBottom in the body is called, firing a second AA tag.

I also noticed some timeout logic around the _satellite.pageBottom call. This isn't necessary instead, consider:

     if(typeof _satellite == 'object') _satellite.pageBottom()

That should be the maximum amount of customization to that method necessary, since DTM will fire pageBottom automatically if it the _satellite object doesn't exist when that code is called.

Hope that helps!

Avatar

Level 4

Hi there, I don't see any issues myself, I wouldn't trust any 3rd party tool at this time as most of them are problematic, it's best to look at the image call itself or the metrics from without the Adobe UI.

I'll also remove all custom logic around _satellite.pageBottom(); and simply have it as the last thing on the page as such.

<script type="text/javascript">_satellite.pageBottom();</script>

</body>

</html>