How do I view the values in Track_URL defined by Google Javascript events - google-analytics

This is the following event I am capturing in Google Analytics.
How do I view the event_label in Report or Explore options. What is the dimension that I need to select?
When I was viewing custom report/explore I simply done see any event category
gtag('event', 'Track_URL', {
'event_category': 'URL Tracking',
'event_label': window.location.href
});
Cannot find event_category dimension

Related

Google Analytics 4: custom dimensions in gtag.js

I am trying to send some custom dimension together with my event.
This is my code:
gtag('config', 'G-XXXXXXXXXX', {
'custom_map': { 'dimension1': 'age' }
});
gtag('event', 'age_dimension', {
'event_category': category,
'event_label': action,
'value': data(),
'nonInteraction': 1,
'age': '666'
});
This is my dimension on UI:
I am sending my events together with my custom dimension, on UI I see all my data as parameters in the event,
but when I try to make something with my dimension GA just says me that there is no data for this dimension.
I don't know, probably I configured the map incorrectly or probably something wrong with the dimension which I created.
So the question, is my configuration and dimension correct? and if no, what is wrong? thanks!

Event Tracking not Appearing In Analytics

I am trying to use Google Event Tracking to record when a certain user action is taken. I have a JS method called runGABanner that fires the Google Analytics code when conditions are met, but I'm not seeing anything update in GA Admin page.
In my code, I set up the GA code as such:
const runGABanner = () =>{
ga('send', {
hitType: 'event',
eventCategory: 'AdBlocker',
eventAction: 'Ad Blocker Displayed',
eventLabel: 'Ad Blocker'
});
}
I was expecting to see "Banner Displayed" under "Event Action", but as the screenshot shows, nothing is appearing there.
Any thoughts as to why this is happening?

Google Tag Manager and Google Analytics tracking

I have configured GTM and GA on my website. I installed GTM Assitant (chrome extension) to try and it works perfectly.
When I check GA Real Time event, my GTM is returned.
My question is : Someone know if I can track click count by week, month, year like page view ?
Thanks.
EDIT :
<div class="phone">
<a href="#" onclick="gaEvent()" title="voir notre numéro de téléphone">
<span class="infosPhone">Assistances</span>
</a>
</div>
<script>
gaEvent() {
gtag('event', 'phone_track_click', {
'event_category': 'click',
'event_label': 'Clique téléphone'
});
}
</script>
When the user click, phone number is displayed.
To see how many events over a period of time, you will use the "Behavior > Events" reports. Click on the "Top Events" report:
In your case, the event your tracking has the following structure:
Category: click
Action: phone_track_click
Label: Clique téléphone
So in the "Top Events" Report, under the "Event Category" column click on the "Click" category, example:
Once you've clicked on the "click" category, you should be presented with a list of actions within that category, click on the "phone_track_click" action
Once you've go into that event action, you will be presented with the labels. Do the same thing and click on the "Clique téléphone" label and you should be presented with something similar to:
You can adjust your date range and see the total for that period (say a year) under "Total Events" and "Unique Events".
You can adjust the graph to show by "day", "week", or "month" on the top right. Hover over the data points to get the value.
Yes you can, you would have to use Google Analytics Event Tracking.
Google tracks click on button and display result in format which you desire with many other additional features.
Implementation :
On click you would have to call this script code provided by google
gtag('event', <action>, {
'event_category': <category>,
'event_label': <label>,
'value': <value>
});
You can update this code according to your needs
<action>, <category>, <label>, <value> // these values should be replaced according to your needs.
Sample Code
<button onclick="gaEvent()"> Click Me <button>
<script>
gaEvent() {
gtag('event', 'track_button_click', {
'event_category': 'click',
'event_label': 'My button click'
});
}
</script>
NOTE: Add this in header of page where you want to track events update GA_TRACKING_ID with your ID.
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_TRACKING_ID');
</script>
All this can be referred from official documentation https://developers.google.com/analytics/devguides/collection/gtagjs/events

gtag not pulling URL in label

I'm trying to pull the URL dynamically as a label when an event is triggered. I've set the gtag like as below:
gtag('event', 'Lead generation', {
'event_category': 'ACT',
'event_label': **url**
});
You need to pull the URL :
gtag('event', 'Lead generation', {
'event_category': 'ACT',
'event_label': document.location.href
});
But in terms of GA, this is a bad approach. You can always add secondary dimension page, to know the URL where it was fired ;)

Viewing gtag Custom Events Data in Reports

I have setup the new gtag custom event tracking code and it appears to be creating events as I see the previous category, action, and labels appearing under Events > Top Events. HOWEVER I can't figure out where I can view my "custom" parameters I have specified. For example, I am also recording "link_Text" and "time_taken" parameters on events.
gtag('event', category, {
"event_category": category,
"event_action": action,
"event_label": label,
"link_Text" : linkText,
"time_Taken": time_taken,
});

Resources