I have a WordPress website that uses Contact Form 7 and MonsterInsights for Google Analytics tracking. I want to track a contact form submission in Google Analytics as an event using the Universal code. I believe that I have correctly set up the event tracking code based on a review of the following sites:
https://www.kathirvel.com/universal-analytics-track-wordpress-contact-form-7-submission/
http://contactform7.com/tracking-form-submissions-with-google-analytics/
My code in my Additional Settings for the plugin reads:
on_sent_ok: "__gaTracker('send', 'event', 'Contact Form', 'Submit');"
Note that MonsterInsights uses __gaTracker. When I use the Chrome Tag Assistant to inspect what happens when I submit a form, it appears that the event is correctly tracked:
https://www.google-analytics.com/collect?v=1&_v=j47&a=1517116654&t=event&_s=2&dl=http://www.EXAMPLE.com/contact/&ul=en-us&de=UTF-8&dt=Contact Us&sd=24-bit&sr=1366x768&vp=1349x662&je=0&fl=23.0 r0&ec=Contact Form&ea=Submit&_u=SACAAUABK~&jid=&cid=1111924964.1481473656&tid=UA-CODE-1&z=1891409473
Hostname www.google-analytics.com
Protocol https
Path /collect
Hash
v 1
_v j47
a 1517116654
t event
_s 2
dl http://www.EXAMPLE.com/contact/
ul en-us
de UTF-8
dt Contact Us
sd 24-bit
sr 1366x768
vp 1349x662
je 0
fl 23.0 r0
ec Contact Form
ea Submit
_u SACAAUABK~
jid
cid 1111924964.1481473656
tid UA-CODE-1
z 1891409473
However, Google Analytics is not showing any events either under Real Time or Behavior.
I have reviewed the following but not found a solution:
Tracking in Universal Analytics - Contact form 7
JavaScript in Contact Form 7
Tracking in Universal Analytics - Contact form 7
Thanks in advance for your help.
I struggled with this for a couple of hours, same issue as you have.
Finally what worked for me was simple.
You have to match GA 'Category' and CF7 'Title'.
Screenshot:
https://digitalfactory.gr/wp-content/uploads/2017/04/contact_form7_ga.png
You might want to try the Contact Form 7 Google Analytics Intelligence plugin, https://wordpress.org/plugins/cf7-intelligence. It automates both submission tracking and goal creation without any coding.
Related
I have a number of sites that use Gravity Forms for their contact forms. Most sites are working fine/as they should and track accurately.
However, I have one site that it's tracking at all. I can't even see the events firing in the 'Real Time' tab in Google Analytics UA (GA UA). Other sites that track correctly in GA UA use text confirmation within Gravity Forms. This displays a script (as per most guides out there like this one) with the form ID which fires the event and gives the form ID to GA UA.
The site I'm having issues with uses a redirect confirmation (ties into a third-party CRM and then pushes back to a thank you page). I can't seem to set up goals (custom events or destination goals) to track this and all of the field mapping is correct, the events are just not firing.
I'm using the Gravity Forms Analytics add-on -- can anyone advise? Is there a simple way that I'm missing or a workaround to make this work?
I've tried using Google Tag Manager (GTM) to create the event and push through to GA UA with no luck.
Any advice would be appreciated!
I have an issue with GTM, Hubspot and ad platform tags. All my tags fire upon GTM submit, even though I have tested and debugged through GTM with the right ad platform tag so I would assume that the issue might not be UTMs, but the referrer parameter, that Hubspot Lps do not sent to GTM debug. Let me explain:
I have Hubspot Lp with Hubspot embedded form ( no manual UTMs, but some Automatic URL append for the Linkedin campaigns).
I have setup a custom event listener for GTM, just like in the below link:
https://codeandtonic.com/blog/how-to-track-hubspot-form-submits-in-google-analytics-with-google-tag-manager-2022
This custom event + custom trigger work perfectly.
I wanted to understand how would GAds tags + Linkedin tags + Facebook tags work with the same custom event trigger ( the one that pulls the form-name when the user successfully submits their details).
So I have created GA tags + Linkedin + Facebook tags that are triggered upon the submit of the form.
However, even though my LP is from insights.companyname.com all tags fire when the user completes the form submission process.
My latest discovery in terms of this tags behaviour is the fact that even though I have appended the utms to the linkedin ad that was running, and I have went trough GTM debug, all tags fire, no matter the UTMS that are appended to the link.
So I would like to know, how I can make only the Linkedin tag fire /only the GAds / only the Facebook tags to fire, while keeping my form submit trigger.
I need to mention that through GTM I cannot track Hubspot embedded forms without custom HTML tag, which, I assume can be customised to understand where does the user come from. Like a source/medium parameter that should be pushed forward in such a way that my tags fire only on the right referer (source/medium). Any help in order to customize this, either by event, by trigger or variables, would be amazing.
Thanks!!
I implemented form submission tracking with Google Tag Manager on my website. Whenever a form is submitted I got an email. It seems that maybe out of every 3 form submissions Google Analytics only records ~one event.
I tried to debug the issue using the preview mode in GTM. It seems that when I submit the form (making sure that the submitted form goes to a different browser window) I can see in the preview window that my form submission tag was fired, and I can also see the event in Google Analytics Real-Time / Events, so everything looks okay.
However if I leave the preview mode and do the same, I cannot see the form submission event any more in GA real-time.
My questions:
1. why do I not see the form submission when I leave the preview mode?
2. what would be the best way to debug the whole process to make sure that I will get all the form submission events in the future?
Thanks a lot for any hints?
W.
Much the same as this user, I've got a WordPress website with multiple forms often on the same page. My forms are created using Contact Form 7.
For example, when the 'Request a Call' form is completed, a data layer is sent using:
on_sent_ok: "dataLayer.push({'event':'formSubmit-RequestACall'});"
In GTM, I have a custom trigger set up as follows:
Here are the Tag settings:
Meanwhile, over in GA, I've set up the following Goal:
However, if I submit the request a call form and look at Real-Time goal completions in GA, nothing is showing. Is anyone able to advise where I'm going wrong please?
Thanks in advance.
Update: My Preview summary says the tag isn't firing. There's one tag firing, which is the one I'm using to measure overall traffic.
The DataLayer feedback is as follows:
Crikey! I've finally got to grips with it. In the hope of saving someone else the best part of a day, here are my settings, which work for me.
dataLayer.push (under 'Additional Settings' in Contact Form 7)
on_sent_ok: "dataLayer.push({'event':'formSubmit-RequestACall'});"
Google Tag Manager - Trigger
Google Tag Manager - Tag
Google Analytics - Goal
The verification as you can see in the last photo says it would expect 0% conversion based on last 7 days data. This is despite the goal registering in the Real-Time (last 30 mins) data, so I expect it needs 24 hours to register the goal properly.
No variable settings necessary. I now just need to repeat for the other forms, changing the event name for each (i.e. instead of formSubmit-RequestACall) to something unique.
Good luck!
For marketing purposes, if a link to our company website is posted on a page on an external website. Is it possible to track the time in which the user landed on the external website and clicked on the link to our company website, using custom tracking ?
I have been reading about custom GA tags however am having a hard time understanding how to make the above possible.
Thanks in advance!
You cannot track an external website, as you can only track sites where you control the tracking code.
If you have control over the external site and have implemented analytics tracking there you would
create a timestamp on page load
add an onclick event handler to the link to your site
in the callback function for that link create another timestamp, substract the original timestamp to get a duration
send a user timing call:
ga('send', 'timing', 'Link', 'Duration to click', duration);
Where the "duration" parameter would be replaced with your timestamp.
As I've said that would only work if you can run your own Google Analytics on the external site which does not seems very likely. Plus I have really no idea what you mean by "custom GA tags" (there are custom variables and custom dimensions/metrics, both of which will not help you here).
So basically the anwser is you can't, really.