How to track clicks on bottoms: pageviews vs. events on hybrid app - google-analytics

I have some categories on my website that I need to track. I want to focus on all the bottoms inside 'My profile' section of an e-commerce hybrid app. The goal is to know how many people clicked on those bottoms and how many people arrived to the destination. To track the second one I am using directly the number of sessions that arrived to those specific URLs.
My questions comes when I have been asked if we should use event tracking or pageview tracking. I think we cannot generate a pageview from a click on a bottom, so a event tracking should be implement on this case. Is this assumption correct?
Thanks!

Somewhat correct.
Technically, you can track both events and pageviews on both clicks and pageloads. Triggers don't enforce the type of an event.
In your case, we typically track both: the click event and the subsequent pageview.
This is somewhat overlapping, but really helps when the url changes, or when the CTA changes. Also helps to see how people navigated to the page when there are suddenly multiple routes.

Related

(Accelerated Mobile Pages) AMP Analytics

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.

How can I see the results of tags being fired from GTM to GA?

I will start with describing what I am trying to achieve, in order to avoid x-y problem. And if the solution I try to apply is not the best one, please, tell me a different one.
I have a website. There is an audio player on it. I would like to track in my GA how many users started the audio, how many users listened 25% of it, how many users listened 50% of it and so on. I can access the needed information (e.g. user reached 25%, so it is time to tell about this to GA through GTM) in client-side JavaScript, the question is only about setting up the GTM and GA correctly.
So, now that I described my intentions, let me show what I was able to do so far.
1 I created a custom metric with Hit scope in GA.
2 I created a tag which increments the metric created in the 1.
3 I created a custom event in GTM. When user starts playing the audio I fire the event with the help of dataLayer. And the event fires the tag which I created in 2.
4 I created a custom dashboard in GA to track how many users started the sound.
And now I am stuck. I get the needed data from my website to GTM. I trigger the tag which should send the data over to GA. I have the needed metric and dashboard set up in GA. And now I would expect the widget in my custom dashboard in GA to show that the audio was started, but it does not happen.
I am very new to GA and GTM and may not understand some concepts, as a result I may miss some necessary for troubleshooting information. I will gladly provide it if you need it.
Thank you (y).

why track email opens as events and not as pageviews

Since a while I've been playing around with the Analytics Measurement Protocol, and also used it in some test emails as described in this article:
https://developers.google.com/analytics/devguides/collection/protocol/v1/email
But what puzzles me is that Google recommends to track email views as events, not as page views.
From one side I can see the point, but on the other hand in Google Analytics I get an alert stating that I have events without page views.
Can anyone answer me why it should be done that way, or what arguments are there that speak for it? Otherwise I could also just use the Measurement Protocol to send a page view.
I do not know why Google recommends this, but I rather suspect it's because you will skew some of your metrics if you use pageviews - an opened e-mail would count as a bounce, which in turn would bring down average time on site, pages per session etc. If you make opened e-Mail an event you can avoid this.

Push Google Analytics Tracking Event on Section / Image View

I have section on our products pages towards the bottom that shows similar products. Is it possible to use event tracking to track when someone sees them? I am currently doing click tracking on them, but it would be nice to be able to track a percent of click through for different suggestion types and to know what percent of people scroll down enough to see them on smaller screen sizes.
You might be able to use something like this jQuery 'in view' plugin to fire an event when that element comes into view: http://remysharp.com/2009/01/26/element-in-view-event-plugin/
Then, when that happens, you could fire a GA event. Depending on your use-case (whether or not you want to fire more than one event if the user scrolls away again and then brings it back into view), you may want to only bind once.
This jQuery plugin:
https://github.com/robflaherty/jquery-scrolldepth
seems to be well maintained and documented. It will do more than the one Remy Sharp suggested on his blog post, which is kind of old-ish by now. It can track scrolling-depth and detect when elements come into view. Once you have both you can do what you want with events, so you can calculate CTR on visible elements/sections.
There is also a non-jQuery fork, which is not as updated but might serve just as well:
https://github.com/leighmcculloch/gascrolldepth.js

Should I track outbound links as a virtual page view, or use an event?

Looking at the documentation on the web, it seems to be a common practise to track outbound links as a virtual pageview with a URL like /outgoing/{original_url}. But a lot of that documentation is from before Google added events to analytics. Which is the preferred method nowadays - page views or events?
The 'correct' way is to track outbound links, downloads, etc. as events. - Creating virtual pageviews is a hack, from back when events wasn't released.
Virtual pageview tracking artificially inflates the number of aggregated pageview, and thereby polutes the data, so best-practice is to avoid this if possible.
However, there are cases where virtual-pageview-tracking is the only solution, and thats when you need to track the outbound link (or download etc.) as a goal - and thereby being able to optimize against this goal in AdWords.
Examples include AdWords optimization with regard to PDF-download.
If this is not the case, use event-tracking.
--
A standard snippet is (which simply is included in the specific <a>'s onclick-attribute):
_trackEvent('Outbound link', 'Click', 'http://www.external-link.com', 0)
Google has another solution to this:
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527
Which tracks the events, waits 100ms and the redirects to the external link - this imo, is not the best solution.
--
Another thing to remember, is that the onclick-event is not fired when the user right-clicks -> open in tab, or the equilivant middle-click.

Resources