When using Google Analytics' Events, you can easily create your own custom measurements.
In able for this method to work, your page must have Google Analytics already installed on your website.
An example might look like this:
<script>
window.addEventListener('message', function (message) {
if (message.data && message.data.event_type === 'spottButtonAction'){
gtag('event', 'Spott',{
'event_category':'Buy click',
'event_label':message.data.event_data.asset
});
});
});
</script>
The overall results can be viewed in the Behaviour > Events
tab on your Google Analytics page.
It's good to know that Google Analytics only allows you to see events after about 24 hours. However, you can see them come in real-time. Go to Realtime > Events
on your Google Analytics Page.
Comments
0 comments