Ga event tracking and GAC code placement
-
Just relaunched website and since then specific event tracking has zeroed. I copied event tracking directly from old site so it should work. Overall analytics are fine. Only variable I can think of is where google analytics code is placed. Does GAC code need to be on HTML header or at end of body specifically for event tracking to work? Example: Steripen.com/freedom/... When user clicks "REI" icon, this tracks an event that a user clicked on one of our"retailer links." Any feedback is greatly appreciated.
-
Yeah, I was going to correct myself there. It is .
-
Actually, Francisco, the optimal location for the async version of the GA tracking code is just before the closing tag. You'll get much more accurate data and because the code is asynchronous, the JavaScript won't slow down the page load.
Paul
<object id="plugin0" style="position: absolute; z-index: 1000;" width="0" height="0" type="application/x-dgnria"><param name="tabId" value="undefined"> <param name="counter" value="201"></object>
-
Martjin, I did find that answer early this morning and tested, then went to bed. Just woke up and, indeed, after changing to integers, it worked fine.
Now it's just my ecommerce vaules that are not displaying. I can't imagine the integer value would apply to ecommerce in ga as rounding is not expected.
Thanks for your feedback.
Tim
-
Your event tracking code seems fine.
_gaq.push(['_trackEvent', 'Videos', 'Video Load Time', 'Gone With the Wind', downloadTime]);
Your placement should GA tracking code should be before the . Use the async GA tracking code. Where is your event tracking not working; under Events or under Goals?
-
Hi Tim,
Within this case you used the value: 119.95 where this value needs to be an integer. This could be what is causing your troubles.
Hope this helps!
-
A second set of eyes is greatly appreciated. Thanks for responding and a good point actually. here's the code from the page I referenced:
<a <span="">onclick</a><a <span="">="_gaq.push(['_trackEvent', 'Buy Now', 'www.rei.com', 'Freedom Portable Water Purifier',119.95]);" href="</a>http://www.rei.com/product/824898/steripen-freedom-water-purifier" target="_blank">title="Buy SteriPEN Freedom at REI.com" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAABi0lEQVQ4EZWSz0sCURDHv8RmKWqCh/Ji4KGDh/AehAf/gSDw5H/jTfY/EDy4IYiBihBaorkn0SV/UIZEKkmGRgiSJgTGCO/B01VoLm/ezHc++2Z2sNhinW5nkbpJbVEsFjvYYmpTRSgTQq/f26jaCBh8DKDcKeh/9RFJR/4PCGfCaA/bsFvsyD/l0e11dSG6L2g+N5GqpJbFVDWcDBG8CmI+na9BdAG1Vg2eYw8XW/YtmM6mUB9UHmOOLiBwEYB1z4rJz4Tp4D/3w3fm43fm6AI0TUOpXQJ9mYxAyr2C8XjM6vi5BqA+5aSM2e+MiwhUfa0ilo3xGHPWAPFsHPX3OoySkWmWp2HXgHQ5jdHnSIgLAPr32osG54FTENGFXjH6HiFZSAo5AUCZS+8lzCaz0ALFaQ7eUy9chy5hFgLAceRAoV5A462x1oIkSSi3ynCfuGGz2Yi5NAFA25ar5UDiVaOZ0FrL17KwUAIgehtdilYHyGC01sVGEZXHCguBA9j6mowmntzkJIoJnvoDa5nPyI8bIWoAAAAASUVORK5CYII=" alt="Buy SteriPEN Freedom at REI.com" />REI.com
Right now my GAC is just beore
-
A second set of eyes is greatly appreciated. Thanks for responding and a good point actually. here's the code from the page I referenced:
<a <span="">onclick</a><a <span="">="_gaq.push(['_trackEvent', 'Buy Now', 'www.rei.com', 'Freedom Portable Water Purifier',119.95]);" href="</a>http://www.rei.com/product/824898/steripen-freedom-water-purifier" target="_blank">title="Buy SteriPEN Freedom at REI.com" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAABi0lEQVQ4EZWSz0sCURDHv8RmKWqCh/Ji4KGDh/AehAf/gSDw5H/jTfY/EDy4IYiBihBaorkn0SV/UIZEKkmGRgiSJgTGCO/B01VoLm/ezHc++2Z2sNhinW5nkbpJbVEsFjvYYmpTRSgTQq/f26jaCBh8DKDcKeh/9RFJR/4PCGfCaA/bsFvsyD/l0e11dSG6L2g+N5GqpJbFVDWcDBG8CmI+na9BdAG1Vg2eYw8XW/YtmM6mUB9UHmOOLiBwEYB1z4rJz4Tp4D/3w3fm43fm6AI0TUOpXQJ9mYxAyr2C8XjM6vi5BqA+5aSM2e+MiwhUfa0ilo3xGHPWAPFsHPX3OoySkWmWp2HXgHQ5jdHnSIgLAPr32osG54FTENGFXjH6HiFZSAo5AUCZS+8lzCaz0ALFaQ7eUy9chy5hFgLAceRAoV5A462x1oIkSSi3ynCfuGGz2Yi5NAFA25ar5UDiVaOZ0FrL17KwUAIgehtdilYHyGC01sVGEZXHCguBA9j6mowmntzkJIoJnvoDa5nPyI8bIWoAAAAASUVORK5CYII=" alt="Buy SteriPEN Freedom at REI.com" />REI.com
Right now my GAC is just beore
-
Please show me your event tracking code. I can probably figure it out for you. CHeck your source code because MANY times the code will get stripped by the editor if flipping from HTML to Visual.
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 - Tracking multiple thankyou pages?
Hi Guys, I want to track email opt-ins for multiple thank you pages. The setup is as follows: http://image.prntscr.com/image/57632e05a15f42fda0b8ffec2d176460.png I have not yet built the thank you pages, so i was wondering what the URL should be to make it easy to track them in GA? I'm thinking: domain.com/thankyou-page/page1 Then using regular expression in GA to track /thankyou-page/ Would this be a good way to go about it? Cheers. f6c7r0
Reporting & Analytics | | spyaccounts110 -
Tracking goals on a subdomain with traffic coming from main domain subfolders. Mission Impossible?
Hello guys, I'm facing a huge challenge setting my goals. Here is the situation. I'm having the same Universal Analytics code on my main domain with different languages www.example.com/en/, www.examples.com/fr/, etc and my www.shop.example.com subdomain. So a French user will go to www.example.com/fr/, see a product that want's to buy and after the registration will see a thank you page on www.shop.example.com/success.html, and here comes the problem. My goal URLs are not "fired" with my filter. I have set up a filter (attached) to include traffic only for the desired profiles, but when this filter is on I can't see conversions. When the filter is off I can see conversions but for all languages. Any ideas how to set up the filter properly? Thank you! Filter.png
Reporting & Analytics | | peternachevat0 -
How do I get compete.com to track my data
Is there a tracking code for them? I cannot find a way to get them to track my site data. I know it seems trivial, but it is sadly a big tool in my industry so I need to get my data on their site
Reporting & Analytics | | Atomicx0 -
Looking for a GA developer to block internal traffic and integrate with Snipcart JS API - paid
Hi There, We're looking for someone to help us setup: Blocking internal traffic using a custom dimension/query URL as described here: http://www.simoahava.com/analytics/block-internal-traffic-gtm/ Integrate Google Analytics ecommerce tracking with the Snipcart API as described here: https://snipcart.com/blog/integrating-snipcart-with-google-analytics-ecommerce-tracking Discuss Kiss Metrics and possibly integrate with Snipcart We're a small, 2 person startup so are ideally looking for a freelancer or small firm to help - Any recommendations or pointers in the right direction would be much appreciated. Cheers Ben
Reporting & Analytics | | cmscss0 -
Google Analytics subdomain ecommerce tracking flatlines :-(
Buongiorno from 19 degrees C wetherby UK 🙂 This website http://www.philpotts.co.uk/ contains a shop sub domian @ http://shop.philpotts.co.uk/. I configured the site Ga analytics code to include the subdomain (see below code). I had to do this as i was getting refferal data from the actuall subdomain. But after following the instructions on p117 of cutroni's ga book things have gone wrong, mainly now eCommerce data has dissapeared 😞 So my question is please: "Why has installing the GA code above caused eCommerce tracking to suddenly go dead?" Grazie tanto,
Reporting & Analytics | | Nightwing
David0 -
Need Tips to Track Advertising of Domain on my Car
Hi, I'm working on building a new site. http://www.pilatesboisfranc.com/ I also bought the domain .ca (the business will be in canada) .net .org and .info All the domains are redirect to the .com This site is about my wife new business, a Pilates Studio. We would like to advertise the site on our personal car, using vinyl letters to display the domain name. Is there a way tu use the (.ca) http://www.pilatesboisfranc.ca advertise on my car and track that advertising using Analytics? I know I can use a URL something like http://www.pilatesboisfranc.com/health and track the hit, but using a shorter URL is the key. Can you help? Thank you, BigBlaze
Reporting & Analytics | | BigBlaze2050 -
Tracking pages in two separate analytics accounts
Hi All, I'm trying to track some pages on one website in two separate Google Analytics accounts. Has anybody done this before that could help with the tracking code? Thanks in advance, Elias
Reporting & Analytics | | A_Q0 -
Tracking SEO tests
Trying to get some best practices on testing SEO changes. We are going to make a bunch of changes on subsets of pages. Say testing about 5 different on-page changes. Originally we were going to submit separate Sitemaps to GWT and see if our test sets get indexed, how quickly, etc. But we noticed that GWT says some pages in our Sitemaps aren't indexed even though we know they are (what gives?). So we thought, for each test, let's put a unique code on the page so we can see how many get indexed by Google. But that doesn't solve the issue: how many people clicked on our test pages. So we are thinking of putting a tracking pixel on the test pages, specific for each test. But then I am thinking, why not just create a separate Google Analytics profile and place that code on the test pages (set up goals to track visits per test since we aren't going to change the actual URLs). and on and on This is where you come in. What kind of tracking do you implement when you set up tests? Advice appreciated! E
Reporting & Analytics | | ErinTM0