Events and Goal completions don't work together? - google-analytics

I have a goal completion when user visit the specific page. Also I'm sending event from this page to count how many times user visited this page during the session (and for some other info).
Now I'm trying to make a custom report (flat table) that have info about:
Session ID (custom dimension),
Event Category (secondary dimension),
Goal completion (metric)
and Pages/Session metric.
In this case I see that Goal completion is zero for every session although I see events from the page (and I know that goal was completed in every session cause it's testing site).
If I remove Event category from custom report then Goal completion equals 1 for each session (that is true info).
And if I'm trying to use Event category in filter it is the same situation - I don't see Goal completed.

'Event Category' is a hit-level dimension, but other dimensions and metrics have session-level. It's invalid dimension-metric combination.
Try to use custom segment with conditions: include sessions where 'Event Category' = [your value].
Good explanation of scope in GA: https://www.bounteous.com/insights/2016/11/30/understanding-scope-google-analytics-reporting/

Related

Google Analytics: Unable to use a custom dimension as a secondary dimension in reports

We track search terms (e.g. michael kors handbags) entered on our site as an event (i.e. captured in eventLabel). We have a custom dimension that parse the list of product ids returned on a search page.
Example:
'michael kors handbag' returned 5 products on search page. Custom Dimension 1 parses a list of product ids: '12345, 23456, 34567, 45678, 56789'. On an event report, when I use this custom dimension 1 as a secondary dimension, no data is returned. I am seeing the two tags fired (i.e. one as an event hit and the other as a pageview hit) - I am not able to figure out why the custom dimension 1 cannot be used as a secondary dimension.
Any insight is helpful.
Thank you.
The dimension needs to be scoped at Session level, so it's available for all the hits within a session.
Probably the dimension is set at hit level, so the information doesn't persist, when you try to relate it to the event, GA cannot do it.

What happens when pushing variable to dataLayer multiple times

Lets say for instance I have a web game on a page and the code is set so that every time the player completes a level it pushes the current level to the dataLayer:
dataLayer.push({'level': currentLevelNumber});
Does this then mean I will be able to create segment in GA to see how many people made it to each level? i.e. segment1(level = 1), segment2(level = 2) etc..
Also, what are limits of this? GA has a 500 event limit per session. Is pushing a variable part of this limit or does it have its own limit?
I tried to find this information in documentation but couldn't see it.
Essentially, you're trying to report on the levels that your users are on for a particular game.
To do this, you will need to create a user-scoped custom dimension within GA.
Then you would want to push to the datalayer whenever the user moves to another level something like:
dataLayer.push({
'level': currentLevelNumber,
'event': 'user-lvl-update',
});
Then in GTM, create datalayer variable to capture "level" and create a custom event trigger for the "user-lvl-update" event.
Then in GTM, create a GA tag for the event "Level Update" and configure it normally, but this time, check the "Enable overriding settings" checkbox, under "More settings > Custom Dimensions" click on "Add custom dimension", enter in the index number of the custom dimension you created earlier and for dimension value, put in the variable where you captured level. Trigger this tag using the "user-lvl-update" trigger.
There is a limit of 500 hits per session. A hit is a pageview, event, etc. whenever you're sending data to GA. Pushing to the datalayer doesn't count towards that

GA custom dimension data not tracking

I have created the dimension, it's currently my only one so it has index 1. It has session level scope and is active.
I have also created a custom report to see any results I might get from it. All the report does is show the Session metric against my custom dimension. Nothing extra such as filters.
In my code (which until now was unmodified) I have added the following line between the 'create' and 'send' calls:
ga('set', 'dimension1', 'test');
Nothing is appearing in the report, or anywhere else when I use this dimension as a secondary dimension.
I have tried on a second GA property of mine and it also doesn't work there.
What am I doing wrong?
Generally, it takes 1-3 hrs for the dimension data to show in GA UI. But there are ways to check if the hit you sent contains the dimension or not.
On your browser, check the ga requests ( Like in chrome -> Inspect -> Network -> filter by collect). If you have included the dimension correctly, the pageview hit sent must contain cd1 parameter (1 is the index of the dimension). If the hit contains the dimension and value, then wait for few hours and your report will show the data.
You can also use Google Analytics Debigger to check the requests sent to ga by your website page

Create a segment using a custom event in Google Analytics

I want to create a segment of users which counts something like total [upgrade] events > 50. The upgrade event is a custom category in this case. How can I pass this event through to be used in segmentation?
I have tried using Event Category matches [upgrade], but that only counts players who have done one or more event in this category. I want to segment based on the number of times a user completes an event in this category.
Thanks for any insight you can lend. We're stumped over here!

How to track an event that is defined using multiple variables?

An app that lists events relative to user location, e.g. If user opens the app in Paris, France, it will say that there is Bolshoi Ballet event that is playing today 12:00. When user clicks on the showtime, he is taken to an external website that handles booking.
I am interested in two events:
User clicked on the event:
Event name (in this example [ite], "screening-view").
event variable associated with the screening (ite., "Bolshoi Ballet").
date variable associated with the screening.
time variable associated with the screening (ite., 12:00).
location (country) variable associated with the screening (ite., Paris).
vendor variable associated with the screening (ite., whatever external website handles booking).
User viewed event:
Event name (in this example [ite], "screening-book").
event variable associated with the screening (ite., "Bolshoi Ballet").
date variable associated with the screening.
time variable associated with the screening (ite., 12:00).
location (country) variable associated with the screening (ite., Paris).
vendor variable associated with the screening (ite., whatever external website handles booking).
I have looked into different options how to approach this requirement and the closest that I can see is using analytics.js events. However, it allows to register only one value (number) associated with the event:
ga('send', 'event', 'category', 'action', 'label', value);
From what I can tell, this cannot be used to visualise events (e.g. how many events have been viewed today) and analyse data (e.g. how many events have been "booked" where event is "Bolshoi Ballet" and country is "France").
Note, all variables (including country) are associated with event in this example, not derived values (e.g. not user country based on their IP).
Actually the event allows you to associate four values, since category, action and label can and should be utilized, too.
For anything else you have to set up custom dimensions. First you have to create them in the properties setting in you GA admin panel (under "custom definitions", and you probably want to go for hit scope). Then you can pass values in your event tracking calls. You have to pass them into the configuration object of the event tracking call (as opposed to set them via the set method) to make sure they are only associated with that specific event and not with all hits on that website. You do not address custom dimensons by the name you gave them in the backend (that's for the reports only) but by the string "dimension" followed by the numeric index.
ga('send', {
'hitType': 'event',
'eventCategory': 'screening-view',
'eventAction': 'Bolshoi Ballet',
'eventLabel': '2015/12/12',
'dimension1': '10pm', // time
'dimension2': 'Opéra national de Paris', // location
'dimension3': 'you know, that little ticket stall close to Monmatre' // vendor
});
You only have 20 custom dimension per property in the free version of GA. And they won't show up in the standard reports (you can set them as secondary dimension, though), but you can use them in segments, in view filters and most importantly in custom reports.
Best way to handle this is by using event based analytics tool such as: Mixpanel.com , Kilometer.io or Kissmetrics.
Tacking an event(with an array of key:value metadata) is exactly what those tools were designed to do.

Resources