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
-
Tracking specific path and referral for unique session
Happy Monday everyone! We recently received a unique lead on our site and I was wondering if there was anyway to pinpoint the exact behavior flow and/or specific referral source they came from on Google Analytics. I know you can view the general behavior flow for all or segmented users based on what pages they viewed, but I wanted to see if I can track by unique sessions to see where this person exactly found us. Any insight is appreciated! Thanks
Reporting & Analytics | | KathleenDC0 -
GA: How do I preserve custom dimension across domain and subdomain?
Using custom dimensions our site tracks logged-in vs not logged-in users on our shop site (shop.example.com). A user can only login on the shop.example.com. The problem is when the logged in user visits our the main domain (example.com), we lose the custom dimension and the user becomes anonymous. At this point, if the user goes back to shop.example.com, the logged-in custom dimension comes back. How do I preserve the logged-in user dimension across the main domain? Example of snippet:
Reporting & Analytics | | Evan340 -
Page Name Tracking - Without UTM links
Hello, Our current site is fully html with no cms. We're moving to a newer version today with a typo 3 cms. My one worry is as follows; On some pages an internal link opens a jquery lightbox, inside the lightbox will be a video or download link. I cannot simply add a standard event url like I wanted to (utm_ link) as the pages are linked via the cms pointing to different pages, not the url's. We really need the following appearing in Analytics, whether its an event or landing page; The click of the light-box link The click of the video OR download link inside the lightbox. I would really, really appreciate any help on this as the new website is going live today, regardless whether this has been resolved. Thank you very much in advance of any replies. twY8s8B.jpg
Reporting & Analytics | | Whittie0 -
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 -
Magento and Analytics - Unique purchases tracking
Hi guys, My ecommerce site is on Magento and in order to integrate it with Google Analytics, I enter my GA account number on the Account Number field in the backend. What surprises me is that some purchases are not tracked at all. So for the month of may GA shows X unique purchases when Magento shows x+5. Can this occur because the customer leaves the site before the confirmation page is shown? Thanks. Regards
Reporting & Analytics | | footd0 -
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 -
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