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
-
Goal Tracking In Analytics On Separate Ordering Website
I have a question for any Google Analytics wizards out there. We have two clients that have a similar complication when it comes to tracking goal conversions in Analytics. Basically, all the conversion actions we want to track occur on a separate website; either an iframe embedded on the page or through an entirely different ordering website. Trick is, Analytics sees the source for all these conversions as referrals from the main site. We'd like to get visibility back to the original source/medium that brought visitors to the site before they converted. Anyone have a suggestion for making that happen?
Reporting & Analytics | | fivefifty0 -
Dip in traffic from Pune for our sites in Google Analytics
Hi, We have noticed dip in traffic from Pune after 6th May'14 in our Google Analytics account for few of our sites. Did anyone noticed the same for your site. Kindly let me know if you have any idea. Thank and Regards
Reporting & Analytics | | vivekrathore0 -
Localhost:4444 Showing Up in Google Analytics
Hello All, Lately in my Google Analytics account I have noticed a referral source labelled: localhost:4444 The number of visits is really high from this source, but I have no idea (no clue!) what it actually means. Can anyone shed some light on what this is about? Should I be creating some sort of filter to screen out this as a referral source (assuming it is not legitimate)? Many thanks in advance. Cheers!
Reporting & Analytics | | Robert-B0 -
Google analytics reality check?
Looking back over a 9 month period tracking analytics with getclicky my site showed a 29% bounce rate, with only about 1/4 of visitors spending 1 minute or less on my site. I've recently implemented GA (removed old clicky code) and although traffic is strong, my site now shows a bounce rate of about 82%. Engagement stats also show that 82% of visitors spend between 0-10 seconds on my site. My site is built on Wordpress and the GA tracking code wasn't placed directly in the footer, my developer built a field in the admin area to insert the UA number which automatically adds the code to all pages. I've checked the code and the tracking seems to appear on all pages. I took a look at AW Stats. It corroborates GA and says that 80% of visitors are spending 0-30 seconds on the site. Potential issues/clues: browser tests show small loading problems in Internet Explorer 7,8,9 (the phone number at the top of the header loads on the wrong side of the page) and major issues in Internet Explorer 6 (site doesn't load at all in IE 6). The thing is no one who uses IE 6 is coming to the site. Second, the site gets a grade of C in YSlow, it's not lightning fast at the moment. GA is showing average page load of 2.4 seconds, but don't think either of these issues should cause an 82% 0-10 seconds engagement number. My site is content rich/focused with very minimal advertising. Content is accessible well above the fold. My question: Does the fact that AW Stats and GA agree mean that those numbers are accurate, or is there a bug I should be looking for? How to explain the clicky numbers?
Reporting & Analytics | | JSOC0 -
Google's New Privacy Policy and Analytics
Does anybody know if Google's new privacy policy allows it to use data gathered by Analytics to be used as a ranking factor in the SERPs?
Reporting & Analytics | | Jolora0 -
Track Individual Organic Orders In Google Analytics
I was wondering if there is a way to track information about the individual order in google analytics. Currently I can see all of the organic traffic, rev, transactions, etc, but I would like to be able to know what those individual order numbers are, as well as be able to place test orders to see if organic tracking is correctly working. Does anyone know of a good blog walkthrough for this, or have any suggestions? Thanks (again individual organic order data not all data from a specific search engine or keyword).
Reporting & Analytics | | Gordian0 -
Google Shopping & Keyword Tracking
When tracking Google Shopping using the URL builder is it possible to pull through the Keyword used or will analytic do this automatically?
Reporting & Analytics | | TPSUK1 -
How to measure number of visits from Google News coming from Google Universal Search (NOT referral coming directly coming from news.google.com) with google analyitcs
I'm running a news site, and I have a problem of accuratly measuring which traffic is REALLY coming from google news. I analyzed a lot of individual articles and I come to the conclusion, that the visits, that come from the google news section in the universal search results are counted as "normal" search engine traffic in google analytics. So if you do a Google search for a topic that includes links from Google news, you don't get an accurate referral count. As an example, if you do a search for "eBay", incorporated into the page 1 search results you may also see Google news results as well.
Reporting & Analytics | | Mulle
If someone clicks on that Google news link that appears in Google search, it shows up in Google analytics as a referral from Google search, when it was actually from a Google news referral. I was already checking google analytics and google news help forums and searched SEO blogs for this. But I wasn't able to find a working solution. Can anybody help me out with this problem? Thanks so much, Matthias0