Google Universal Analytics Remarketing and Dynamic Remarketing - google-analytics

I am trying to implement remarketing, dynamic remarketing and Adwords conversion tracking within my e-commerce website. The problem I am facing is there seems to be a flurry of information regarding the implementations of these features where one source (mostly Google's own developers portal) says I can use Google Universal Analytics to all of these but also says that I should use the Adwords tags directly. I am incredibly confused by it all. If there is an expert out there that knows how I can implement these things using only Universal Analytics I'd be most grateful.
What I have so far is the standard Universal Analytics script on my website and have enabled displayfeatures:
ga("require", "displayfeatures");
This as far as I am aware will enable remarketing. But I have read nothing about also enabling dynamic remarketing. Does it enable both? I have also setup custom dimension on GA so I should be able to capture these using the following:
ga('set', 'dimension1', '123');
ga('set', 'dimension2', 'product');
My confusion extends to how I track Adwords conversions through Universal Analytics. More specifically how I would push up google_conversion_label, google_conversion_language, google_conversion_format, etc... From what I gather I may only be able to do this via the Adwords tag. Am I barking up the wrong tree trying to use GA when I should be using the Adwords tag?

Simply call
google_trackConversion({
'google_conversion_id': ID GOES HERE,
'google_conversion_language': 'en',
'google_conversion_format': '3',
'google_conversion_label': 'gzTWCJb7wl4Q6quR4QM',
'google_conversion_currency': 'GBP',
'google_remarketing_only': false
});
passing in all the relevant information. This is not part of Universal Analytics but AdWords Remarketing Tag

Related

Can I have both GA4 and Universal Analytics dataLayer on my e-commerce?

I am doing the migration from UA to GA4 on my site, but I need that both properties keep working for some time. My problem is setting the dataLayer, I do not know how to have both of the e-commerce objects without conflict. I know that I can map the variables to GA4 format by GTM, but since the Google documentation recommends setting up GA4 datalayer, and that UA will die soon, I would like to have both dataLayers in my site.
I was thinking of something generic like:
dataLayer.push( {ecommerce: null} )
dataLayer.push( {ecommerce: UA template} )
dataLayer.push( {ecommerce: GA4 template} )
So I will have both objects in my dataLayer. Does that work without conflicts?
You can use the Universal Analytics dataLayer, for example with Google Tag Manager, send ecommerce events as well as to Universal Analytics property also to GA4 property managing the various parameters as expected by this last data collection model: https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm
No conflict can exist because the data is sent to two different systems.

What is gtag and why do I have to add that separately from google tag manager?

I find Google documentation around Google Tag Manager (GTM) terrible at helping me figure out which bits go where.
As I understand, GTM requires that you put a <script> snippet on your pages which is supposed to bring in other code snippets, as could be configured by a non-technical user.
I'm a technical user, though. Perhaps that's the problem! I also find it problematic that Google use the word "tag" to refer to either an HTML element tag, like <script>, or their own proprietary use of the word to mean calling a function ("triggering a tag") in another script, also unhelpfully referred to as a tag.
They also have "gtag" which is what - a helper? something that enables you to send general analytics events through the GTM API? The docs simply say:
The global site tag (gtag.js) is a JavaScript tagging framework and API that allows you to send event data to Google Analytics, Google Ads, and Google Marketing Platform.
... but we could already send analytics? What does this add?
For example, I wish to send an e-commerce Purchase event.
I've found that to do this I needed to add a new snippet of code with two <script> tags to the header on the site (thought GTM meant I didn't need to do this?) that sources gtag.js, then I'm able to call the following at the appropriate place in my javascript:
gtag('event', 'purchase', { value: 1.23, transaction_id: 'test' });
Or without it (although this does not seem to work):
ga('require', 'ec');
ga('ec:addProduct', {name: 'test product', price: 1.23})
ga('ec:setAction', 'purchase', { id: 'test_id_1', revenue: 1.23 })
So my question is: when would you use gtag() over ga(), and why can't GTM install gtag?
When would you use gtag() over ga()?
Use gtag if you want to send data to supported Google products other than Google Analytics. As you pointed out, "The global site tag (gtag.js) is a JavaScript tagging framework and API that allows you to send event data to Google Analytics, Google Ads, and Google Marketing Platform.", whereas ga only works for Google Analytics. But (see below), you might decide to never use gtag nor ga and always use GTM.
Why can't GTM install gtag?
It could (you could have a GTM tag inserting some gtag code) but it's beside the point as they are meant to be used as 2 different solutions:
gtag is a purely programmatic tracking tool for sending data and only works with 3 Google products (so far - Analytics, Ads, Marketing Platform - more maybe added in the future), it's made to provide basic out-of-the-box tracking with a simple copy/paste + small lines of code (if needed for customization).
GTM is a tag manager: it can work programmatically BUT requires a minimal configuration of the container via the GTM UI (a default container won't send data anywhere), and can send data to whatever products you want (just need to setup the corresponding tags in GTM), while having a bunch of other features
A few questions to help you choose:
Am I sending data to other tools than Google Analytics/Ads/Marketing platform?
Do I want to use some the extra features GTM offers (UI, version control, templates, debug, environments etc...)?
Is there some tracking that would be heavy to implement via pure custom JS (eg scroll tracking) which GTM can facilitate with its built-in listeners (eg scroll tracking)?
If YES to any of the above, then use GTM
I personally never use gtag, I always replace it with GTM because it's considerably more powerful than gtag.
What Google is doing is progressively replacing all their default snippets with gtag so they only have 1 unified API to maintain and it's an easy copy/paste for users (bear in mind most users aren't tech savy and just need to paste the snippets in into their CMS). Forcing people to use GTM would be too much of a friction as out-of-the-box GTM simply doesn't track anything and people would need to learn & configure GTM, too much work vs a simple copy/paste.
Note: The built-in events don't use category, label, and value. Take care to use the correct keys when sending these events.

