Contact Form 7 Conversion Goals Not Tracking - google-analytics

I am using Universal Analytics and have added the following code under the "Additional Settings" tab as suggested by dozens of articles including the one suggested by Contact Form 7's website:
on_sent_ok: "ga('send', 'event', 'Contact Form', 'submit', 'success');"
My Category, Action, and Labels all match set up in Goals. I have been testing this for hours and using various other methods on a different website but still no joy. I am not using any SEO or Yoast Plugins, and I have the Universal Tracking JS code installed.
Yet it's still not tracking. I can see it under Real Time Conversions, but it doesn't appear in Real Time Events nor Conversion Goals. What the heck could I be doing wrong?

After trying every code on the internets, I figured out how to simply set it up using Tag Manager! Obviously you have to have a GTM Account and paste the Tag Code on your website. Here's how to set it up:
Set up a New Trigger called "Form Trigger"
Choose "Custom Event"
Fire On, copy and paste this: gtm.formSubmit
Create Trigger
THEN ---
Set up a New Tag called "Form Submission"
Choose Product: Google Analytics
Choose a Tag Type: Universal Analytics
Enter Analytics Tracking ID
Track Type: Event
Category: Contact Form (or whatever, this will match the category name you set up in Goals in Analytics)
Action: Submit (or whatever, this will match the action you set up in Goals in Analytics)
You can add a Label and Value if you want, just make sure they match when setting up goals in Analytics. I just left them blank in both cases.
Fire On: click "More" and select the "Form Trigger" trigger you previously created.
Save Tag
Then just set up your Goals in your Analytics and test your form. In Reporting, I clicked on Real Time >> Events, filled out the form and BAM! I saw it right away and it recorded in Conversions instantly!
This was THEE only way I could get it to work. Works with sites with or without Yoast or whatever other SEO plugins. I hope someone finds this helpful, I tried EVERYTHING and this was the only way I could get it to work.
Cheers!

Related

Track VirtualPageiew Datalayer with GTM

This is my very first post on stackoverflow ever. I'm most likely doing something wrong....
I'm setting up some gtm on my site and I have a checkout page that doesn't change urls, so there is virtual page views that populate the datalayer at certain steps. I need some help how to track these events in gtm and how I can get them in to GA as page views.
I've tried to look for exact solutions but I haven't found anything that has helped me, so even linking to an article you think might help me would be awesome.
The datalayer looks like this and gets pushed at certain steps it would be /checkout 1, /checkout 2, /payment method, and finally /purchase.
Structured like this:
{
event: 'VirtualPageview',
page: '/Test/test',
title 'test | test',
gtm.uniqueEventId:25
}
Edit: I know how to set up an event to the virtualpageview, but not sure how to configure it to pas the information forward to google analytics, my goal is to make a funnel.
Just to make sure I'm answering the right thing: It sounds like you already know how to trigger an event during the checkout process, but you're not sure how to get that data into Google Analytics itself.
Assuming that what you want to see in Google Analytics is a new pageview for each step in the checkout process, you need to set the "page" field in the virtual pageview tag so that whenever it fires, it records a pageview.
In the tag, under "More Settings" -> "Fields to set", you can add "Field name": page and then set "Value" to whatever dataLayer variable stores /checkout 1, /checkout 2.

Google Tag Manager trigger on infinite scroll websites

I have a wordpress website that autoscrolls to next blog posts upon scrolling down infinitely and now looking for a way to count the next blog post load to register as a new pageview in google analytics which is setup in google tag manager
I stumbledupon this url http://www.howtofindit.in/how-to-call-tag-manager-code-in-infinite-scroll-website-pages/ BUT the article is poorly written and lack a proper step by step approach to follow without any confusion
Anyone know of a good step by step approach to follow to implement this?
so i can start tracking all blog page loads as pageviews in my google analytics
Just wanted to add that when the next blog post loads on the website i want to track, the page url changes to show the new blog post
so maybe that me be a good info to add here
Thanks
This article seems a bit outdated. While the suggested approach will still be working you should be able to solve this with the (relatively new) visibility trigger.
So you'd go to triggers, new, select "visibility", and as a selector you enter an element that indicates a new article - say if every blog post starts with a second level heading then you enter "h2" in the box for the selector. You need to set this to "fire every time", and "observe DOM changes" (if your posts are dynamically loaded, which they probably are).
Set up a Universal Analytics tag of the pageview type and connect it to the trigger. In "Advanced/Set Fields" you need to overwrite the "page" field (else you will get the same Url for each of your virtual pageviews). The properties of the last element that fired the visibility trigger will show up in the built-in "Click" variables (don't be bothered by the name, that's for historic reasons), so you could access the headline text in the "Click Text" variable (probably you want to format it to a more url-like format).
Save, publish, and you should be good to go.

Google Tag Manager. Tracking link click through a funnel

I had a question about Google Tag Manager. (I also felt bad for having the IT guy fix my mistakes on my simple click tag)
I wanted to track when a user enters a specific url when they click a link button on the homepage.
This is what it looks like
Image
This is my idea on what the Tag and Trigger should look like
Image
But I'm worried about having the trigger be fired when there is another page in the funnel
Also if the only way to do this is in the goal feature of GA that is good to know also. (I currently don't have the permissions here)
Thanks for responses
While it is difficult to achieve exactly what you're describing (it would involve storing data in cookies and then using these cookies to conditionally fire tags), there is a better way to achieve what I assume is your ultimate objective: an analysis of the shopping funnel.
Specifically, the Google Analytics enhanced ecommerce module has a dedicated report (the Conversions > Ecommerce > Shopping Behavior report) that shows you exactly this. It shows you the number of sessions for each stage of your shopping experience (product view -> add to cart -> checkout -> purchase) along with drop-off rates and volumes between each of these steps.
It is a little bit more involved to implement enhanced ecommerce but the final result is definitely worth it for an ecommerce business. Instructions for implementation of enhanced ecommerce (using Google Tag Manager) can be found here.
GTM is hit based without any notion of persistence. So by default this will not work.
You would need a custom HTML tag with a javascript function that sets a cookie, or writes a value to localstorage, when the button is clicked.
Then on your destination page you can check if the cookie exists and fire the tag accordingly.
I don't think the goal feature in GA can do that, either. A goal is registered when you hit a destination URL or event, you cannot specify conditions other than the destination.

How to track AdWords Form Click Conversion's using SquareSpace, Google Tag Manager and Adwords?

I've researched several sources to try and understand how to set up this up, but the documents found seem incorrect our out of date. I'm trying to achieve the following.
When someone submits on my 'contact us' form, I'd like to track that as a conversion in AdWords.
I've completed the following:
- Set up the Conversion in AdWords
- Added the Google Tag Manager code to Squarespace and validated it works
I'm struggling to understand what needs to happen next, I believe it is something like:
- Create a GTM AdWords tag and add in AdWords Conversion ID and Conversion Label
Set the trigger as a form submission
Do I then need to add some form of code into Squarespace on the contact us page to pick up the trigger? this is the part I'm stuck on.
Any guides that explain this in full would be great.

GTM & Contact Form 7 - goals not being logged

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!

Resources