We have Google Analytics set up through Google Tag Manager on our SPA website. We are sending virtual pageview calls on every page through a custom event in a dataLayer object. And not using the standard pageview triggers that are available in the tag manager. In the same pageview hit we are sending many custom dimensions relevant to the webpage.
In the all pages report when we look at the pageview data, without any secondary dimension then the pageviews and unique pageviews numbers are expected. However, when I apply a secondary dimension I see many unique pageview numbers turn to ZERO. This error is consistent with secondary dimensions that I send in the pageview hit (like time of the hit). And also with some of out of the box dimensions (like hour index).
Without custom dimensions:
With custom dimensions sent in the pageview hit:
With hour index dimensions:
The total numbers are not changing with the addition of custom dimensions.
I'm not sure why this is happening. Can anybody please help me understand the reason behind this?
This happens beacuse the "unique" count of pageview (or event) is associated with the first page on which it occurred, so for the second or subsequent page where the same page (or event) arose, since it is no longer unique for the current session, its value will be 0.
You can find here a comprehensive event-based explanation of this concept, but the concept is the same for page views: https://www.analyticstraps.com/eventi-totali-senza-eventi-unici/
Related
I have a gtag account setup and that also connects to google analytics.
And I have made a successful tag/trigger to make event tracking for when an FAQ item is opened at my clients FAQ-page
I am sending the trigered FAQ question text as a value as well. And I wish to have a list in Google Analytics in which the questions are shown in a list.
Am I missing something? Should I setup the trigger/tag in another way, or am I missing something in the GA.
Thanks for taking your time.
DEBUGGER
TAG CONFIGURATION:
GA:
The event value in Google Analytics must be a number. You are currently passing {{Click Text}} string, which actually gets ignored by ga object, and will not reach Google Analyitics. More details on event tracking.
Basically, you should send this text data in a text field into Analytics.
Original recommendation, using custom dimensions:
I recommend you to set up a hit based custom dimension, where you can submit additional text data in connection to your event. You'll be able to analyze it as a secondary dimension in standard event reports, or by creating custom reports.
In GTM, you have to modify either the Google Analytics setting variable, or the Analytics tag itself, and assign the desired value (click text in your case) to the custom dimension ID, which you have created in Google Analytics. E.g. custom dimension 6 gets passed like this:
An other option, based on Eike's suggestion:
You can also use any of the other standard event fields for this, e.g. send it in the label. As pointed out, this can even hold larger set of data (500 bytes), compared to custom dimensions (150 bytes). This is also easier to be implemented in GA and GTM as well, as you don't have to deal with custom dimension creation and reporting.
We'd like to track behavior flow in our single page application using Google Analytics. We use the hash to route in the application, and we can track the URL within the app with virtual pageviews as described in Google's documentation. However, many of the URLs in the application contain ids, and are considered distinct URLs, despite representing the same page. Thus, we're unable to get accurate behavior flow information in Google Analytics for those pageviews.
For example,
http://example.com/#/dashboards/8a86204a-7b10-4bf5-961b-be16d209f2b0
and
http://example.com/#/dashboards/d8d6a9b5-b6f1-4159-bd6b-622e628f87b2
would be considered distinct pages, when really, we'd like to group these two urls together to determine how users use the dashboard view, rather than how users use a particular dashboard.
Is there a way to unify URLs like this so we can view metrics and behavior flow in aggregate (either in Google Analytics, or in the SPA)?
Completing the answer from #Eike. You can indeed use virtual pageviews to just set the url to '/#/dashboards' using the command
ga('set', 'page', '/#/dashboards'); and then send your pageview. But in my opinion keep the individuality in your data and use a custom dimension to achieve the aggregation you want. Meaning that you should define first a custom dimension that is named for example 'sitePageAggregate'. This dimension will take the value of your website's 'section' url for example 'dashboards' or 'search results' or anything else that might need the aggregation for the behavior flow. This can be done by code in before your pageview hit in each page like this
ga('set', 'dimensionN', 'dashboards');
where N is the custom dimension index. More info on how you can do this here. Now you will just go to your GA interface, Under Behavior -> Site Content -> All pages and just set the secondary dimension as 'sitePageAggregate'. In that way you are retrieving the results you want.
I want to set up a Google Analytics timeline report of one metric as a function of another. Example scenario:
The user does something on page #1. On that page there is dynamically generated content, e.g. an image banner with different text.
The user interacts with that content which generates event hits with different labels (A, B, C... dynamically generated based on the dynamic content on the page).
The event hits with their labels are sent via POST to Google Analytics using the measurement protocol.
The user does (or does not) visit page #2
I want to be able to measure the efficiency of each event label defined as:
Efficiency = (Number of users visited page #2) / (number of hits for event label)
Ideally this should be able to give me an idea which are the most efficient event labels for:
particular hour of the day
particular day of the week
particular months of the year
Looking at the goal funnels it seems possible to define only funnels based on a sequence of page views, not as a function of event labels (not talking about dynamic ones at all). It also seems not possible to set it up as a content experiment because the labels are dynamic and everything should be measured long term, new labels can be added, older ones can be removed/restored etc.
Is that possible to do what I am looking for with Google Analytics?
Adding a Custom Dimension should resolve the problem. Here are the steps using Google Tag manager (GTM):
Add a custom dimension say BannerName in Google Analytics (GA)
Define variables in GTM say BannerText and BannerClick (Depending on
your page markup, css selector rules may have to be applied)
Pass BannerText value in custom dimension BannerName, it will provide
you pageviews and all GA data as you have for any dimension.
To capture clicks:
Set up a trigger that filters clicks only on specific element in
question
Pass captured values (Click text) in dimension BannerClick
Basically you will have pageview (visit) data and event (click) data collected in GA and can process it the way you want.
BannerClick variable is optional if you are able to capture banner clicks using existing click variables {click element, click text, click url}. In that case, you can just filter in reports based.
You may use calculated metric directly to further simplify calculation if you want as suggested by Jacek.
Our application needs to gather usage data through the Measurement Protocol of Google Analytics.
We can successfully send "appview" hits to the Google Analytics server, and get a proper response by it (a GIF image). The appview hits appear on the GA Dashboard, along with the country of origin, session duration, etc.
We also have several custom dimensions and metrics that we want track for each hit. We have set those up in the GA Admin panel with the correct scope, index and active state. We have 3 Hit-scoped dimensions, 3 User-leveled dimensions and 1 Hit-scoped metric, all set to Active state.
We send the dimensions and metrics as described in the docs at
Custom Dimensions / Metrics
attached to the hits they apply for, like so:
...&cm1*=3 <--for the metric
and
...&cd6*=15 <--for the dimensions (some dimensions have numeric values, others are text)
The problem is that those metrics and dimensions don't show up in our custom reports: the reports always say "There is no data for this view.". For example, we have a report that has one dimension and one metric, without any filters, set to "Any view". It doesn't matter if the Type of the report is Explorer, Flat Table or Map Overlay, it never shows anything.
There have been several days since the hits were received and appeared in the dashboard, but the reports are still empty. So scratch out any processing lag.
We tried sending "event" hits instead of "appview" hits - again, the hits show up in the Dashboard, but the reports are empty.
We cannot get any useful insights without using dimensions and metrics - so there is no way to get by without this.
Because of reasons too long to describe, we cannot use any of the Google-provided Analytics libraries.
Is there anything else we need to do to see data in those reports?
When using the measurement protocol you need to that the profile is not set to exclude bot and spiders.
Go to the google analytics website under the admin and the settings under the profile in question.
Beyond that check the realtime reports you should see the hits coming in. You will need to wait 24 -48 hours for data to appear in the standard reports due to data processing lag.
I'm having an issue with Unique Events and Total events. I don't really understand why unique events are greater than total events (image attached: https://analytics-a-googleproductforums-com.googlegroups.com/attach/584c3c65bd24cfec/Screenshot%20at%202013-05-14%2017:00:40.png?gda=9qkpgUYAAADqfLbDOUx1KZ9vP-6pB8mH0QevsNJBCwpb2zqmxh9R_FqJw8mf6kYUxitGhb4bDE5x40jamwa1UURqDcgHarKEE-Ea7GxYMt0t6nY0uV5FIQ&view=1&part=4).
Someone can explain how this is posible?
Santiago Vázquez
Found the thing: you will see that "Unique Events" are great than "Total Events" when you look at an event category or action, put "Event Label" as a secondary dimension and the event has been triggered some times with no label input. Google Analytics hasn't the option "(not set)" for this particular dimension, so it just doesn't show you those events in the Total Events Count, but still counts as "Unique Events" all the users that executed this particular event category / action.
I am seeing this same issue in my the first view of my Custom Report as well. I don't know WHY it is showing more, but there seems to be a more accurate Custom Report drilldown for you to use. In my reports, one page shows in my Page drilldown with 30 total events but 62 Unique Events. However, when I click into the next dimension drilldown view, in other words click to narrow in on just one page, it shows that same page with 30 total events and only 29 unique events. That seems more accurate.
My dimensions drilldowns for this custom report are "Page" and then "Event Label"
Hope this helps!
I think Google Analytics is simply buggy.
They have to work on event reporting a bit more.
We are tracking events and e-commerce data to our own database, and we realised that both Google Analitics and Universal Analitics misses some events and e-commerce data.
We are trying to find the reason for this, but no luck yet.
If you have a segment applied it's probably sampling. You can confirm or deny sampling is the cause by seeing if there is a yellow background note above the graph but below the date selection on the report page. There is also a grid of filled in and not filled in circles next to the new scholar cap (also below the date selection) sometimes.
Unique events are calculated by session, while total events are determined by the main dimension.
In the example report below, I wanted to look at how many events occurred on each page. The dimension drilldown is Page, with Total Events and Unique Events as metrics.
Users can visit a page, but not send an event by that page ( 0 total events ). However, if their session includes an event, then unique events will be 1 or more.
Custom reports allow data combinations that may not be clear (not sure if someone already posted this point or if I saw it in another thread). Basically, my report should not include Unique Events to prevent this problem from happening, though this was probably the wrong way to go about this altogether.
Template: https://www.google.com/analytics/web/template?uid=XafJ7KvSSf-n5KWWPyvn_g
Google has deprecated (renamed) Unique Events metric as it was seriously confusing. We are expecting to see a number of times event with unique combination of category / action and label happened per other dimensions in report. Instead GA calculated a unique combination of every dimension in the report!
Now, this metric is deprecated and renamed to legacy.
New one: Unique Events is giving expected results.
I written about why total events are higher than in my blog as too many questions.
Total Events are calculated as the total number of interactions with a tracked web page object. On the other hand, where a single user session (or visit) has one or more events, this is calculated as a single Visit w/Event, or Unique Event in the reports. For example, if one user clicks the same button on a video 5 times, the total number of events associated with the video is 5, and the number of unique events is 1.