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
-
Moving our Google Analytics Account to a New Account
My company is building a new website with a new web development company. Our old website development company hosted our Google Analytics account on their account (this was done 13+ years ago, probably a good idea then, but we definitely would've done it differently knowing what we know now). I've been researching how we could move our GA property to a new account owned by us, but according to this article: "There are some circumstances in which you cannot move a property:
Reporting & Analytics | | GreatLegalMarketing
-> The source account and the destination account are not in the same Google Marketing Platform organization. Contact an organization admin to make sure both accounts belong to the same organization." In our case, the source account and the destination account do not belong to the same organization. I may just have to accept that we are losing 13+ years of historical data about our website, and if that's the case, oh well. But, if anyone has an idea how we can export/import our GA data to our new analytics account, I would greatly appreciate it.0 -
How can I overwrite previously imported cost data in Google Analytics?
I choose the overwrite option but it keeps adding the costs to the existing costs. When i select that radio button and click done, that option does not appear on the summary screen. That section next to Import Behavior is blank.
Reporting & Analytics | | JGB5550 -
In Google Analytics, what is the correct format for excluding traffic from single IP address?
In the past, when we've setup a filter to exclude a single IP address, we just entered the IP address normally. For example, 64.68.82.164. However, I was researching how to exclude a range of IP addresses and found out that I might be using the wrong format to filter a single IP address. Is it supposed to be 64.68.82.164 or 64.68.82.164? Will it still work if it was entered without the escape characters? Thanks in advance Moz community for your assistance!
Reporting & Analytics | | peteboyd0 -
Google Analytics: How to Track Blog Traffic that Enter the Purchase Funnel?
I've been trying to figure this out for awhile, but I have had no luck. The current ecommerce store that I work for is trying to find out how to track how many people coming in via the blog are converting/buying. The site lives on Magento and the blog is on wordpress and they both use the same Google Analytics code. Site URL: http://website.com/ Blog URL: http://website.com/blog Is there anyway to do this so you can see which landing pages are driving conversions? If not, Is it possible to set up Google Analytics to show conversions and revenue coming from people who enter through blog directory?
Reporting & Analytics | | Erik-M0 -
Conflicting numbers in Google Analytics
I am getting 2 completely different numbers in Google Analytics.According to the graph on my Dashboard organic traffic decreased ~40% comparing June 7 -> June 6.However, when I dig a bit deeper and look at the 2 dates specifically compared to each other I get a `3% increase in traffic.When I look at the traffic on just June 7, I get the number indicating the increase.Any ideas or someone getting similar conflicting numbers??
Reporting & Analytics | | theLotter0 -
On google analytics what is Mozilla Compatible Agent under browser and OS?
On my Google Analytics (I know this is not SEOMOZ) I have a lot of visits from mozilla compatible agent with 100% bounce rate. Does anybody know what this is?
Reporting & Analytics | | essentialworld0 -
Setting up Google Analytics for Subsites
I currently have one main .com site and am planning on launching geo-location subsites .co.uk, .com.au, .ru, etc... Traffic will flow between both sites and some of the content on the subsites will be duplicate and therefore include a canonical tag to the main site. I want to set up GA to capture who is going to the subsites and vice versa and correctly capture crossover traffic. Any advice on implementing advanced analytics directly (or links to sources that will direct me the right direction for this project)
Reporting & Analytics | | theLotter0 -
Keep multiple Google Analytic / Webmaster accounts seperate?
Hi, I have a paranoid suspicion that putting all my websites on one Webmaster / Analytic account will mean any links between my sites won't carry any weight, and Google might consider similar content much more readily if 2 of my sites are in the same market. So I have about 4 different accounts with my main sites split across them. Am I being over paranoid? Do any of you have any problem with all your sites being on the same account?
Reporting & Analytics | | SpecialCase0