Highlighted

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

Silver Contributor
Silver Contributor

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?

8 REPLIES 8
Highlighted

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

Silver Contributor
Silver Contributor

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

 

    window.utag_cfg_ovrd.noview = true;
Highlighted

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

Employee Emeritus

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.
Highlighted

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

Tealium Employee

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. 

Highlighted

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

Silver Contributor
Silver Contributor

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!

 

Highlighted

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

Silver Contributor
Silver Contributor
Anyone have ideas for a solution on this?
Highlighted

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

Employee Emeritus

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.
Highlighted

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

Employee Emeritus

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.

Highlighted

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

Silver Contributor
Silver Contributor
Ah this makes sense. Thanks for clarifying Steve!