Reputation: 6467
Quick question; if for some reason a site has GTM and GA 'installed' and pushing to the same GA account, do they use the same cookies?
Upvotes: 1
Views: 2415
Reputation: 32760
GTM does not set cookies at all, so at face value the answer to the question is "no".
However if you have two (or more) GA trackers deployed, one via GTM and one in your page code these will by default use the same cookie name. Multiple trackers are not that unusual (and supported as per documentation), so I doubt this is a problem, but if for some reasons you want to use different cookies you can set the cookie name at tracker creation (either by passing the cookieName in the configuration object in your page code or by setting the option in the GTM interface).
However you will still have two independent trackers (because GTM will create a tracker with a random name), and if both track to the same account this might track double (e.g. if pageviews are tracked by both) and may have other side effects.
If you want to mix GTM and inline GA (e.g. if you do pageview tracking via GTM and event tracking with inline code, maybe from within a external javascript module) you should create the tracker only once, and set a name for it that is used both within GTM and the inline code.
Upvotes: 4