Analytics
3.5K members online now
3.5K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Envent tracking and session problem

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm implementing google analytics on my site. I'm trying to track events but I really don't know why I don't get any event nor any session information.

However I have checked the real time menu overview and I can see sessions on my website but I can't see any event tracking.

The code I'm using for tracking events is:

function social(type, action, url) {        
console
.log('Clicked')
ga
('send', 'social', type , action, url); }

 

I know this function is executed because I can see the console.log

Any tip with the sessions and event tracking problem? Thanks

Re: Envent tracking and session problem

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭
Hey Luis,

The code seems correct https://developers.google.com/analytics/devguides/collection/analyticsjs/social-interactions
Can you share the actual URL pls.

Also note, 'social' hit is different from 'event' hit. To the best of my knowledge it's only the event hit (not the social hit) that's currently exposed in Real Time reports. https://developers.google.com/analytics/devguides/collection/analyticsjs/social-interactions

Navigate to Acquisition > Social reports, which exposes 'social' hit data as
Social Network / Social Action / Social Entity (for the fields: socialNetwork' / 'socialAction' / 'socialTarget')

For troubleshoot purpose
a) You can use Chrome Dev Console (Network tab) and see that when the desired action occurs, a network request is made to end point: https://www.google-analytics.com/collect along with parameters t / sn / sa / st

B) Alternatively, use Google Analytics Debugger chrome plugin and see if GA 'social hit' is being sent https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna

Also ensure you're not creating GA tracker with some custom name. If that's the case, append the tracker name with 'send' command. Like ga('myTracker.send',...) https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers

Hope this helps,

Cheers!