Help w/ Google Event tracking w/ new Universal analytics.js
-
I want to implement Google event tracking after my visitors complete an estimate form. The form provides them an approximate range of costs based on their widget and widget amount.
I have the php coding done, but I don't know JS and I need to send an event upon completion of the estimate form. However, all of Google's examples are button click events. How do I send the event upon completing a form if there is no separate landing page?
If I have my Google analytics code on the page as well, would simply adding the following the completed estimate code work?
-
I have my new site and tracking live online. However, I can't find in analytics where this would report to! Perhaps it's not reporting properly...
-
That was a snap! Thanks for the great instruction.
-
Go Into Analytics
Your Account -> Admin -> Property -> AdWords Linking
It is very important that you have access to the Analytics as a main user and Adwords in the same account
should be easy from there click the button and authorize
Just to be sure
Adwords -> Account -> The Cog Icon -> Account Settings -> Linked Accounts
You should see your Analytics account if not give it 24 hours and retry
-
I created successfully created a new conversion goal in Adwords and created my dynamic value per https://support.google.com/adwords/answer/1722054?hl=en
I can't find any official documentation on linking the conversions in Analytics and Adwords. All I found was this 2009 article that is possibly no longer relevant. http://www.seroundtable.com/archives/019997.html
Any guidance on linking the two is very appreciated
-
If Analytics is set up with AdWords it will show up. But they have to be linked. Once they are linked in the Conversions section of AdWords there will be Import from Analytics which you would have to do but then it would count conversions from PPC
-
These events won't show up in Adwords for your PPC manager. But the technique you're using is not really weird, it's essentially the best solution to send this kind of data still to Google Analytics.
-
Hah! Yep...I just figured I shouldn't post it publicly.
Is it ok that I am reporting dynamic values for the events? These aren't completed sales (or I'd use eCommerce tracking), but have the potential to turn into one.
Will these show up in adwords as well for our PPC manager?
Thanks again all
-
If you replace UA-XXXXXX-1 with your own tracking ID then yes it is!
-
Wow! A lot of quick responses. Thank you everyone This is the last item before we launch our new design, so I'm excited to get it done.
Ok, so I modified the everything to be a bit more appropriate for my site for further clarity and listed it within the new analytics.js code. If the estimate is completed I would display the code below. Is this correct?
-
I agree, allow me to rectify with an edit. I too noticed that after the fact and died a little inside
-
You're right! I was more frustrated by the fact that your snippet was wrong as it was missing a comma + the PHP statement is not the most clear way.
-
Martijn,
I see what you are trying to do but by giving the Label a changing value you then make tracking it more difficult. You would then have to specify in GA when creating the event that the label contains 'nav buttons' not the default equals to.
Also you do have 4 values to work with
ga('send',{ 'hitType':'event', // Required. 'eventCategory':'button', // Required. 'eventAction':'click', // Required. 'eventLabel':'nav buttons', 'eventValue':4 });
-
Sean did a good first try on how you could include this on your page, however the code is not correct and will break it. What you're trying to do is send an event, but you only have 3 values you could provide. Not 4 as in both Seans and your example. The correct code would be: ga('send', 'event','button','click','nav buttons '); in this case the value will be added to the label of an event.
Hope this helps!
-
This is the Event Tracking for onclick related events
onclick="ga('send', 'event','button','click','nav buttons',);"
you don't need to specify the javascript you just put the code in the coding for the button
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
-
Strange landing page in Google Analytics
Hello MOZ Community, The website in question is https://x-y.com/ When i looked at the landing pages report in GA , x-y.com is appended at the end of every URL like this. https://x-y.com/x-y.com When i open the above URL in GA interface, it shows page not found. This is obvious as there is no such URL.
Reporting & Analytics | | Johnroger
The metrics like sessions, Users, Bounce rate all look good. In the property settings, The default URL is written like this http:// cell-gate.com (Please note that s is missing in property settings). But how is traffic tracked correctly How do i solve this problem. What settings should we change to make the landing pages report look ok Thanks0 -
Google Analytics Not Properly Attributing Goals
My GA has been working fine for years and is now suddenly attributing 100% of my goals/conversions to a "referral" source. In this case "crm.zoho.com". (see attached url) Our contact form is a zoho CRM form. When prospect fills it out online, it dumps them to a thank-you page and the conversion is counted. That all works just fine, but it is not attributing the conversion to Organic or PPC or Direct as it was a month or so ago. I'm not sure if this may be the cause, but I was cleaning up GA about a month ago, deleting some filters I didn't think I needed any more. Thank you for your help. 9CRUx
Reporting & Analytics | | sanctuary2420 -
Google Analytics - Tracking multiple thankyou pages?
Hi Guys, I want to track email opt-ins for multiple thank you pages. The setup is as follows: http://image.prntscr.com/image/57632e05a15f42fda0b8ffec2d176460.png I have not yet built the thank you pages, so i was wondering what the URL should be to make it easy to track them in GA? I'm thinking: domain.com/thankyou-page/page1 Then using regular expression in GA to track /thankyou-page/ Would this be a good way to go about it? Cheers. f6c7r0
Reporting & Analytics | | spyaccounts110 -
Complete loss of Organic visits within Google Analytics??
Hey guys, I have a pressing query that's really puzzled me! I've just been going through Google Analytics and noticed that there has been a complete drop off of all my organic visitors from May 7. All other traffic mediums are unaffected so there is no issue with the Analytics code recording visits. I haven't received any penalty and my rankings have actually improved in the last month. This is proper bizarre. Any ideas? MjLmL70.png
Reporting & Analytics | | Webrevolve0 -
Google Shopping tracking as organic traffic - help!
Hey guys, I have an eCommerce client who sometimes runs Google PLA and Google Shopping campaigns. However, we don't run his AdWords for him, just do his SEO. At the moment, the Shopping campaigns track as organic traffic within Analytics. And I can't see any way to change this! It's so infuriating. How do I change this? Thanks!
Reporting & Analytics | | jasarrow0 -
Best top 5 actionable insights from Google Analytics
Buongiorno from 14 degrees C cloudy wetherby UK 🙂 With a whole gamut of books out there are written around the topic of "Actionable Web analytics" where you have to wade through chapters of how to suck eggs and how to get analytics part of your business culture (whatever! most clients who look after their websites are entry level Marketing Execs who pay the digital agencies to do the thinking for them) I'd like to cut to the chase and list out say a top 5 of actionable insights a client would actually give the time of day for so heres my top five, whats yours? 1. Landing page bounce - showing them the £5k landing page designed with no conversion thinking is turning off customers
Reporting & Analytics | | Nightwing
2. Synching up PPC campaigns to analytics and showing them how much money they are waisting
3. Goal funnels - Showing them there 20 step shopping conversion funnel gets abandoned at step 3
4. Non brand keyword traffic (although a stack of this gets blocked by "not provided" Big groan...)
5. Event tracking on there 10 page carousel anner showing them no one clicks on banners 2 - 10 So under the strict label of "Actionable data only" from Google analytics whats your best insights you share with clients in the hope that they may actually give data reports the time of day! Grazie tanto,
David1 -
Setting up goals in Google Analytics
Hello! This question is seems so obvious that I'm also ashamed to ask... almost. If the goal of a website is to have a visitor complete a contact form, when setting up the Goal in Google Analytics (as a "URL destination") the URL of choice would be the form's thank you page, correct? Because that's the page that proves the visitor completed the task we want them the achieve. Right? Thanks!
Reporting & Analytics | | SmileMoreSEO
Erik0 -
How to devide Google traffic into local google traffic (.com , .uk , .cn etc) in Analytics
Hi, friends In google analytics , we can see search traffic from google, but is it possible to deeply see from which local google? eg: .com , .uk, .hk etc? Thanks alots
Reporting & Analytics | | topchinaseo
Boson0