Tag Manager - Enhanced ecommerce - google-tag-manager

I am trying to set up Enhanced E-commerce tracking for a hotel booking site. The site uses a third party for booking and taking payments.
The booking site have implemented the data layer.
But the data is not getting transferred to Google Analytics.
This is what I have done so far. Can anyone tell me what I am doing wrong?
Added a universal analytics tag.
Added a custom event trigger with the name supplied by booking site
Created a variable with data layer and Enhanced E-commerce enabled.

Related

Google Analytics Social Interactions via. gtag.js

Google Analytics documentation seems light on this topic, but historically businesses have been able to track social sharing interactions on their websites - 'Social Plugins' - via. both ga.js and analytics.js. See here: https://support.google.com/analytics/answer/1316556?hl=en
For use case example, as a business, an analyst would like to understand how often website content is shared onto social networks by website visitors.
The problem I'm having is, I can't easily find what the gtag.js equivalent is of this functionality. The closest I can find is to send a gtag event called 'share' - but not sure if this will populate the Social Report under Acquisition in Google Analytics.
Could anyone please advise how to track Social Interactions via. gtag.js for Google Analytics?
//ga.js
_gaq.push(['_trackSocial', network, socialAction, opt_target, opt_pagePath]);
> https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSocial
//analytics.js
ga('send', 'social', [socialNetwork], [socialAction], [socialTarget], [fieldsObject]);
> https://developers.google.com/analytics/devguides/collection/analyticsjs/social-interactions
Note: I found this website which website - https://www.balkanweb.com/peshq-te-barabarte-pavaresisht-nga-madhesia/ - which does seem to use gtag event 'share' function but I am just not sure if it populates the Social reports in GA as I can't see any documentation to support that.
gtag('event','share',{method:'twitter',event_action:'tweet',content_id:targetUrl})
I made a test and I confirm that the share event mentioned does not end up in the social report but in the event report.
Since the gtag.js documentation does not mention social hits (the parameter can only be: CONFIG, SET or EVENT) I believe there is currently no way to send that type of interactions from the website with gtag.
Sadly there is no way to translate this social hit type from UA (Universal Analytics) to GA4 (Google Analytics 4) directly.
The Universal Analytics to Google Analytics 4 migration guide (by Google) mentions this in the Hit types section of the document comparing the two:
Universal Analytics hit types include page hits, event hits, ecommerce hits, and social interaction hits.
In contrast, Google Analytics 4 data is event-based, with the principle that any interaction can be captured as an event. As such, Universal Analytics property hit types translate to events in a Google Analytics 4 property.
Further down the document it also says:
[...] it’s better to rethink your data collection in terms of the Google Analytics 4 model rather than port your existing event structure to Google Analytics 4.

The importance of _gl parameter for cross domain tracking when you have Google Analytics installed

I have a website and its booking engine (2 different domains) at work and visitors land on the website and then proceed to the booking engine.
I have installed Google Analytics correctly to measure conversions that take place in the booking engine domain. Everything getting recorded correctly in Google Analytics account.
We recently launch Google Ads campaign and I saw that there is another parameter named '_gl' needed to append to the booking engine URL when a visitor proceeds to the booking engine via the website for correct cross domain tracking (probably to avoid Safari tracking prevention).
Just wanted to know, how important this _gl parameter for cross domain tracking since I already have correct Google Analytics setup in place and have linked Google Analytics and Ads accounts.
Thank you!
The parameter you mention is very important in order to correctly track users between two domains, otherwise GA cannot link the same user when they browse from one domain to another.

Analytics for Firebase + Google tag manager + Google Analytics

I'm working with an app and I'm using Firebase , mostly for Analytics. This app also have a website, so what i want to do is sending my data that i'm collecting with Analytics for Firebase to some Property in Google analytics. Can i do this by Google Tag Manager?
The Flow will be something like this:
Firebase events -> Analytics for Firebase -> Google tag Manager -> Google Analytics
You should always start with a measurement plan that details the data you want to collect. This will help you report the performance of your business objectives and key performance indicators (KPIs) to your stakeholders. If you’re new to measurement planning, check out Analytics Academy for tips on how to create a solid measurement plan.
Then, you can install a basic implementation of Google Analytics via Tag Manager in four steps:
In Google Tag Manager, select ‘Create Tag’ and then choose the Google Analytics tag template.
Select ‘Universal Analytics’.
Configure your tag by naming it (it will default to the tag template name if you do not choose to change it). We suggest naming it "GA Pageview." Then add your Google Analytics property ID or your gaProperty variable. Finally, choose the Track Type, which in this case, should be the most common type of tracking: ‘Page View.’ A pageview tracks each time a browser loads a site page. Other types of tracking include Events, Cross-domain, Social, and Transaction and refer to the type of action you want to track on your website.
Choose your firing triggers. For a basic Google Analytics implementation, select ‘All Pages’. This means that the Google Analytics tag will fire, or execute, on every page of your site.
Google Tag Manager offers a variable type called “Google Analytics Settings” for use in Universal Analytics tags in web and mobile (Firebase) containers. A Google Analytics Settings Variable acts as a central location to configure sets of Google Analytics settings for use across multiple tags.
When you create a Google Analytics tag using Universal Analytics for web, iOS (Firebase), or Android (Firebase), you will be prompted to select or create a new Google Analytics Settings Variable.
Check this: https://analytics.google.com/analytics/academy/

How do I add Google Analytics cross domain tracking in Squarespace?

I have setup my site using Squarespace. I am also using Google Analytics to track site activity including eCommerce. When I go form product cart page to checkout page on my site it take we to following url secure.squarespace.com/commerce/checkout but during this process my old session is lost. In order to keep track of my existing client that is going from cart to checkout google analytics allow setting cross domain tracking between two distinct domain.
How can I set cross domain tracking in Squarespace? or Is there any way that my session activity is not lost and similar user is track between main site and Squarespace checkout pages. ?
Squarespace allow Google Analytics ecommerce tracking by embedded code, you just need to enter the google analytics id to start tracking, the embedded code belongs to classic google analytics and there is no way you can edit it (at least not in my knowledge) in order to modify allow linker command within code to enable cross domain tracking. I can use my own Google Analytics code or Google Tag Manager if preferred through code injection but for that I will have to remove the build in google analytics code (classic analytics) which will result in loss of ecommerce data.
I need to know if there is anyway to enable cross domain tracking within the embedded google analytics code or maybe use code injection and use my own Google Analytics code (remove the embedded) and still get ecommerce data for Google Analytics.

Use same GA Account Number to send ecommerce tracking from 2 carts to same GA Account?

Client on same shopping cart platform has different carts and we would like to send ecommerce tracking data to a single Google Analytics Account from both carts. Can we simply use the same Google Analytics Account Number in each instance? Can ecommerce tracking be rolled up in this way?
Yes. You don't need two accounts.
Later if you want to see transactions that happened only on one site you could create an advanced segment for each domain and analyze them separately.
Another idea is to put the cart domain inside the Affiliation field of the transaction. This field is usually left blank but you can use it to store anything.

Resources