- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
08-24-2016 02:24 PM - edited 08-24-2016 02:38 PM
We need to suppress the initial Google Analytics pageview hit that fires when the page hosting the angular app loads. We're using the Angulartics Tealium integration.
https://github.com/ianhampton/angulartics-tealium/blob/master/src/angulartics-tealium.js
Excluding routes as noted in Angualrtics documentation did not work for us. Is there a flag we can set when utag.js loads to prevent initial pageview from firing?
Solved! Go to Solution.
08-24-2016 03:07 PM
08-24-2016 04:33 PM
Great job @michaelb. Thank you for sharing.
08-24-2016 07:29 PM
michaelb
This will work correctly for suppressing the initial pageview; however, keep in mind that this will suppress the initial pageview for all tags loading in with utag.js, not just the Google Analytics tag.
09-14-2016 06:39 PM - edited 09-14-2016 06:40 PM
Hi Chris,
Sorry just saw this note. I'm not sure what you mean by "surpress initial pageview for all tags"--do you mean surpress any tag loading on utag.view?
For this particular application, we want to surpress initial GA pageview and fire only virtual pageview--this seems to be working with the fix.
However, we also want a DoubleClick Floodlight tag to fire on pageload. I've just checked the application, and the Floodlight tag seems to be loading without issue. Did we get lucky and this is not an expected outcome?
What the recommended solution for the following situation in an Angular app?
1) Surpress initial GA pageview on page load
2) Fire GA virtual pageview on app load
3) Ensure other tags loading on utag.view load on page load
Thanks!
09-19-2016 11:56 AM
09-19-2016 12:10 PM
Hi @michaelb. Let me see if I can find you some assistance. Sit tight.
09-19-2016 01:06 PM
When utag.js is loaded there is a utag.view run be default that pulls in the utag_data object. For most angular implementations you will not utilize the initial utag.vew run as part of the utag.js library load. This is suppressed with window.utag_cfg_ovrd = {noview:true};
So you shouldn't get the default utag.js library utag.view call but all your other tags should fire as expected based on load rules you define.
09-19-2016 02:58 PM
Copyright All Rights Reserved © 2008-2023