Google Analytics: Event not triggering conversion goal - google-analytics

So, I have an event firing when a mailto link is clicked, which is working fine:
Then I added a goal, with the properties of the event. (I should probably mention this was already in place, I didn't just add it after firing the event). I successfully verify it should work:
...But the conversion goal just isn't getting hit:
Screencast here: https://youtu.be/VClrTtVeizw
Am I doing something wrong? The fact it verifies makes me think not but I'm not a seasoned Analytics user so any advice would be great.

Related

Custom Event Tag not firing in GTM

Completely new to GTM and having trouble getting ecommerce conversion tracking to work on GA4. This is what debug mode looks like in GTM the tag doesn't fire. Does anyone know what could be causing the issue?
Have research all the possible reasons, checked the source code, spoken with the developer who added the GTM container to the site, reviewed the tag itself but still none the wiser.
Look at the trigger is waiting for a datalayer event : add_to_cart.
So you need to ask the developer to push a datalayer event with ecommerce item when user successfully perform an add_to_cart event.
Here is the detail about all ecommerce event and its datalayer.
https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm
You have done half of the job. The there is still another part need to be done.

GTM UA Tag - Track Page Views using All Clicks OR All Pages as triggers

I'm still learning GTM, so please forgive me if this is a basic question. I've been researching but can't find anyone with a similar issue.
What I want is simple: to set up GTM to track page views in UA. (Easy enough.) But I looked at the setup of my predecessor, and he had the UA tag set up like this:
Tag Type: Google Analytics (UA)
Track Type: Page View
(GA ID)
Triggering:
All Clicks (All Elements)
OR
All Pages (Page View)
I'm trying to understand why they set it up with the All Clicks trigger. What I fear is that this is recording a page view every time a click is recorded, but I can't imagine my predecessor would have created a strange setup like that. I'd just as soon eliminate the All Clicks trigger, but I don't want to harm any of our future data without fully understanding. Bottom line question: is there any good reason for this tag to be set up this way, or is it wrongly inflating my numbers? Thanks in advance for any help.
It's kind of weird.
If the tag is for tracking pageView. The trigger should only be all page.
Still there might be 1% that your predecessor really knows what he or she is doing.
Maybe you can share the website and we can check if it is abnormal or not.
Update about the click trigger
The website is firing "Pageview" when click the link.
You can change the GA tag from pageview to event and set up like this
Category : click
Action : link_click
Label : {{the click Url}}
Then you can see which user is doing pageview and who clicks the link.

Why GTM server container duplicates intercepted GA4 client events?

I have server-side tracking implemented using Google tag manager.
I noticed duplicate events coming in but not because my GTM web container sends duplicate events (verified in debugger).
The GA4 client in my GTM server container receives two identical event calls, for no obvious reason. The only difference is the param _s:
https://www.google-analytics.com/g/collect?[...]&_s=1
https://www.google-analytics.com/g/collect?[...]&_s=2
I've dealt with this by creating a query parameter variable:
And then excluding all calls where the _s param equals 2 from my GA4 event trigger:
This solves the issue but seems like a hacky solution.
I wonder why two identical server events get triggered in my GTM server container, for a single GTM web event, in the first place?
I had a similar problem, and I couldn't solve it by filtering the parameter because it happened later (I think the params of the two events were _s=6 and _s=7).
I started looking for blog posts until I've found this one: https://www.thyngster.com/google-analytics-4-events-demystified-ga4. The suggestion that helped me was this one:
You may see events being fired on the browser that you didn't define on Google Tag Manager or GTAG. This is normal, don't go crazy with it. If you see a duplicate event or a new event that you don't know where it's coming from take a look at the Data Stream Settings
And, in fact, inside Data Streams was the solution to my problem: under Events settings > Create Events, someone had created a custom event based on the same name as the one I was firing through code, in my case it was add_to_cart.
Disabling the custom event solved the issue.
EDIT
I forgot to mention that the first way of debugging this issue was to check the value of the dataLayer variable in the browser console. This variable keeps track of all the events, together with their send_to attribute. Before looking into the analytics dashboard you should check whether you are sending duplicate events from the code and whether you are firing other events with the same name but without the correct send_to attribute, which will result in two events with the same name firing to the stream you are tracking.

How are the Firebase analytics events in_app_purchase and app_store_subscription_convert being fired?

I am trying to verify that these events are triggering at the correct step in our funnel with the right parameters but there's little documentation on how to figure this out.
According to this documentation https://support.google.com/firebase/answer/9234069?hl=en&ref_topic=6317484 there should be a free_trial parameter on in_app_purchase but we're not receiving this property.
I've tried looking for the source code but according to this link, the analytics package is not open source.
Any insight into these two events or where to learn more about how they're fired would be appreciated!
Information from these docs gives good insight as to when the analytics events are fired.
You can additionally fire events manually, both built-in events or define your own custom parameters.
After instantiating analytics, you can call
logEvent(‘event_to_log’, {content: “you wish to log”})
place this wherever you need in your call stack and it will manually fire accordingly.
Additional information here.

Google Tag Manager: Calling dataLayer.push after validating the form

I want to call below code (Google Tracking code) if the form is validated successfully.
onclick="dataLayer.push({'event': 'NewsletterSignup'});"
If I add it to "onclick" event, it fires every time without considering the validation.
please let me know how should I call it only after validating the form. I searched in Google Tag Manager developer guide but could not find any help regarding this.
Please advise.
I think all you need is to change your onclick handler to include the validation. Something like this:
onclick="function() { if(validate_form()) dataLayer.push({'event':'NewsletterSignup'}); }"
I'm not a Javascript programmer so I hope that's the correct syntax. All I've done is to introduce the validation check into the onclick. If the check passes we push the event to the data layer (I assume that validate_form() returns a boolean).
Your idea of firing the tracking code on the new page after the form is submitted is another possibility. That could work. You could just add a rule in GTM for that tag (tracking code) that causes it to fire on the new page (assuming that the only time that the new page is loaded is after a newsletter signup has occurred).
I think using the onclick handler above is the simplest solution.

Resources