I am trying to learn AMP Analytics. I stumbled upon this statement which I am unable to understand.
Since analytics priority is lower compared to content on the page, it's recommended that clicks are tracked using a browser redirect to avoid click loss.
Can someone please make me understand how redirect helps in avoiding click loss.
The problem that's referred to is that analytics have low priority, i.e. they are not guaranteed to fire immediately. Clicking on a link navigates you to a different page, which may happen before analytics has a chance to fire a click event.
Thus, it's safer to track links through other means, like a redirect, rather than to rely on amp-analytics which may result in a race condition.
Related
I have a website that sells products and I'm using google analytics to know some statistics about the website. Sometimes, errors happens for various reasons and purchases doesn't go through. You then have to refresh the page and try again, then everything works. The website displays the message telling the user to refresh and try again. I'm curious how many people actually do that. My question is, is it possible to know what users do when this error happens? Do they refresh and try again? Do they close the tab or do they do something else?
The question is quite broad at this moment, but there are a couple of improvements to your measurement setup, that can help you to investigate this customer behavior.
What I would do, is to implement an event tracking to indicate, that this error has occurred. You can find details about event tracking in this guide. Although I suppose, that your users are not likely to enter the website at this page, it might be a good practice to set the non-interaction flag of the event, as it is not actually generated by a user interaction.
I'd also create tracking for page reload, either by creating an other event for this, or by adding -reload suffix to these repeated pageview URLs. You can find good resources for this on SO as well, e.g. this one.
If you have a special URL for this error page (e.g. purchase-error.html instead of purchase-success.html), it is also easy to track the exit rate specific to this page.
Besides of Google Analytics, you might also want to set up heatmap or screen recording tools to understand this behavior. Hotjar, Lucky Orange are a few examples. (No affiliation.)
I will start by saying that I have fair experience in HTML, but please keep the technical terms to a bare minimum. Pretend you're explaining it to a child. :-)
I used Wix.com to make my site (Wix is a place to easily design websites and has little HTML capabilities, since it's all based on being able to easily design a site with no HTML knowledge). You can add a Google Analytics tracking code, so i can see the number of clicks on the site, but that's about all. Apparently you can't change the code to be able to see button clicks on the site etc. (or maybe you can?...)
This is what I need above anything else:
On the site are a few "sign up now" buttons. When someone clicks it, they go to a signup page on an external site. I need to be able to track who clicks these buttons and when.
Ideally it's all tracked within google but apparently it doesn't work on wix.
Priorities:
Somehow it works with Google Analytics on Wix. It would have to be if somehow I can track it with Analytics without putting a code on the site itself. Don't know if or how that would work.
If not Google, is there a simple 3rd party Analytics site that could track the number of clicks on these buttons to external pages? It would be best if I can get the IP addresses of the clickers as well.
this is fairly easy, try customerlabs.co/google-analytics-event-tracking which can directly help you to send data about the users when they click event tracking.
eg:
Wix supports 3 types of goal tracking for your site: Destination, Duration and Pages/Screens per session. Currently, Wix doesn't support an Event tracking goal.
I am working on a third party website that contains a web application embedded in an iframe on the home page. This iframe is hosted on the same same sub/domain.
Currently page views are being tracked with _trackPageview. Due to a requirement by marketing both pages use the same Google account Id.
Since the iFrame was implemented the marketing department has noticed that the bounce rate has dropped to almost nothing. I suspect that this is because Google is interpreting the pageView event on the iframe as the visitor hitting another page on the website.
Just for additional information, the domain of the _gaq object is being set to "none" for both the container page and iframe.
Does Google provide a mechanism by which you can trigger PageView in such a way that it isn't interpreted as subsequent pageview in this scenario? (I know that trackEvent has a noninteraction property to deal with this?)
Am I better off just disabling the PageView for the default iframe page?
Does Google provide a mechanism - apparently yes, but probably not for your use case.
The field documentation for Universal Analytics describes the non-interaction field thusly:
Specifies that a hit be considered non-interactive.
So in UA this does no seem limited to events but to apply to all hits (which would include pageviews). I want to point out that I have no tested it and that it seems counterintutive, so it might simply be that the documentation is incomplete/wrong here.
However as you are using "classical" Analytics this does not apply to you. Since upgrading the code is a good idea in any case you might want to push for an update to Universal Analytics (this piqued my curiosity so I will test this over the next few days and update this answer with the results - maybe you want to wait until then, or simply test it yourself).
It's possible, but not 100% clear to me that disabling the PageView event on the iframe will prevent your users from registering a page exit (the pageview may get recorded regardless). You can try removing that event and see if it works.
But a better way may be to implement a custom filter on a new View excluding traffic to that specific class of iframes. Make sure you keep your old View (or create a new one with further filters) to make sure you're capturing those iframe views, if you think that's necessary.
Using Google Analytics, I am tracking clicks on a link (The link is of the same website).
Is it necessary to apply some delay before redirection after tracking the click using trackPageViews?
I see people suggest delay on outbound link but I guess, the same rationale applies to the link that takes users to the same website.
The issue is really whether or not the tracking pixel request (from _trackPageview) has completed before you leave the current page.
So, yes -- if the link is opening up in the existing window, you'll want to add a delay on following the link, regardless of staying on the site or not.
BTW, while using _trackPageview for tracking clicks will work, it also inflates the actual page view count for your site -- you might want to use event tracking (with _trackEvent) instead. See Event Tracking Guide
I created my own analytics for my site to track outbound click events using jquery. Now the thing with preventDefault() is that it does not allow for the Ctrl+Click or COmmand+click operation in the browser to open the link in new tab/window. So my solution was to detect e.metaKey || e.ctrlKey and use window.open. This does not work very great with safari unless the user changes browser behavior. I am wondering if anyone here knows what other analytics users do - like how does google etc deal with this problem in tracking outbound links? From this link: http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527 - looks like google will also face the same problem.
Thoughts?
The timeout there exists to increase accuracy on Google Analytics Tracking. Without it there's a chance the page unloads before the track goes through.
The good news is, you don't need it if you don't mind about accuracy and are only interested on trendings of outbound link clicking on your website. If you remove that setTimeout call and the return false; from the end of your code it will be ok.
For outbound links a good alternative is to force them to open on new tabs. For that just add a target="_blank" to the links. This way they will always open on new tabs. And you don't need to worry about the tracking not going through, since the page won't unload and, again, can get rid of that setTimeout.
Disclaimer: Personal Opinion Bellow
Web Analytics Tools are not Accurate by design. And that's not bad. They are built to find and measure trends and noise in that trends. So any attempt to increase accuracy in Web Analytics tools won 't pay back. Specially when it comes in the form of ugly Javascript hacks.
Read more about Accuracy X Precision:
http://www.whencanistop.com/2009/11/difference-between-accuracy-and.html