Reply
Highlighted
Visitor
Posts: 7
Registered: ‎03-29-2016
Accepted Solution

How do you suppress initial pageview in an angular app using the Angulartics Tealium integration?

[ Edited ]

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?

Reply
0 Kudos
Visitor
Posts: 7
Registered: ‎03-29-2016

Re: How do you suppress initial pageview in an angular app using the Angulartics Tealium integration

I think we got the solution, if anyone else has this question:

 

    window.utag_cfg_ovrd.noview = true;
Community Manager
Posts: 668
Registered: ‎08-26-2015

Re: How do you suppress initial pageview in an angular app using the Angulartics Tealium integration

Great job @michaelb. Thank you for sharing. 

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Reply
0 Kudos
Tealium Employee
Posts: 19
Registered: ‎09-01-2015

Re: How do you suppress initial pageview in an angular app using the Angulartics Tealium integration

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. 

Visitor
Posts: 7
Registered: ‎03-29-2016

Re: How do you suppress initial pageview in an angular app using the Angulartics Tealium integration

[ Edited ]

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!

 

Reply
0 Kudos
Visitor
Posts: 7
Registered: ‎03-29-2016

Re: How do you suppress initial pageview in an angular app using the Angulartics Tealium integration

Anyone have ideas for a solution on this?
Reply
0 Kudos
Community Manager
Posts: 668
Registered: ‎08-26-2015

Re: How do you suppress initial pageview in an angular app using the Angulartics Tealium integration

Hi @michaelb. Let me see if I can find you some assistance. Sit tight. 

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Reply
0 Kudos
Tealium Employee
Posts: 24
Registered: ‎09-01-2015

Re: How do you suppress initial pageview in an angular app using the Angulartics Tealium integration

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.

Visitor
Posts: 7
Registered: ‎03-29-2016

Re: How do you suppress initial pageview in an angular app using the Angulartics Tealium integration

Ah this makes sense. Thanks for clarifying Steve!
Reply
0 Kudos