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
-
We setup a new Google Analytics account for the new domain but the old one is still there
Hi, Our company has changed their domain almost a year ago and after the migration, they created a new Google Analytics account rather than changing the address on the existing GA account. Now I can still see that Google indexing the old domain. Just wanted to ask if we can still tell Google that we've changed the domain on the old one? Or, should we just go ahead and use the new one and delete the old one? Very confusing, but our traffic is constantly dropping although we rank for on the first page for tracked keywords, just want to understand if there is a connection between the organic traffic droppings and not telling Google we've changed the domain. Thanks! NJt7vbJ
Reporting & Analytics | | Lucidica0 -
In google analytic for google /cpc it is showing url with 404 which even not exists in my database
Hello All, In google analytic for google /cpc it is showing url with 404 which even not exists in my database that also more than 300 per day. How can it is possible? it is showing /black-friday-offers but I don't have such page. Thanks!
Reporting & Analytics | | pragnesh96390 -
Google Analytics Event Tracking
Hi Guys, I want to set up a goal in Google analytics for this site http://www.dfrsolicitors.co.uk/contact.php and the contact us form is in php (so there is no thank you html page). I know there is a piece of code "onsubmit" or whatever it is, but I can't find it. I want to be able to track successful submissions. Kind Regards Neil
Reporting & Analytics | | nezona0 -
Analytics conversion tracking?
Hi One of our clients has a hotel chain currently which currently uses an online booking system which is from a third party. We are keen to set up conversion tracking to track the number of bookings made however are we able to do this if the URL destination is not on the clients website? Or will it be a case of just tracking the number of people who click the link to go to the third party payment site? Kind Regards
Reporting & Analytics | | TheZenAgency0 -
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 -
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 -
Number of clicks / organic traffic - different data in Google Analytics and Webmaster Tools
Hi. I have a little problem. When I open Google Webmaster Tools I see 3000 clicks (in Traffic - Search queries - Clicks). But when I open Google Analytics I see much more visits from search engine (Google) - it´s 4-5 times more! It´s a huge difference, don´t you think? Do you know, where is the problem? What causes this diffence? thanks a lot
Reporting & Analytics | | mysho0 -
Google Analytics for multiple languages on multiple domains
Hi folks A quick question in regards to setting up Google Analytics for a website with multiple languages on multiple domains. The domains that needs to be tracked are: www.example.com -> English www.example.se -> Swedish www.example.dk -> Danish To my best knowledge this can be acheived in Google Analytids using 3 different setups: Different accounts Different properties Profiles What would you guys consider the best approach?
Reporting & Analytics | | Resultify
Pros and cons? Have a great day Fredrik0