Google Analytics Tracking Events - google-analytics

In our Google Analytics, we have a couple of events showing up that we have not set them up! By that, I mean, I haven't trigger those events from our website, neither through codes (ga.send('event')), nor through Google Tag Manager. I just can't figure out where they're populating from. To be specific, they're "Video" and "Livechat" events.
Is it possible that Analytics have ways of figuring some obvious events and track them for us?

Google Analytics does not send events on it's own. More likely scenarios are:
You are using third party integrations for video and livechat and
they include Google Analytics code that sends to your property (and
possibly others)
Someone else is using your tracking id in their site (you can check this by setting hostname as secondary dimension in your event reports)

Related

Google Analytics Social Interactions via. gtag.js

Google Analytics documentation seems light on this topic, but historically businesses have been able to track social sharing interactions on their websites - 'Social Plugins' - via. both ga.js and analytics.js. See here: https://support.google.com/analytics/answer/1316556?hl=en
For use case example, as a business, an analyst would like to understand how often website content is shared onto social networks by website visitors.
The problem I'm having is, I can't easily find what the gtag.js equivalent is of this functionality. The closest I can find is to send a gtag event called 'share' - but not sure if this will populate the Social Report under Acquisition in Google Analytics.
Could anyone please advise how to track Social Interactions via. gtag.js for Google Analytics?
//ga.js
_gaq.push(['_trackSocial', network, socialAction, opt_target, opt_pagePath]);
> https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSocial
//analytics.js
ga('send', 'social', [socialNetwork], [socialAction], [socialTarget], [fieldsObject]);
> https://developers.google.com/analytics/devguides/collection/analyticsjs/social-interactions
Note: I found this website which website - https://www.balkanweb.com/peshq-te-barabarte-pavaresisht-nga-madhesia/ - which does seem to use gtag event 'share' function but I am just not sure if it populates the Social reports in GA as I can't see any documentation to support that.
gtag('event','share',{method:'twitter',event_action:'tweet',content_id:targetUrl})
I made a test and I confirm that the share event mentioned does not end up in the social report but in the event report.
Since the gtag.js documentation does not mention social hits (the parameter can only be: CONFIG, SET or EVENT) I believe there is currently no way to send that type of interactions from the website with gtag.
Sadly there is no way to translate this social hit type from UA (Universal Analytics) to GA4 (Google Analytics 4) directly.
The Universal Analytics to Google Analytics 4 migration guide (by Google) mentions this in the Hit types section of the document comparing the two:
Universal Analytics hit types include page hits, event hits, ecommerce hits, and social interaction hits.
In contrast, Google Analytics 4 data is event-based, with the principle that any interaction can be captured as an event. As such, Universal Analytics property hit types translate to events in a Google Analytics 4 property.
Further down the document it also says:
[...] it’s better to rethink your data collection in terms of the Google Analytics 4 model rather than port your existing event structure to Google Analytics 4.

Google Analytics Measurement Protocol events sent via REST API are not seen on the dashboard

I am trying to use the Google Analytics Measurement Protocol to record some events happening on my server-side code. I am using the REST API as suggested here but I don't see any events on the Google Analytics dashboard.
When I try to add the event via the Google Analytics Hit Builder, then I am able to see that event in the dashboard.
I don't think any authentication is required while using the REST API and only a correct tracking ID is required which is present. I have confirmed that the POST request is not failing.
I am looking at the Realtime > Events to check whether the events are pushed or not. Is there a place where I can check the historical data to see if the events are present there.
Thanks!

How does Google Analytics filters duplicate site entrances

We are implementing a native analytics system and want to apply the same tracking principles Google Analytics uses. We've figured everything out but one thing:
Every time I refresh a page with an url that has utm-parameters attached to it, Google Analytics somehow figures out that it's not actually a visit but the same page that gets refreshed and shows only one visit in its dashboard from that particular source.
Is anybody aware how GA specifically does that so I can replicate it in our system?
I know that I can use
performance.navigation.type
in my JS script, but it doesn't give me desired results.
Any help would be much appreciated.
Attribution in GA happens on the Google servers, so JavaScript will be of limited use. Basically since a reload means that the user has the same client id and no change in the channel (source, medium and campaign are the same as in the previous visit) the existing session will be continued (a change of campaign/source information would trigger a new Google Analytics session).
Google has a very nice chart that explains how campaign information and traffic source information is processed.

Can you track video events like play, stop, and finished with Classic Analytics?

I'm new with the event tracking services offered by Google Analytics. I was just wondering if you could track video events using classic analytics or did you need to implement Universal Analytics? Plus what code would you use to implement this kind of event tracking? Any help would be extremely appreciated.
Thank You!
Each video provider (in your case Youtube/Vimeo) will have very different API callbacks so you'll need to include some JavaScript on your webpages to pick up the API callbacks when certain events are triggered (i.e. video played, video paused, video complete etc) and fire Analytics events.
I've used both of these in the past and they both provide the functionality you're looking for, they'll trigger events in your Google Analytics and should be compatible with Classic Analytics, Universal Analytics and Google Tag Manager:
Vimeo - http://www.sanderheilbron.nl/vimeo.ga.js/
Youtube - http://www.lunametrics.com/blog/2015/05/11/updated-youtube-tracking-google-analytics-gtm/

Sending events to 3rd party domains with Google Analytics Universal

We provide an iframe-based embeddable widget to our clients and want to be able to send their Google Analytics account events based on what is happening inside our iframe. We used to be able to do this using the old ga.js with the following code:
_gaq.push(['NAMESPACE._setAccount', CUSTOMER_GA_ACCOUNT_ID]);
_gaq.push(['NAMESPACE._setDomainName', CUSTOMER_DOMAIN]);
_gaq.push(['NAMESPACE._trackEvent',"category", "event", "label"]);
This code would be fired inside our iframe, but would result in an event being pushed to the customer's google analytics account, letting them have some insight into customer behavior inside our embeddable widget. The NAMESPACE in front of the actions would keep these events separate from our GA stuff, and would prevent our GA stuff from going to their GA account. They would provide us with their Google Analytics account ID when they wanted to enable this feature.
Is there a way to do something similar with the new Universal Analytics API?
I don't seem to see a similar way to namespace actions and the cross-domain tracking documentation doesn't indicate how to send events/pageviews to two domains/GA accounts (ie we want to track pageviews on our GA account, and send the events to our customer's GA account).
I suggest going the roundabout way - set a pixel in your widget and make the actual endpoint for that pixel a script on your server that sends the data via the measurement protocol to your clients analytics account.

Resources