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
-
Pandora in Google Analytics
Hi Mozers, in Google Analytics our ads are registering a 10 second page duration and a 90% bounce rate, which is pretty atrocious. My questions are: Organic page duration is 3:15 minutes, and Social + Referral are similar. Yet Pandora is bringing the average time on site way down, to less than a minute. Will those paid ad metrics be factored to the User Behavior and therefore negative affect our overall rankings? In other words does Google now see our page duration as less than a minute? The Pandora rep says that Google Analytics and Pandora have "systemic issues" such that GA is very inaccurate with Pandora metrics. I find that difficult to believe. Any insights here? Thanks all! Jane
Reporting & Analytics | | CalamityJane770 -
Why is this tag not firing in Google Analytics?
I setup Google Tag Manager on this site- http://germanhausbarn.com I am trying to setup event tracking for the donate, newsletter, and Contact Us button at the bottom of the page. The most recent version is published, and I ran debug and it shows that they fire, but nothing is coming up in analytics. Any thoughts?
Reporting & Analytics | | EcommerceSite0 -
Save a Google Analytics account
We recently started with a client who has Google Analytics already installed on their current site, but they have no idea the account login for it? Is there anyway to transfer ownership of this just based on the code?
Reporting & Analytics | | WillWatrous0 -
Referral Traffic vs. Campaign Traffic in Google Analytics
I have two sites: a blog and an ecommerce site. The blog funnels people to the ecommerce site. In Analytics I'm seeing declines in referral traffic from the blog to the ecommerce site. During the same time I'm seeing an increase in campaign traffic to the ecommerce site, with most campaign traffic coming from the blog. I believe the increase in campaign traffic is largely a result of simply having installed more tracking links. This leads me to believe that the declines I'm seeing in referral traffic is simply a result of the increase in campaign traffic. In other words, what was once counted and reported as being referral traffic is now being counted and reported as campaign traffic. So my question is this: In Google Analytics is campaign traffic ALSO reported as referral traffic, or is campaign traffic reported separately and not duplicated in referral traffic reports? I'll provide a concrete example to make this more clear in case it isn't: Say site X sends 1000 visits each month to site Y. Say 50 of those visits come from a single link on X. If that link is changed so that campaign Z data info added (via the Google URL Builder), would you expect to then see 950 referral visits each month from site X to site Y plus 50 campaign visits to site Y via new campaign Z, or would you continue to see 1000 referral visits plus the new 50 campaign visits? Many thanks in advance to anyone that can shed some light on this.
Reporting & Analytics | | aaronprimal0 -
Newsletter Campaign Need HELP to Create a Custom Report in Google Analytics
I have this newsletter send using Mailchimp. This campaign is link to G.A. How can I create custom report for me online store about this campaign? For example: I have 2 Goals Completion Location setup in G.A. they are: /checkout.php and /finishorder.php Is there a way to find out how many visitors from my campaign reach the /finishorder.php vs. /checkout.php Reason, about 50% are reaching /finishorder.php Maybe I need to creat a "How to redeem you coupon code" video to included in the newsletter to HELP customers complet there order process. Thank you, BigBlaze
Reporting & Analytics | | BigBlaze2050 -
Linking Multiple Niche Site In Same Google Analytics Account
Hi, I am providing SEO for Local business. Is it advisable to separate out the Google Analytics into different Google account or is it ok to remain it this way? Some of the client might be in the same niche, and might be competing with the same keywords as well. What I was worried is, Google might see these sites as same owner and only rank for 1 of the site. I was thinking to get the owners to register for their own Google Analytics and share the access to me.
Reporting & Analytics | | JonathanSoh0 -
Google Analytics tracking code for completely new website
Hello! I use Google Analytics to monitor our company's websites. In the coming weeks we will roll out a brand new website for one of our brands to replace its current site. The domain name will remain the same. My question is, should I use the same tracking code that's been used on the existing site for the new site, or is there a benefit to creating a new tracking code? Thanks in advance!
Reporting & Analytics | | SmileMoreSEO
Erik0 -
Google Analytics & AdWords Conversion Tracking
I have Google Analytics implemented on my site and have goals/funnels set up to track the conversion process. I have just started an AdWords campaign but can't see/track conversions from it. Do I need to implement both Google Analytics AND AdWords scripits on the page?
Reporting & Analytics | | mj7750