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
-
GA Event: to use this feature visit: EVENT-TRACKING.COM
Hi guys, Two days ago our Google Analytics Event tracker began to show this Event/Label, etc. I cannot find its source. Anybody knows what is this about? Thanks for your answers. Ana
Reporting & Analytics | | anagentile1 -
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 -
Regular Expressions in Google Analytics
Hi All I've been struggling to create a regular expression for a Google Analytics goal step that would match the following: ^/specifictextstring/anytextstring/anytextstring/
Reporting & Analytics | | Cabbagefeet
^/specifictextstring/anytextstring/ However I don't want it to match any URLs that end with: /anytextstring**_**phonecall or /phonecall, for example: /specifictextstring/anytextstring/anytextstring/anytextstring**phonecall
/specifictextstring/anytextstring/anytextstring**phonecall
/specifictextstring/anytextstring/anytextstring/phonecall
/specifictextstring/anytextstring/phonecall Does anyone have any ideas? Thanks in advance for all contributions.0 -
How do I add subdomain tracking to an existing Google analytics account that was set up to track website only (without the subdomain option)
I know you can track subdomains by just selecting the proper code when you set up the analytics and then create filters for the data in analytics. But how do you add a subdomain for existing analytics website. Is there a way to go back and change to the option to include subdomains and then I assume just replace the tracking code with the new code that Google delivers for this?
Reporting & Analytics | | rhgraves650 -
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 -
Need a tool for finding new links from analytics
I'd like to get a weekly report of all of the brand new referral links that have come in to my site over the last week. Is this something that can be done in google analytics? Is there a better tool for this out there? Thanks in advance
Reporting & Analytics | | seo-hunter0 -
Set up Google Analytics by product category
Does anyone know if it's possible to set up Google Analytics data by product category? We sell roughly twenty product categories on our ecommerce site. We can look at our analytics performance for the site overall and drill down to specific pages, but what we really want to see is our performance by product category. Our product categories can include up to 5000 products. Any pointers on how to do this?
Reporting & Analytics | | ironpac0 -
Google Analytics Alternatives
I am getting really fed up with how unreliable Google Analytics data is. Also, because I have several large sites I can't use the goal tracking or conversion funnel reports. What are the best alternatives to Google Analytics?
Reporting & Analytics | | mascotmike0