Custom events and parameters not visible in GA4 - google-analytics

We are pushing the events and parameters through below code -
dataLayer.push({
event: "Login - Page Load",
eventModel: {Flavour: "ABC", Country ID: 123, Country Code: "ABC", send_to: "GTM-XXXXX"},
gtm.uniqueEventId: 123
})
However, i don't see events in GA4. I have around 20 custom events configured in the code with parameters. How do i see these events and parameters automatically in GA4? I see them in Google Tag assistant in debug view. Do i need to set tags and triggers for each of the 20 events in Google Tag Manager?
My Expectation was that by setting events in the code and calling GTM id on every website page, events will automatically show up in GA4. Tag manager has only 2 tags created one Events tag for All elements trigger and container tag for GA4 configuration.

Related

GTM & GA with a NextJS app pushing multiple events for a single event

I am using NextJs with Google Tag Manager, and GA but I am seeing multiple events for a single event.
I am using react-gtm-module to manage the GTM code, then GTM to add the GA tag.
I then use react-tracking to push events to the dataLayer. I've tried using the dataLayer directly and get the same behaviour.
So for example:
<Formik
validationSchema={schema}
onSubmit={(values) => {
trackEvent({
event: "valuation_requested"
});
}}
>
I then have GTM setup to handle this using a trigger for the specific event:
Then I have the tag setup as follows:
However, after going live I see double reporting of events per user.
On the preview for the GTM container I see the following:
However, on the GA container I see the following:
So it looks as though that's the reason for the double events, because the GA container fires multiple events - I'm just not sure why at all.

Zoho: Forms: Google Tag Manager events not firing

I have a form hosted by Zoho Forms that is embedded onto my website using an iframe.
The zoho form has a custom domain, setup as follows:
My website: example.com
Zoho Form: forms.example.com
Using Google Tag Manager (GTM) I'm trying to fire a Google Analytics 4 (GA4) event when someone submits the Zoho Form.
Zoho allows me to add the GTM container ID to my form. They also push data layer variables such as zf_submitform, zf_formview, etc.
So I have added my GTM container ID to my form, configured the events, and setup a trigger on GTM. But the tags are never triggered.
For example, I create a Tag that should fire a GA4 Event when the zf_submitform event is triggered. But it doesn't fire.
Even when I view the form directly in it's native URL (not embedded into my website) the event will not fire.
Also, when debugging it using GTM Preview, it has a green "tick" symbol next to the firing trigger. But the Firing Status is "Not Fired". So even their own debugger thinks that the tag should have fired, but it does not.
Here are some screenshots of that setup to show you what I have tried:
What am I doing wrong?
The Tag:
The Custom Event (zf_submitform)
The GTM Preview Debugger
I have just discovered that Zoho Forms includes an allowList in their dataLayer variable.
This means only tag containers matching the allowlist will be fired.
Here is an example of the datalayer showing the allowlist:
{
gtm: {
allowlist: ["gas", "ua", "v", "c", "e"],
uniqueEventId: 9,
start: 1630545428319
},
event: "zf_onclickfield",
zf_category: "Zoho Forms",
zf_field: "Name",
zf_page: "",
zf_action: "Onclick Field",
zf_formname: "Contact Us Form"
}
It is understandable that they have an allowlist on their container, to avoid people running custom code on their forms.
But it needs to have the new GA4 Config and GA4 Event tags added to the list for them to work.
I have sent them a support request asking them to add gaawc (Google Analytics 4 Configuration) and gaawe (Google Analytics 4 Event) to the allowedlist but they are dragging their feet.
If you are using Zoho Forms and having problems with your own Google Tag Manager setup: Check the datalayer and it's allowlist. If it does not have gaawc and gaawe then it means Zoho has not yet updated their GTM integration. In that case can you please also message Zoho support with a link to this answer, asking them to update the allowlist ASAP. The more people who request this change the faster they will act.

Google tag manager events not appearing in google analytics