Google Analytics with GTM; is it possible that data will be duplicated?

I'm fairly new to Google Tag Manager, in the past I've just fired events straight to Google Analytics. What I'm wondering is this; is it possible that, if you use Google Analytics alongside Google Analytics tags in GTM, can you get duplicate data in Google Analytics?
For instance, let's say I have a Pageview tag in GTM, as well as GA on the webpage as normal. Would this count as two pageviews? (ie. one from standard GA, one from the GTM tag)
I've looked around for an answer, but maybe it's just a stupid question!
If both track to the same property you'd get two pageviews in that Ga property.
However there is a good chance that both pageviews would end up in different sessions; GTM creates a random name for the Google Analytics tracker, while the tracker within the page would track to the standard tracker (t0; read about naming trackers here), unless configured otherwise.
IMO it is not a good idea to mix GTM and inline trackers with the same property, since it's hard to be sure that both use the same configuration. And yes, your pageview will be counted twice.

Switch to Tag Manager, will Enhanced Ecommerce still work?

I've successfully implemented Google Enhanced Ecommerce on one of my websites, where I also have a Google Universal Analytics tracking code. Now we want to change to Google Tag Manager, thus replacing the UA tracking code with the Tag Manager Code (correct?)
Will this affect the Enhanced Ecommerce tracking in any way? Or can I just replace the tracking snippet and the ga('create')-parts with the Tag Manager-snippet?
You need a correctly set up dataLayer (which rather more complicated since you need info on product impressions etc). Documentation is here:
https://developers.google.com/tag-manager/enhanced-ecommerce#enable
Then you create a news Analytics Tag (just a pageview or event, there is no need for a separate transaction tag) and select "Enhanced Ecommerce" with the "Use datalayer" option in the advanced settings.
GTM will pick up the values from there datalayer and do the rest for you.
So yes, you can get this to work, but it requires a lot of preparation for the correct datalayer implementation. Simply replacing the GA code with the GTM code will do very little except breaking your tracking.

Should I remove GA/GDN code if I'm using GTM?

Does GTM code + GA/GDN Tag is enough to track my website analytics ? should I remove GA code if I'm using GTM ?
And aboud google adwords goals , should I remove Google adwords code too and use that one provided from GTM ?
Does GTM code + GA/GDN Tag is enough to track my website analytics ?
Yes, if you have configured the GA tracking tag in the tag manager you do not any other GA code on your site.
should I remove GA code if I'm using GTM
Yes. You do not need it anymore and if you do not remove it you might track your pages and event twice.
And aboud google adwords goals , should I remove Google adwords code
too and use that one provided from GTM
While it is still possible to use the Adwords code side by side with the tag manager it does not make any sense. As a matter of elegance and maintainability I'd say YES, you should remove page code and use GTM instead. Having all tags in one location is after all the point of GTM.

Resources