I created events on my website using gtag("event", "qualify", { site: "Example site" }) and I can see the data is being sent to GA (real time report).
Now I want to create a report showing all users that qualify (event) with the site name (event parameter). I read that I need to create a Custom dimension. Where do I select the Event name?
In my experience, you have no possibility to select the Event name. If some of your events have parameters with same names, GA will create one custom dimension. This dimension will displays in reports of every event, which has parameter with selected name.
Related
I am trying to put together a mock up for a data collection app for a local nonprofit using GSuite's AppMaker. So far I really like the tool.
One thing I need to be able to do is streamline the data entry for the site representatives. In my app, I display a list of students in a table, where one of the columns is a boolean value which represents attendance. The desired result is for the teachers to be able to input the date field one time using the date input button at the bottom of the page. Then they can quickly point and click down the Present column to log attendance.
My question is: how would I link the date selector dropdown so that the date field pre-populates with the selected date from the input field? I don't want them to have to enter the field over an over again since its the same for each row and I don't want the user experience to feel clunky.
Screenshot of the App for reference:
Using client script, you can add the following to the onValueEdit event handler of the date widget at the bottom.
var items = widget.root.descendants.<YourTable>.datasource.items;
items.forEach(function(item){
item.<DateField> = newValue;
});
The only thing to take into account is that when using client scripting, you will only update the records loaded in the table at the moment; i.e, if your table has paging, it will only update the current page. If you are using paging, then you will need to add the following code to the onPreviousClick and the onNextClick event handlers of the pager widget:
var selectedDate = widget.root.descendants.<YourDatePicker>.value;
var items = widget.root.descendants.<YourTable>.datasource.items;
items.forEach(function(item){
item.<DateField> = selectedDate;
});
I've just started using google analytics, and except of a quick beginners tutorial I don't know very much :-).
I have a website with few steps in the sign-up page. In the first step the user verifies his phone number. I want to have a list of all the users phones that completed the verification step but didn't finish the registration. In order to do this I send the following events in each step:
{eventAction: 'registration phase1', 'eventLabel': userPhoneNumber}.
{eventAction: 'registration phase2', 'eventLabel': userPhoneNumber}.
{eventAction: 'registration phase3', 'eventLabel': userPhoneNumber}.
I want to create a report that shows me all the phone numbers of the users who fired the first event but didn't fire the third event. I tried to achieve this by using event advanced filters with include and exclude condition but it seems that data being shown is not correct. I also tried to do this using the Query Explorer but I couldn't find out how to do this.
You can do this by first using the Google Analytics web UI to create a segment. You can learn more about segments here.
You'd want to use "include" and "exclude" sessions or users depending on your need. The setup will look something like this, adjust the events action/category/label as you wish to match the events you want.
Save your segment and head over to the Query Explorer.
Select the appropriate property and view which you created the segment. Under the "segment" field type in the name of the segment you just created like so:
Fill in the rest of the form with the dates, dimensions/metrics that you want and you should get results according to that segment. No additional filtering needed.
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
I'd like to use object in the atalayer. I've followed the developer docs and they show a flat data model. I'd like to push a lead object and update it as a user enters info into a Lead form.
with company, size and location, key and value.
dataLayer.push({'event': 'company_on_blur'}); //on leaving a company field
dataLayer.push('lead.company', '<company>');
dataLayer.push('lead.size', '<company-size>');
dataLayer.push('lead.size', '<company-location>');
dataLayer.push('lead.key', '<value>');
Is there a way to push all this data as a structured lead object?
onclick="dataLayer.push({
// lead data object
});
also how can I modify just one property of an object once it is pushed
dataLayer.push({'event': 'company_on_blur'}); //on leaving a company field
dataLayer.push('lead.company', '<company>'); //update the value in the object
Yes, you can push several values at once with dataLayer.push. It will become something like this:
dataLayer.push({
'event': company_on_blur,
'lead.company': company,
'lead.size': company-size,
'lead.location': company-location,
'lead.key': value
});
To update a value in object on a given event - just use the event as a firing trigger (Fire tag X when custom event equals company_on_blur).
If your idea is to get a fields values from a form and send them to GTM - it's easier to create the variables for the values extractions, create the trigger company_on_blur and fire a tag for collecting the data. You can use also a form submit click as a trigger instead of leaving the field, if you are ok to collect these only for people which clicked the submit button. This way you will collect all data at once.
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.