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
-
Google analytics - Users by time of day for speicific country?
Is there any way in analytics where we can check Users by time of day for speicific country?
Reporting & Analytics | | BPLLC0 -
Tracking Sessions for 301 Re-Direct in Google Analytics
Trying to track clicks for individual slides on a homepage slider. I cannot enter UTM codes on the slide links, just choose from a dropdown containing pages on my site (WordPress). So, I set-up 301 re-directs for all the slides. /slide1-redirect
Reporting & Analytics | | jbernier
/slide-2-redirect etc.. Will these redirect pages show up in GA? I cannot see them. I'm trying to create a Dashboard for Homepage slider clicks. John0 -
Universal Google analytics e-commerce tracking code?
Hi Mozzers, I have never setup a universal google analytics e-commerce tracking code before and my concern is what exactly do I need to add on the cart thank you page? Can someone send me a sample of code I need to be adding? What kind of customization does it require? The more details you can provide the better! Thanks!
Reporting & Analytics | | Ideas-Money-Art0 -
Analytics - Video Tracking
Hello, As i've ended up confusing myself, I thought I would ask the moz community whether i'm on the correct track! I'm wanting full GA tracking on individual videos from our destination URL. In short I need the name of each video to have specific tracking. Example;
Reporting & Analytics | | Whittie
Video 1 (Apples)
Video 2 (Oranges)
Video 3 (Pears) We need to be able to see the amount of plays per session, per video. As well as any extras if possible, such as;
Watched 25%, watched 50%, watched 75%, video complete, video paused. If the following script is used; https://github.com/sanderheilbron/vimeo.ga.js As well as using the Google URL builder (https://support.google.com/analytics/answer/1033867?hl=en-GB) , what would be the best way to set each video to see the statistics within Google Analytics, so I can see how many plays the 'Apples' video has had. I think it is the ordering of the 'event, campaign, label etc' which has confused me. Many Thanks for any replies in advance, I appreciate it.0 -
How many ways to use Event in Google Tag Manager for Event Tracking?
Hello Experts, How many ways to use Event in Google Tag Manager for Event Tracking? As per me there are 5 ways given below are they correct? 2nd thing if yes can you please please tell me procedure of using all or which is the best one to use? HTML 5 Data Attributes Classic Google Analytics Example: _gaq.push(['_trackPageview', '/downloads/pdfs/corporateBrief.pdf']);
Reporting & Analytics | | bkmitesh
3) Universal Analytics Example: ga(‘send’, ‘pageview’, ‘page path’); query string? or is it possible without any coding on website we can configure id's in google tag manager? Thanks! BK Mitesh0 -
How do you adjust the Google Analytics date range?
Hello! Every time I log into Google Analytics (via desktop), the date range is set to October 1, 2013 to October 28, 2013. I've looked throughout the GA settings to find a place where I change this default setting to anything else ("Last week?") but have not be able to find where that setting is. Can you help? Losing my mind,
Reporting & Analytics | | SmileMoreSEO
Erik0 -
How many users completely block Google Analytics cookies ?
Hello everyone! In your experience, how many of your visitors' browsers completely block cookies including those of Google Analytics ?
Reporting & Analytics | | Masoko-T0 -
Why seomoz shows me "missing meta discription" on this plugin: http://villasdiani.com/wp-content/plugins/dopbsp/frontend-ajax.php ? Should I edit? how?? IIs it posible??
Good day to all! I am very confuse about results on seomoz Crawl Diagnostics Summary, especially with 6 Crawl Warnings Found. It says title too short: http://villasdiani.com/category/mombasa/, http://villasdiani.com/category/watamu/ , http://villasdiani.com/sitemap/ why would Google punish me for this??? why should I make longer title for sitemap? or Watamu? It is the name of the place - Watamu or Mombasa. It is very confusing for me. I have very big mess with the website and it is not ranking:-( what I have done:-( and is it possible to meta description for this plugin: http://villasdiani.com/wp-content/plugins/dopbsp/frontend-ajax.php how?? I even do not know where is it.
Reporting & Analytics | | VillasDiani0