GA + GTM via Segment vs GTM via Segment and GA via GTM

Hi!  Is there a difference and/or advantage to have both GA and GTM run via Segment in stead of having GTM via Segment and GA via GTM?

5replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • I'm not a Segment employee,  so take this with a grain of salt.  

    In this other thread  https://help.segment.com/hc/en-us/community/posts/204867613-GTM-and-Segment  a Segment Engineer simply states you really shouldn't implement Segment via GTM because they can't vouch for the data integrity.  

    Basically,  when you think about wrappers,  the firing of the javascript code is delay just slightly.  There are potentially other things that could be loaded in front.  

    One of the reasons Google asks you to put the code for GA and GTM where they are is so they can insure more accurate data collection.  In some cases, the javascript delayed at a later time can effect whether or not a PageView or Session is tracked.  Imagine a user who clicks on a link and then quickly navigates to another link.  If the javascript isn't fully loaded, you'd miss that pageView. 

    Additionally,  GA does timing difference between when the page first loads to when the DOM is ready.  If you delay the initial load by wrapping it in Segment then GTM then firing GA,  you're data will be slightly off.  

    For most businesses these things really don't matter.  If you want true data consistency, you should really implement everything natively.  Segment inherently is susceptible to having slightly less complete data integrity,  but the engineering time and sanity of having a wrapper is usually worth more from a business perspective than having your data just slightly more accurate.

    Reply Upvote
  • Hi!  Thanks for taking the time to post a reply.  Only my question was more about placing GA via GTM,  not so much having Segment via GTM.  Our current setup is that we have activated GTM via Segment.  Then in GTM we have activated the GA tag.  Since it is also possible to have the GA tag directly via Segment I'm mainly wondering about the pros and cons in doing such. 

    Reply Upvote
  • Hi Michael,

    Sorry my response wasn't clear.  

    Basically,  if you care about having the purest data,  you shouldn't load GA via GTM if you're loading GTM with Segment.  It can cause small flaws and holes in your data.  

    It's better to load GA and any other integration that Segment supports through Segment itself.  GTM should then just be used for things that Segment doesn't support. 

    That's the cleanest approach from a data integrity standpoint.

    Reply Upvote 1
  • Ok all clear now,  thanks for your reply  -  I'll do that then

    Reply Upvote
  • Hi Michael,  

    Quick question on this.  

    If we want to track events without digging into the DOM + code base that's one of the benefits of working with Google Tag Manager as it creates that data layer.  

    At the same time,   I like segment as it unifies all analytics into one clean API.  

    Is there a way we can marry the two up?  


    Reply Upvote 3