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
-
Why do WMT's Search Analytics & GA's Real Time Keywords Differ?
I took a screen shot of the keywords from Google Analytics Real Time Keywords for Google / Organic. Then I waited a week and filtered Google Webmaster Tools' Search Analytics for queries with those keywords. None of them showed up. Why not? What I missing? Why do some keywords show up in Google Analytics RT for Google / Organic while most others are in Not Provided? I see WMT's Search Analytics says that it doesn't always show queries that "are made a very small number of times or those that contain personal or sensitive information." But most of my queries are like that. Anybody know any patterns / criteria that leads WMT to show some but not others? Thanks
Reporting & Analytics | | GilReich0 -
New website server code errors
I launched a new website at www.cheaptubes.com and have recovered my search engine rankings as well after penguin & panda devestation. I'm continuing to improve the site but moz analytics is saying I have 288 medium issues and i see the warning "45% of site pages served 302 redirects during the last crawl". I'm not sure how to fix this. I'm on WP using Yoast SEO so all the 301's I did are 301's not 302's. I do have SSL, could it be Http vs Https?
Reporting & Analytics | | cheaptubes0 -
Is my tracking code incorrect?
I inherited a website that has a host of issues. I set up Goal Conversions for lead generation and am getting this URL listed as a Goal Completion Location /l/24672/2014-07-31/b4dg5 I can tell it is a date but have no other insight into what or where this page is. Does anyone have experience with this and can offer a fix? A related question is how can I find the URL that triggers the Goal Conversion. I tried editing the goal but it doesn't show the URL anywhere. And the Goal Completion Location is sort of a misnomer because it lists the URL prior to the completion. Thanks!
Reporting & Analytics | | Nobody15969167212220 -
Mobile redirect causing traffic drop? Can I move analytics code to capture them as visitors before redirecting them?
Yesterday I implemented a mobile redirect as I don't have a mobile version of my site. As a result I've seen a drop in traffic which makes sense as my redirect script is at the top of the page. If I were to move the redirect script below the analytics code would that allow me to still track mobile users? Would this affect my bounce rate though?
Reporting & Analytics | | SamCUK0 -
Cross-Domain Tracking Urgent Query :-(
Hi Mozzers! One of my clients is having an issue with cross-domain tracking, in other words their own domain is seen as a huge referrer. When you land on their site, which is www.sunway.ie, and then choose a holiday to book it then takes you to another domain which is www.sunwayholidays.ie, during the booking process. I'm just wondering if there is a Google Analytics genius out there who may be able to take a quick look and let me know if there is any obvious solution to this within the Google Analytics code? Thanks in advance everyone! Gavin
Reporting & Analytics | | strategemilabs0 -
GA Stopped Recording Visits?
Looking at my GA stats today for one of my projects and its reporting 0 visitors in the audience overview yesterday - I know for a fact this is incorrect, using the real time viewer I tracked at least 40 people on the site yesterday in the few times I checked. It is also saying 0 visitors today but from real time I can see solid activity all morning. The code is all still present and correct on the page (which you would assume given real time still works), anyone else having weird issues today? It is only effecting 1 of 12 projects.
Reporting & Analytics | | FDFPres0 -
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 -
Is Analytics Code for SubDomains different?
I am currently tracking site performance on our website with Google Analytics. Recently, we've brought a Wordpress blog into our site as a subdomain blog.accupos.com. Though we did this a few months ago, we do not have Analytics data for these pages within the wordpress platform. I've found where to paste the code, in the Footer block of the Wordpress template, just before the close body tag (is this the best recommended way?) and just have one question about WHICH code to paste. Can I add the original code, same as the rest of the site? Or does Analytics have a different code for tracking subdomains? If so, do I need to replace existing code for the rest of the site? I hope I worded this okay. Please help. I'd appreciate it! Derek M.
Reporting & Analytics | | DerekM880