Highlighted

utag.view not firing on additional page views

Rookie Contributor

On our site the initial page_name is being sent to analytics, but addtional pages are showing the correct page_name in the console, but are not properly passing to analyitics, instead they all just report the same page_name from the initial page load.  I have tried debugging using the console command: document.cookie="utagdb=true";

I can see the trigger being called, and it looks correct, but it never makes it to adobe analytics reporting.

trigger:view
utag.js:45 {site_name: "lds.org", page_name: "LDSChurch.org : SIRA : Reporting : Help", site_section: "Help", page_content_type: "FAQ"}

page_content_type: "FAQ"

page_name: "LDSChurch.org : SIRA : Reporting : Help"

site_name: "lds.org"site_section: "Help"
utag.js:45 trigger:called before tags loaded
utag.js:45 Tag 3 did not LOAD
utag.js:45 Tag 17 did not LOAD
utag.js:45 Tag 21 did not LOAD
utag.js:45 utag.loader.LOAD:17
utag.js:45 SENDING: 17

1 REPLY 1
Highlighted

utag.view not firing on additional page views

Silver Contributor
Silver Contributor

Hi there @weshancock1981,

> utag.js:45 trigger:called before tags loaded

This log message means you are triggering the utag.view call before the tags are ready to listen those calls. There's a flag into utag object that allows you to know when the tags are ready to fire page view tracking.

That flag is under utag.handler.iflag and turns from 0 to 1. I couldn't find any documentation on it, unfortunately. What you can try is encapsulating your utag.view() calls inside a setInterval, which checks for utag, utag.handler and utag.handler.iflag to be defined, and the last one to be one. Something like the next:

var firePageView = setInterval(function() {
	if (window.utag && utag.handler && utag.handler.iflag == 1) {
		utag.view({
			data: 'my data'
		})
		clearInterval(firePageView);
	}
}, 200);

Haven't checked your site, anyway hope this helps!

Cheers,
Pablo