- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
01-22-2018 09:40 AM
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
01-23-2018 02:42 AM - last edited on 01-23-2018 06:44 AM by kathleen_jo
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
Copyright All Rights Reserved © 2008-2023