Google Analytics - events as secondary dimension - google-analytics

In Universal Analytics, when you in web interface open a report (let's say New vs. Returning Users) and you use Event Label as a secondary dimension, it shows no data in the Conversions section, although there are conversions.
The conversion is URL based. Event is a click on a button, correctly implemented, in Events reports I can see events.
Does anyone have an idea, why is that?

Event Label is a dimension that is only set on hits with type "event", whereas conversions based on URLs are coming from "pageview" hits, so they most likely have "(not set)" as Event Label dimension.

Related

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

how can I set a Google Tag Manager event with a value of less that $1?

How can I set a Google Tag Manager event with a value of less that $1?
I'm tracking outbound clicks via a GTM Universal Analytics event tag. Each click of one particular tag is worth 60 cents. I know that the value field requires an integer, so if I enter 1, than that would be $1.
Is there a way to set it up so that it is in cents, so that I could add 60 for the value?
As you pointed out the limitation comes from Google Analytics which only accepts integers as event value. So Google Tag Manager is not going to solve that problem for you.
What you need to think about is how to solve this problem in Google Analytics. Your options are:
Event Label: use the event level to record value as a string then use another reporting tool (eg API, Google Sheets, Data Studio) to convert those strings to numbers and used those for reporting.
ga('send', 'event', 'Cat', 'Act', '0.6');
Event Value + Calculated Metrics: you can assign the event values to a particular goal, set the values 10x what they are (eg 6 instead of 0.6) and use a calculated metric to divide those values by 10.
Ecommerce: use the price property of the ecommerce data which supports decimals.
Then the rest is just a Google Tag Manager implementation of whichever solution you choose to go for.
You can create a goal in google analytics and set the goal value to 60 cents by typing 0,6 or 0.6 depending on your country/currency and then set the trigger for that goal to your custom event, in this case your click event.
I have tested this way in my analytics account and it seems to work fine.

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

Separate form submissions by campaign in analytics

I have to campaigns running in google analytics at the same time, and, in my website, i have a contact form.
Is there any way that i can see from which of the campaigns came the message that was send to me?
For example, John has clicked in the campaign-one and send me a message, and Mario has clicked in the campaign-two and send me a message. I want to know that John came from the campaign-one and Mario from the campaign-two.
I have already been mapping events in my site, but i can't figure it out how to separate if the form came from campaign-one or campaign-two.
Thanks a lot! :-)
If you've set your campaign-one and campaign-two values to the utm_campaign parameter in your campaign tagging, it will show up in the Campaign dimension in Google Analytics.
I'm assuming by "I have already been mapping events", you mean that you have implemented event tracking on your site for these form submissions.
You can either build a custom report in Google Analytics that includes the Campaign dimension and the event dimensions (Event Category, Event Action, Event Label), or you can add Campaign as a secondary dimension to an events report. For example, in the Behavior > Events > Top Events report, choose "Secondary Dimension" and then select the "Campaign" dimension. That would break up the event numbers by which campaign the session was acquired from.
Similarly, you can look at the Acquisition > Campaigns > All Campaigns report and add one of the event dimensions as a secondary dimension there, to see campaigns broken down by events that they resulted in.

Working with event stat in google analytics api

I have the website where merchants sell some stuff. Each item has stats like unique views during last 24 hours, a week and a month and a number of visitors that clicked on "show contacts" button. Uniqueness based on IP. This works, there're huge tables that collects all (IP,item_id) pairs during the last month, and there're a lot of updates.
Today I dig into google analytics api, I would like to know if it's possible to use it instead of my system.
The fact is all this stat is private, available only for merchant, so I don't need to have all stat at a time (it's not compared etc.). So it might be requested on demand for the specific item.
I created service account, connected it to analytics data and it seems export works (based on this example). Then enabled event tracking for "show contacts" button.
For example, when user click on "show contacts" where should I add item_id? Is it eventLabel or eventValue? So, for item_id=1234 it should be
ga("send","event","Contacts","show","",1234) or ga("send","event","Contacts","show",1234)?
I'm confused with eventValue column in Top Events report (it seems that eventValue keeps a sum of all eventValues and even caculates Avg.Value). Does it mean item_id should be stored in eventLabel as string?
I added second, nonInteraction event for collecting item views, ga("send","event","Data","show","1234",1,{nonInteraction:true}). It count all events, but I need only unique ones (performed by unique visitors) in specified period of time (day, week, month). Is it possible?
1) The parameters are category, action, label and value. "Value" is a metric and is expected to be an integer. Since it's a metric it will be added up. So if you do
ga("send","event","Contacts","show","",1234)
you will increment a metric by 1234, not store an id. You do not want this (especially if you have a linked adwords account, since this will be used to calculate your "return on advertising spent").
You want to use your item_id as label, however label is a string. So what you need to do is:
ga("send","event","Contacts","show","1234")
i.e. wrap the value for your label in quotes.
2) Is there anything wrong with ga:uniqueEvents for your purposes ?

Resources