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
-
The code you have added just tracks page views, so far, so you will need ti track the button with an event and then in GA you can define a goal by these parameters in the event you have just created
-
Hi David,
Thank you so much for you help. I have just a couple of quick questions.
We have put the code in here:- http://www.dfrsolicitors.co.uk/contact.php does this look right? and in terms of GA what special thing to do I need to do to start counting goals via the "conversion" tab. Obviously if I set the goal as contact.php it will only record people coming to the page not submitting the form.
Kind Regards
Neil
-
As long as your analytics.js is across all pages including the contact.php you dont need to put in th UA
for the inline one it would look something like
as for the query it would be something like this
and then ad the jquery before the end of the document
-
Brilliant!! Exactly what I was looking for. Where would this go and do I need to put my UA number in?
-
something like this?
onsubmit="ga('send', 'event', 'Form', 'Submit', 'Contact')"
or by jquery
jQuery(document).ready(function ($) {
$('#formsubmit').on('click', function() {
ga('send', 'event', 'form', 'click', 'contact');
});
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
-
Query on Not Set In Product List Performance in Google Analytics
Hi All, I have query for given below screenshot-1. What is Not Set here? For column no. 2 only purchase and revenue showing other column blank why? I have properly implemented enhance ecommerce via tag manager. And my product list impression, clicks all working fine for all categories now I don't know from where I am getting Not set - Please check screenshot-2. So what is Not set here? Thanks! QcBGT OCrEp
Reporting & Analytics | | Arnold30 -
Google Analytics direct traffic dropped by 50% after switching to https
Hi, everyone, have a little dilemma and was hoping to get some advice here. I recently installed a new SSL (3 months ago) to force our URL to start with https://. The site was earlier accessible through https:// and http:// prefix however now I have made it so that all urls are redirected to the correct https:// version. The problem is that direct traffic has dropped by more than 50% after implementing these changes and I can for the life of me figure out why. Why would the direct traffic drop all of sudden after making these changes? I am starting to suspect that the earlier data was inflated and that Google analytics was counting users coming from a http:// version of the URL to a https:// version of the URL was counted as direct traffic. Could that be it? Any other possible causes? Would really appreciate any guidance on this problem. Thanks
Reporting & Analytics | | nsereke0 -
The best way to track internal links in Google Analytics
Hi there, we are a retail business and we have invested in quality editorial content which sits in our Blog at ourwebsite.co.uk/blog/ The Blog links to the main site (an online store) and I want to track the 'value' of the blog by how many clicks the blog content generates back to the main store. At the moment we're using this code on the end of every link in the Blog: ?utm_source=Blog&utm_medium=Widget&utm_campaign=FromBlog Does this affect SEO and is there a better way of doing it? Thanks.
Reporting & Analytics | | Bee1590 -
Google Analytics Average Position
I'm looking at Google Analytics -> Acquisition -> Search Engine Optimization -> Queries reports. I'm looking at keywords and the average position. What Google reports and what I see in a Google incognito search is different (usually my search is much lower). For example, for one search term, Google reports 5.8 average position and every time I search it is 8. My local result is 4. Anyone know why this is? I'm wondering if Google is averaging the Local results into number?
Reporting & Analytics | | CalicoKitty20000 -
Google analytics Goals and Funnels??
Hey - how's things? I've got 2 goals setup, each of which use the same thank you page but with different required funnels. The results have been identical for the last few weeks - which tells me I've got something wrong!! The first goal has a contact form on every page in the /products/ directory set up like this:
Reporting & Analytics | | agua
destination equal to: /thanks-enquiry/funnel step1 page: ^/products/.* required: yes The first goal has a form on 1 page called /on-sale set up like this:
destination equal to: /thanks-enquiry/
funnel step1 page: /on-sale required: yes Any ideas?0 -
Domain Sub folder tracking from Google webmaster tool
I have created separate google webmaster access for this sub folder http://lineonebus.com/content/ Original domain http://lineonebus.com/ Search results in webmaster shows no search queries though this subfolder created in wordpress is ranking for some keywords.
Reporting & Analytics | | csfarnsworth1 -
Is Google analytics not working properly anymore?
Hi mozzers, We launched a website 2 months ago and when monitoring Organic data on GA we had an average of 23% bounce rate like a month ago but the last 2 weeks I noticed that bounce rate=0%. This is very weird especially that we haven't modified the existing pages and that multiple keywords show an average site duration of 0 seconds. Any thoughts about this discrepancy? Do you think that there is an issue with the GATC implemented? Thanks
Reporting & Analytics | | Ideas-Money-Art0 -
Setting up Google Analytic Goals to a 3rd Party Site
I recently received help on a question I asked on SEOmoz but need additional clarification. I am trying to set up goals in Google Analytics for people who click on a “purchase botton” which sends them to PayPal. I created a Thank You page and tried to get PayPal to redirect to it, however, our customers only get to our site’s 404 page. Here is what I’ve done so far: Went into my PayPal account and turned the “Auto Return” to ‘on’ Under website payment preferences, I added the following URL http://www.teecycle.org/thank-youutm_nooverride1. (I formatted the URL this way because the person who provided me with help recommended using the format ?UTM_nooverride=1. However, our CMS system won’t allow “?” or “=”)
Reporting & Analytics | | EricVallee340