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
-
Track PDF's in Google Analytics
Hi Mozzers, Is it possible to track PDF's via Google Analytics/Google tag manager? I'm not only looking for PDF downloads but for the actual activity when someone opens an interactive PDF document. So would it be possible to have onclick events on buttons in the PDF etc... Many thanks!
Reporting & Analytics | | WeAreDigital_BE
Sander0 -
Cross domain tracking Google Analytics
Hi there, Got a question on cross domain tracking: We have a couple of TLD's to serve localized content to our visitors, next to our main .com TLD where our app is running as well in a subdomain. Situation is this: Local sites:
Reporting & Analytics | | jorisbrabants
marketingsite.be
marketingsite.com.br
marketingsite.fr Main site: marketingsite.com
app.marketingsite.com Conversion gets triggered when somebody ends up in app.marketingsite.com/firstuse for example. People can sign up at the local site filling in their email but they end up in app.marketingsite.com/firstuse Reading this article on cross domain tracking I'm getting a bit confused on the setup of the tracking code itself. The sample code provided shows these two lines: ga('require', 'linker'); ga('linker:autoLink', ['maindomain.com','targetdomain.com']); Now the question 🙂 Is it correct when I think that maindomain should be replaced with our local TLD's on every one of those, and that targetdomain is where the conversion happens? In this case the .com site?0 -
Google Analytics Code
We have a quick question about our Google Analytics code: We recently updated to a re-marketing Analytics code, and some of our traffic numbers seem to be off by a bit. I used the Google Tag Assistant Chrome Extension today, and noticed that it's finding our old Analytics code on our pages, but it's coming up as an error due to "no HTTP Response". I am attempting to remove this code from the website, but it is nowhere to be found in the HTML coding. Only the current one is there. So I'm wondering if this second Analytics code is effecting our traffic and reporting, even if the code is currently non-functional? and if it is, how could I go about removing it if it's not currently in our HTML? Thanks!
Reporting & Analytics | | PlanetDISH0 -
Google Analytics Organic Search Keywords Suddenly Displaying FulL Urls
In my Google Analytics, the top keywords for Organic Search are suddenyl displaying full URLs. For example, now the third and fourth keywords are http://www.domain.com/highly-specific-URL. These have all started recently around the same day, July 12th. I've checked back, and we've made no internal changes to the site around that time that could affect this. Any thoughts on this? Thanks! P.S. It might be related to rich snippets, but I cannot tell at this point.
Reporting & Analytics | | 10SL0 -
Google Analytics and DNS change
Our new alumni application is going be tested at domain uva.imodules.com . We are going to collect traffic data with a Google analytics account number UA-884652-XX. So going to uva.imodules.com/myPage.html would send its data to Google Analytics with that account number. Then when it is ready for production we are going to just change the domain name of the application and switch the DNS over to dardencommunity.darden.virginia.edu . So going to dardencommunity.darden.virginia.edu /myPage.html would send its data to Google Analtics with that SAME account number. Aside from having the testing domain data in the same profile are there any other issues/problems we may run into?
Reporting & Analytics | | Darden0 -
Registration tracking with Google Analytics
Hi everyone, I want to track user registrations with Google Analytics for a customer's website. The thing is after registration visitors are not directed to a specific page, so I can't set it as a goal. I thought of tracking submit button with event tracking, but that data would not be true as a visitor may click it more than once, and there's the login with facebook and twitter thing. Before convincig customer to create a registration confirmation page, I want to make sure there's no other way as they don't want to make any changes to the current website. Any ideas?
Reporting & Analytics | | ugurcanuzer0 -
Google Analytics: Do url redirects show up
Good Morning from 6 degrees c mostly cloudy wetherby UK 🙂 A redirect has been set up with the effect that when you key in www.hyload.co.uk it forwards to www.ikogroup.co.uk My question is please...within Google analytics will referall traffic from www.hyload.co.uk show up in referral traffic or because its a redirect will it be counted as direct traffic. Thanks in advance, David
Reporting & Analytics | | Nightwing0 -
Google analytics
I updates all my google analytics accounts after the update and now i went to each campaign and it appears there is a problem and now if I reset it i loose history. Is this a glitch or a problem
Reporting & Analytics | | JAGlasvegas0