How to send event value on Google Analytics? - google-analytics

I can check category, action, and label on Google Analytics.
However, I can't seem to check the value so I am assuming the event value is not sent.
ga('create', 'UA-XXXXXXXX-X', 'auto');
ga('send', {
hitType: 'event',
eventCategory: 'ad',
eventAction: 'duration',
eventLabel: 'ad label',
eventValue: 20
});
Let me know if I am doing things wrong or any solution. Thanks!

The real time reports dont support the event value metric. You can see this in the Dimensions and metrics repport
You need to wait and check the behavior report.

Related

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?

Event tracking using Google Analysis

I'm adding a code on the Complete instance of a video played using jwplayer for analysis using google analytics event tracking. There I need to overwrite the base URL that is sent in the analysis code. Could you please help me with the exact parameter that I need to send for that. Below is the code I'm using to send the request to Google Analytics:
ga('send', 'event', 'Vedio', 'play', 'vedio_name');
Use a configuration object to set the parameters and include the page parameter with a page path as value:
ga('send', {
hitType: 'event',
eventCategory: 'Videos',
eventAction: 'play',
eventLabel: 'Fall Campaign',
page: '/my/custom/pagepath/'
});

Google Analytics shows too many pageviews

I have a strange issue with google Analytics on a website. This site normally has about 1000 - 1500 pageviews / day (and approximately 500-600 unique users).
Since a week analytics measures between 5000 and 15000 pageviews / day, but the unique users remains unchanged. I have never had so many pageviews / day in the last 2 years, so this values can't be correct.
I checked my Chrome network panel and noticed that http://www.google-analytics.com/collect?xxxx is triggered to often. Nothing has changed on the site, so what could cause such a behaviour?
An other problem is my bounce rate. Before I updated to Universal Analytics I used the following code to trigger an event gaq.push(['_trackEvent', 'Category', 'Action', undefined, 50, true]); ("true" to signalize a non-interaction-event).
After the update I used
ga('send', 'event', 'xxx', 'xxx', 'xxx');
The bounce rate decreased to 0% (the events has been counted as "interaction-event").
I found the notice to use the following ga('set', 'nonInteraction', true); to set the non-interaction flag. But where should I use this?
Should I start with the analytics code to track the pageview
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-xxxxxx-xx', 'example.com');
ga('require', 'displayfeatures');
ga('send', 'pageview');
then set the non-interaction-flag
ga('set', 'nonInteraction', true);
and at the end trigger an event in my page content
e.g. onload="ga('send', 'event', 'xxx', 'xxx', 'xxx');"
?
see eventTrackerGuide.
non-interaction (optional)
A boolean that when set to true, indicates that the event hit will not be used in bounce-rate calculation
Every hit after the code ga('set', 'nonInteraction', true); will be a non-interaction hit.
If you want make a specific hit to non-interaction, just add non-interaction option on the hit. For example: ga('send', 'pageview', {'nonInteraction': true});
Try:
ga('send', 'event', 'xxx', 'xxx', 'xxx', undefined, true);
undefined - if you don't have a value of event

Universal Analytics Google - Custom dimensions

What's the difference between
ga('send', 'pageview', {
'dimension1': 'data goes here'
});
and
ga('set', 'dimension1', 'data goes here');
ga('send', 'pageview');
Doesn't it accomplish the same thing?
If you limit the answer the way you framed your question there is no difference at all.
The difference is that when you use set that custom dimension will be sent with every hit in the current page. Here's a better example:
1) In this example the pageview has the custom dimension attached but the event does not.
ga('send', 'pageview', {
'dimension1': 'data goes here'
});
ga('send', 'event', 'Category', 'Action');
2) In this second example both the pageview and the event have the custom dimension attached.
ga('set', 'dimension1', 'data goes here');
ga('send', 'pageview');
ga('send', 'event', 'Category', 'Action');

Google Analytics Event Tracking onClick Code

I'm trying to set up event tracking on my web site but can't get it working correctly.
My tracking code:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-420xxxxxxx', 'mywebsite.org');
ga('send', 'pageview');
</script>
My event tracking code:
Purchase Details
You are mixing classic code with universal code. It will not work. You need to replace this:
_gaq.push(['_trackEvent', 'Button', 'Click', 'Purchase Details',, false]);
With this:
ga('send', 'event', 'Button', 'Click', 'Purchase Details');
GAJS reference for Events: https://developers.google.com/analytics/devguides/collection/analyticsjs/events#implementation
Event hits can be sent using the send command. According to new analytics.js
Syntax:
ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);
For example if you want to track purchase event
ga('send', 'event', 'Button', 'Click', 'Purchase Details');
Here:-
eventCategory is Button. It is required field and its Value Type is text
eventAction is Click. It is required field and its Value Type is text
eventLabel is Purchase Details. It is optional field and its Value Type is text
eventValue is null. It is optional field and its Value Type is integer
it looks like you're using the new analytics.js instead of ga.js, so you'll want to use the proper event tracking method set:
ga('send', 'event', 'category', 'action');

Resources