Tracking an onpage 'event'
-
Hi all
Wondering if anyone could help out with this one please. My client is a government backed free internet safety website and in the next few days they will be launching an update on all of their pages which will let people know if their browser is out of date. For example, when you go to their site you will get a message advising you to upgrade your browser for security reasons.
They have employed the following code to check the browser
The client are keen to know how many times in a period this message is shown to users. Any idea how one would go about tracking this please. Would it involve some custom GA work, would I be able to track the hits on https://wxxxx.org/javascript/update.js in GA? I'm a little stumped. Obviously I can tell how many people loaded the page but not sure how to work out what % of them see the javascript
Many thanks for your help
Carl
-
This should be pretty simple. Add a line to your onLoad that looks like an event:
window.onload=function(){
try {if ($buoop.ol) $buoop.ol();}catch (e) {}
var e = document.createElement("script");
e.setAttribute("type", "text/javascript");
e.setAttribute("src", "https://wxxxx.org/javascript/upda..."); (have replaced the domain name for this example)
document.body.appendChild(e);_gaq.push(['_trackEvent','browser-warning','{browser name}']);
Whenever the message is shown, an event is fired.
-
You can do event tracking now within Google Analytics.
https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
You should be able to set up an event, and then call the event tracking within your script inside the try{} loop.
-
Sorry, had a thought which is probably foolish but will share anyway
Could I set up a custom Google Analytics and generate a unique GA tracking code and place it inside of the above script or would it still be picked up by the whole page?
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
-
Impressions skyrocketed 10x in few days on just one keyword and I don't understand why.
Hi everyone, I found this 'anomaly' in my google search console data. As you can see from the picture the impressions skyrocketed in a few days and then sort-of plateaued. The clicks remained almost the same because the keyword is highly informational (Wikipedia takes all the traffic). The keyword has around 650 000 searches per month. Btw. We are not doing off-site SEO. I would like to hear your opinion on what could have caused this. A Google update maybe? 5lERKef
Reporting & Analytics | | filip-balun1 -
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 -
In Ecommerce Conversion Tracking Revenue Is not Showing
Hello Everyone, I have implemented Ecommerce tracking in google analytic but I am not able to see revenue and average value. am I missing something ? Please tell me how can I see revenue and average value. I am also attaching image of that so anybody can understand. Please help me out asap. Thanks CVFakjD
Reporting & Analytics | | Alick3000 -
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 -
It appears there's a problem with our connection to your Google Analytics account. Please go to your Settings page to update your connection.
I keep getting this error though I have confirmed I have the correct information. Any recommendations?
Reporting & Analytics | | x3oadmin0 -
Multiple Domain Tracking with One Google Analytics Account
I am working on multiple online retail stores as follow. Right now, I have tracking facility with multiple account. Attached image can give you more idea about it. http://www.vistastores.com/
Reporting & Analytics | | CommercePundit
http://www.lampslightingandmore.com/
http://www.vistapatioumbrellas.com/ I don't want to track my statistics with multiple account. Because, it may take too much time behind Goal set up as well as analysis. Can I track all data under one account for all online retail stores? 6464019053_bda32e9fe0_b.jpg0 -
How can I track search engine optimization data in Google analytics?
My website is linked to a Google Analytics web property. But, I am not able to track search engine optimization data in Google Analytics. So, How can I get it done?
Reporting & Analytics | | CommercePundit0 -
What's the best way to track moble traffic / sales from a subdomain in Google Analytics?
Hello, I've been trying to figure out the best way to track traffic and sales for a subdomain mobile site and would appreciate any feedback or guidance. I've set up an advanced segment but have found that I'm not able to source traffic since the segments get disabled when trying to view top content pages. I've also setup an additional sub-profile under the main domain profile in google analytics and have set up an advanced filter using the following guildelines http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html In the Profile Settings page, click the Add Filter link. Choose Add New Filter and provide the filter a name. Choose Custom Filter and select Advanced on the Filter type settings. Under Advanced settings: FieldA should be set to Hostname FieldB should be set to Request URI Set the values for both Field A and Field B to (.*), which is an expression that captures all characters. Set the Output To --> Constructor option to Request URI and provide $A1$B1 as the value for that choice. I'm unsure if I've set up the profile / filter correctly, the traffic stats are different than the segment. The mobile profile is also tracking all ecommerce transactions instead of just mobile. Here's the code I have in place. we're using the Traditional code Thanks, Jamie
Reporting & Analytics | | marketing_zoovy.com0