How can I see an event's parameters values across time in Google Analytics? - google-analytics

How can I obtain this data for time ranges other then "last 30 minutes" ?
More generally, how can I obtain more informations on an event ? I went here (in the "Reports" tab) :
then clicked on my event. But there is very few informations about it, and none concern the actual parameters of the event.
I created a Dimension for 'isUserLoggedIn', but it is greyed out when I try to use it.

Related

GA4 Custom Dimensions (not set)

I added a custom parameter to my transactions. I am receiving data as when I go to Reports> Realtime>View user snapshot and click on an event I can see the parameter name and a value which is good. I can also see the value when I go to Reports>Engagement>Events and chose and event and select my parameter in the 'Events in last 30 minutes tab'. The issue comes when I go to Explore and make a Free Form with my parameter as a row or column as the column would simply show '(not set)' even though I know it is set from the before views that I mentioned
Thank you
You will see a value of “not set” for a custom dimension during the first 48 hours after you create the custom dimension.

How can I only fire a tag from Monday to Friday 09.00-17.00?

We only want to show our live chat tag Monday to Friday, from 09.00 until 17.00. Is this possible with Google Tag Manager please?
Thanks!
Preferred solution
The best solution is probably to get the current date on the server side and push to the datalayer a variable that determines whether the chat tag should be triggered or not depending on this date.
Alternative
The alternative is to retrieve the date on the client side which won't be 100% reliable. In order to use this solution, you need to create a Custom Javascript variable with the following code (replace "America/New_York" by your business' timezone) :
function (){
const currentDate = new Date(new Date().toLocaleString("en-US", {timeZone: "America/New_York"}));
const day = currentDate.getDay()
const hours = currentDate.getHours()
return day > 0 && day < 6 && hours >= 9 && hours < 17
}
Then, trigger your chat tag only when this variable's value is "true".
If you want to get a consistent, reliable date, ListenLayer.com returns a timestamp with every data dataLayer push. The time can appear in a single account timezone based on your account settings, so if you align your ListenLayer timezone to your chat time zone it will work.
You can then write rules in the platform to determine if the time returned should allow for chat. You will output a yes/no into a new data layer variable based on the rule. Then you will register this variable in GTM and use it to determine if the chat tag should fire.
Here is the process I would use at a high level
Create an account and set the account time to match your chat timezone
Turn on the User Source Listener and all it's features,
enable it to push on every page load This will push the user's traffic source into the data layer, along with a bunch of other structured data on each page load. You could use another listener, but this one will allow us to ensure it pushes on every page load (container load) so that GTM will know on every page load whether to trigger the chat script.
Create a custom data layer variable called chatTime. We will write a rule in ListenLayer to push a yes or a no into this variable based on the time that is returned in the userSource data layer event. This will happen in real time, in the same event in the data layer.
Publish everything in listenlayer and then go to your website with the console open (the data layer is written there for ease). You'll see the userSource dataLayer event in the console on every page load. It will contain an eventTimestamp. You want the data that is inside the listenlayerAccountTime node because it will match your ListenLayer timezone, which should match the timezone you operate your chat hours from (or if all of this is based on the user's time zone, use that one to be localized to them). You will need to focus on these two variables that are automatically provided because we will write a rule based on them in step 5:
sourceAutomaticValues.eventTimestamp.listenlayerAccountTime.time.timeOfDay
sourceAutomaticValues.eventTimestamp.listenlayerAccountTime.time.dayOfWeek
Here is a visual showing those variables I have given a path to above. One of the day of the week and one is the time of day.
Inside ListenLayer, under the User Source listener you will create two rules, they will be lookup table rules. The first rule will run first, then the second. If a match is found, they will stop. This means we can write the first rule to basically just look at the day of the week and set chatTime to no if the value is Sat or Sun. The second rule will then focus on the time of the day since this rule will only be reached if it is not Saturday or Sunday. In this rule we will look at the first part of the timeOfDay variable using simple ReGex. Our rule has 24 rows for each hour of the day and will return a yes only for the hours you are open for chat. Certainly this rule could be made simpler with some additional regex, but this gives a better illustration. There is an import export so you could spin up the 24 row rule in a csv file and import it.
After you save and publish this simple logic, your website will have a value in the data layer telling google tag manager whether chat should be on. It will appear in the data layer every time the userSource event is pushed, which is every page load.
I assume things are easy from here. You would create a data layer variable inside GTM referencing sourceCustomValues.chatTime You'll also create a custom event trigger referencing userSource and only firing if chatTime = yes. Then you will set your chat tag to fire on this trigger.

How can i display custom events into a chart?

I'm trying to use custom log event to have some statistics of the use of my app.
Events are properly configured and can be seen in the "Stream view" of firebase analytics.
my problem is that i want to display statistics no for only the last 30min.
for exemple if i log an event "car" which contain the property model, which can have the value 'tesla', 'ford' etc... as this :
this.defaultAnalytics.logEvent("car", {model: "tesla"});
I'm able to see in the last 30min like 75% of car.model are tesla in the stream view, but i'm not able to see this for the last week for exemple.
I can only see that the event 'car' has been emit 100 times in the last week but i can't see anything about the value of the property.
I'm i obliged to use a tool as bigquery ?
It depends which charts you want to get, but in general - you don't have to use BigQuery. You can see all your custom event parameters in Firebase console, but you have to register them first:
You can also identify up to 100 custom event parameters per project (50 numeric and 50 text) to include in reporting by registering those parameters with their corresponding events. Once you register your custom parameters, Google Analytics for Firebase displays a corresponding data card in each related event-detail report.

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

Resources