A client has requested that we implement google tag manager on to track submission of all the forms on his website. We have set up all of the tags and triggers per the instructions that we found online but it appears that only 1 tag is actually working. We the Solids Conveying Case Studies event appear in the behavior > events> overview screen of analytics but not in the Real Time screen. All other tags do not appear to fire at all. We did view the preview/debug mode and see what appears to be a glimpse of a tag after the form submits and the page reloads. Also during our debugging process we tried setting the action to trigger on the form id, and we tried checking Wait for Tags. Any assistance would be greatly appreciated.
Here is a link to the website: https://foxvalve.com
Here is an example of a tag that we set up.
Tag Type: Universal Analytics
Track Type: Event
Category: Air Gas Ejectors (Different Depending on the Form)
Action: Submit
Label: Form
Value: empty
Non-Interaction Hit: True
Google Analytics Settings: Google Analytics Variable
Trigger Configuration
Trigger Type: Form Submission
Trigger Fires On Page URL equals (the page URL of the form)

Funnel Setup in Google Analytic through Virtual pageview tag in GTM

I need help in creating a Goal with funnel into a Google Analytics for New Registrations using virtual pageview tag on GTM.
I am not sure what trigger should be use for this tag? Tag is here:
Can anyone help/guide me to setup a trigger?
You will need to push your own custom event on the dataLayer every time a "virtual" page is shown. You could do this as follows:
dataLayer.push({'event' : 'virtualPageview', 'virtualPageName' : 'virtual/registration/complete'});
You would then create a GTM trigger of type Custom Event and the name of the event would be virtualPageview. This will cause your Google Analytics page view tracking tag to fire every time a virtual page is shown. You would also need to pass the value of the virtualName dataLayer key to the GA page view tag. You can do this using the "Fields to Set" section of the tag configuration as follows:
. The Virtual Page Name variable would be defined as follows:
Then, when defining your goal funnel in Google Analytics, you would enter some/virtual/page/name as the funnel step as follows:

Google Tag Manager - Enhanced Ecommerce and ajax

In my product page detail, i have a crosselling section which loads a product list when user scroll down. I can trigger a custom event when products in this section are loads (like productsDowloaded).
How can i send product impressions with google tag manager ?
Implement the data layer following these specifications to track product impressions. If you are sending the data asynchronously, push an event to the data layer (eg: event: 'crossSellReady') and fire your custom event GA tag with a rule based on event = crossSellReady. In the custom event tag, make sure to enable enhanced eCommerce tracking, and the tag should automatically pick up the product impression data contained in the data layer. Let me know if you encounter any issue.
When the page is first loaded the first batch of cross sell products are pushed to the dataLayer as impressions and a GA pageview is sent. The GA pageview is a simple GA tag that is fired after the page is loaded.
After that, when the cross sell products are loaded asynchronously, i.e. whenever the user scrolls down, only those products are pushed to the dataLayer and a custom dataLayer event is fired in the success handler of the ajax request. For example:
// Inside Ajax success handler...
dataLayer.push({
'event': 'Custom'
'eventCategory': 'ecommerce',
'eventAction': 'ajax-load'
'eventLabel': 'cross sell'
});
You create a separate generic GA tag that sends events and is fired when the Custom event is pushed to the dataLayer. Inside the generic GA event tag you set all the of the following macros which are of type dataLayer variable:
{{event category}} -> eventCategory
{{event action}} -> eventAction
{{event label}} -> eventLabel
You can also add a nonInteraction macro in the generic GA event tag as well. Your use case, in my opinion, is considered a user interaction (user scrolled down) so the nonInteraction macro should not be set.
If you are using product lists, be careful of the positions of the cross sell items. Whenever those products are asynchronously loaded, you should note down their positions so you can track their positions in the product list tab of the GA dashboard correctly.
P.S. The generic GA event tag has multiple benefits, you can find more information about what I'm saying by reading the relevant article in Simo Ahava's blog.

Resources