Google Analytics/ Contact 7 Plugin
-
I have a site that uses the contact 7 plugin for its contact form sitewide in a sidebar and on a contact us page.
I've set up a goal in analytics and tracked using the "on_sent_ok" hook but the number of goals GA is creating is far outweighing the number of times the form is actually completed.
I figured my initial mistake was to use the contact-us page as the page tracker variable for the goal but wondered if it was counting all form completions AND anyone who went to the contact page.
So I amended it to a contact-us/thank-you page that no site visitor could navigate to, and since I have no goals completed, even though we're getting enquiries through the form.
Am I being dumb here and missing something quite simple?
-
Ah just noticed I have all code on 1 line so
on_sent_ok: "pageTracker._trackPageview('/company.com/contact-us/thank-you');"
should it actually be...
on_sent_ok:
_"pageTracker.trackPageview('/company.com/contact-us/thank-you');"
-
Hi SSC Davies
Yep, I have it set up just like that (I think I probably referenced the same page of content you've pasted in here when looking for the correct hook )
I'm not massively knowledgeable on javascript, but would other javascript on the page affect the function of the hook?
-
Hi Gareth,
using on_sent_ok should not be padding the numbers. Do you have it implemented as seen here :
JavaScript Action Hook:
on_sent_ok
Sometimes you might think of running custom codes after the form has been submitted. For example, you may wish to run Google Analytics’s tracking code for tracking their visitor’s usage of the contact form and counting it as conversions.
The new JavaScript action hook would be useful in such a case. If you have a JavaScript code you wish to run after form submission is completed successfully, simply insert the code into the Additional Settings section (which is new in this version and is placed at the bottom of the admin panel) with preceding
on_sent_ok
keyword, like this:Note that you need to quote the codes properly; and the code must be in one line.
To show you a more practical example, if you want to insert Google Analytics’s tracking function, enter it like this:
on_sent_ok: "pageTracker._trackPageview('/funnel_G1/step1.html');"
-
You're on the right track with where you are at now. You are setting up contact-us/thank-you page as your goal page, right? Well, is it possible that your form submission php script is taking people to this page and it is different than your other pages? As in it is just a line of text saying thanks?
If so, you may want to edit the form submission php code to include your Google Analytics code. Perhaps you aren't seeing any goals because the page they land on after submission simply doesn't have your GA code on it to count the completed goal. That would be my best guess.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
More 'New users' than 'Users' in Google Analytics
Hey Mozzers, I'm seeing more 'New users' than 'Users' in Google Analytics (see screenshot). This is over a 3 year time period. Any idea why new users would be greater than users? Thanks! 6lYmU0j
Reporting & Analytics | | RWesley0 -
Google Analytics & Google Sheets
Hi guys, I'm looking to use google analytics google sheets extension to pull data into a google sheet with metrics from other tools e.g. semrush, moz, etc. From my understanding with google analytics google sheet extension its designed to run reports and doesn't really allow you to add other metrics. Basically what i'm trying to do is this: https://www.useloom.com/share/c1e42bfa60bd46fca2b1120018969ce8 Any suggestions/advice on how to do this would be great. Cheers.
Reporting & Analytics | | jayoliverwright0 -
Google Analytics Automated Reporting
HI all, I tend to do a big reporting powerpoint deck using screenshots from google analytics and tables I create year end and mid year. It's like an 80 page report for the 10 webisite swe have and then I go ahead and make annotations as I see from the data. That being said this can take a lot of time, up to a 40 hours of time to pull it all together or more which is challenging when you have daily meetings. Anyhow, I've looked into automating and tried a couple things: 1. Tableau- but it keeps crashing and seems tedious 2. Dashlane and supergrabber- seem a bit tedious to set up too. Anyone have ideas on how to better shar ereporting in the organization in this type of format for a website (websites)? Organic, paid, traffic, etc. Laura
Reporting & Analytics | | lauramrobinson322 -
Google Analytics Event Tracking
Hi Guys, I want to set up a goal in Google analytics for this site http://www.dfrsolicitors.co.uk/contact.php and the contact us form is in php (so there is no thank you html page). I know there is a piece of code "onsubmit" or whatever it is, but I can't find it. I want to be able to track successful submissions. Kind Regards Neil
Reporting & Analytics | | nezona0 -
Can you arrange Google Analytics source/medium traffic by percentage change?
I'm doing a year to year traffic audit for a client. I would like to analyze Google Analytics source/medium traffic by percent change. Is there a way to do this? Do I have to create a custom variable? 9BH70RO
Reporting & Analytics | | VanguardCommunications0 -
Google Analytics Showing Inflated Product Revenue
Hi- For the month of Feb on two of our sites we are seeing inflated product revenues. I have not seen this before and I am not having any luck searching for answers. Here is the issue: Product B sells for $159.95 For the month of Feb we sold 3 thus revenue should be ~$479.85 GA is showing Product B's revenue at $3,360.00 I read online that sometimes folks will bookmark the receipt page and that can cause this and we would need to put a catch in place for this but I am guessing this is not the case as it is happening on two sites. Please let me know if you have any questions.
Reporting & Analytics | | K2_Sports0 -
Google Analytics Goals are not recording
Hello! I've set up Goals within Google Analytics and they aren't registering. I'm wondering if someone can review what I've set up to see if I've entered something wrong. I'm trying to track enrollments. Here's the site info: Enroll URL: http://www.careplusdentalplans.com/individuals/enroll-careplus/ Upon completion, the user goes to a Thank You page and our CMS generates a trailing URL parameter. For example: http://www.careplusdentalplans.com/index.php/individuals/enroll-careplus-thank-you/#123456789 My Goal info in GA: Goal URL: /individuals/enroll-careplus-thank-you/
Reporting & Analytics | | SmileMoreSEO
Match Type: Head Match (to disregard trailing URL parameter)
Goal Funnel: Step 1: /individuals/enroll-careplus/ I'm curious if the problem lies in either: The URL: Notice how the URL adds /index.php/ on the thank you page. In that case, should I enter the full URL in the Goal instead of the truncated URL? The Funnel: Is it necessary to show the initial Enroll page or if I'll see that in the Flow Visualization regardless? Thanks in advance for helping me out. Erik0 -
Should you get a new Google Analytics account if your site has a new domain after a site redesign/new development?
We recently developed a new site for a client and they have opted to move forward with a domain change. Should we create a new Google Analytics account for the new site?
Reporting & Analytics | | TheOceanAgency0