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');
});
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
-
Google Analytics - Dashboard Question
I'm looking to set up a dashboard widget in Google Analytics that does the following but can't : Shows traffic sources in a table as the dimension, and wanting to show goal completions to a specific product page and then only show what the average time spent (by source) on just those product pages. It looks like it's showing the whole session duration for the entire source, but I want to create a secondary filter that is only showing the time spent on those specific pages. Can anyone help - or is this possible? Thanks all!
Reporting & Analytics | | ReunionMarketing0 -
Is there a way to find out who the admin of a Google Analytics account is?
We have a client who has been searching high and low to gain access to the GA account that is tied to their website, but previous agencies keep stating they don't have access. Is there a way to find out who the admins are on a GA account with the tracking number so we can reach out to that person and ask them to admin the client?
Reporting & Analytics | | marketingmediamanagement0 -
Google Analytics Custom Alert For Goal Completions?
Hi currently setting up custom alerts for a website. I want to do a custom alerts for when goal completions decrease or increase by a certain % e.g. 20% as shown in the third example from this Moz Article back in 2012 - http://moz.com/blog/7-essential-google-intelligence-custom-alerts-that-keep-me-sane However when i go into my GA account the only options seem to be for when the goal completion conversion rate % drops. I could use this, but i rather do just based on completions rather than %. Any ideas on how i can do this? Thanks.
Reporting & Analytics | | MBASydney0 -
Analytics not tracking traffic from Old Domain Redirect
We've recently 301 redirected one of our client's domains to their new website and the strange thing is, we aren't seeing an increase in traffic in analytics. You would expect the traffic to increase roughly by the traffic volume from the old domain. There were a few hundred redirects and we tested a large sample and the redirects have been implemented properly. Is there something that we did incorrectly in our implementation of the domain redirect? Or is there something else that we need to do in Analytics to properly track those redirects?
Reporting & Analytics | | ATMOSMarketing560 -
Where does the organic keyword information come from in Google Analytics?
I know that Google switch to all encrypted search, but I still show some keywords. Are those keywords that slipped through? Or are they all from Yahoo/Bing?
Reporting & Analytics | | EcommerceSite0 -
Google Analytics & Omniture Discrepancies
I am seeing a significant difference between my traffic numbers in Google Analytics and Omniture (Omniture has significantly more). I do not expect them to report exactly the same numbers but these are just too far off. Any idea why that is, or which one I should trust more? Thanks!
Reporting & Analytics | | emediaSEO0 -
How can I track search engine optimization data in Google analytics?
My website is linked to a Google Analytics web property. But, I am not able to track search engine optimization data in Google Analytics. So, How can I get it done?
Reporting & Analytics | | CommercePundit0 -
Google analytics advanced segments
Ok, I need help with a simple (although, for some reason, I'm having trouble with it) advanced segment. Dilemma**:** All of our techs have a backend cookie that they use to log into our website. I want a way toexclude all visites where the landing page contained this in the url:/backend/cookie.php?username= Advanced Segment: We have a lot of techs and each one of them has a different "username=example". So how can I set up an advanced segment where it will exclude any visit where the visitor came in one a landing page containing /backend/cookie.php?username=
Reporting & Analytics | | NerdsOnCall0