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
-
Tracking 301 redirect traffic in Google Analytics
if I 301 redirect www.mywebsite.com to go to www.yourwebsite.com, how can I track the traffic in Google Analytics that is coming from mywebsite.com?? I don't think that's a referral traffic, is it?
Reporting & Analytics | | Armen-SEO0 -
Is it possible to use Google Tag Manager to pass a user’s text input into a form field to Google analytics?
Hey Everyone, I finally figured out how to use auto event tracking with Google Tag Manager, but didn't get the data I wanted. I want to see what users are typing into the search field on my site (the URL structure of my site isn't set up properly to use GA's built-in site search tracking). So, I set up the form submit event tracking in Google Tag Manager and used the following as my event tracking parameters: Category: Search Action: Search Value When I test and look in Google Analytics I just see: "search" and "search value." I wanted to see the text that I searched on my site. Not just the Action and Category of the event.... Is what I'm trying to do even possible? Do I need to set up a different event tracking parameter? Thanks everyone!
Reporting & Analytics | | DaveGuyMan0 -
Domain redirect for direct mail (source) tracking in Analytics?
We have a client that would like to do some direct mail marketing and the plan is to use a short/simple domain in the marketing materials, which redirects to the main site domain. By default this would show as a referral traffic source in Analytics, right? So any traffic that came through that redirect would be attributed to "shortdomain.com / referral"? Meaning I wouldn't need to do any sort of customized, advanced tracking set up to track conversions that I've already set up (ecomm and goals) and attribute them to this new source? Just double checking that I'm not overlooking something. Thanks!
Reporting & Analytics | | VTDesignWorks0 -
How to track what people type on my text boxes on Google Analytics?
Hi there! In our website, we have a few text boxes that users need to use to complete the goal. The boxes aren't search boxes, but it's still important to us to track what people type on it. I'm looking for a way to track the data through the "event" feature in Google Analytics, but it seems that this tracker can only calculate clicks, or video views etc. Does anyone knows how to track do it?
Reporting & Analytics | | ivan.precisodisso0 -
Omniture vs Google Analytics
What's your opinion on analytics tools? Specifically Omniture vs Google Analytics. Is Omniture really that much more powerful than GA? Have you used GA Premium, the enterprise package? My main question - Can GA (free or premium) do everything that Omniture can? If GA Premium and Omniture were the same price, which would you choose? Is one harder to implement, pull reports, tweak, ect? Thanks in advance.
Reporting & Analytics | | akim260 -
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 -
How to change a url for google analytics account
We recently changed the url of a client's website. Is there a way to change the url on the ga account instead of creating a new account so that we don't lose comparative data? Thanks! Sorry- I know this is a novice question.
Reporting & Analytics | | marketing12340 -
What's the best way to track moble traffic / sales from a subdomain in Google Analytics?
Hello, I've been trying to figure out the best way to track traffic and sales for a subdomain mobile site and would appreciate any feedback or guidance. I've set up an advanced segment but have found that I'm not able to source traffic since the segments get disabled when trying to view top content pages. I've also setup an additional sub-profile under the main domain profile in google analytics and have set up an advanced filter using the following guildelines http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html In the Profile Settings page, click the Add Filter link. Choose Add New Filter and provide the filter a name. Choose Custom Filter and select Advanced on the Filter type settings. Under Advanced settings: FieldA should be set to Hostname FieldB should be set to Request URI Set the values for both Field A and Field B to (.*), which is an expression that captures all characters. Set the Output To --> Constructor option to Request URI and provide $A1$B1 as the value for that choice. I'm unsure if I've set up the profile / filter correctly, the traffic stats are different than the segment. The mobile profile is also tracking all ecommerce transactions instead of just mobile. Here's the code I have in place. we're using the Traditional code Thanks, Jamie
Reporting & Analytics | | marketing_zoovy.com0