cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to send user id to google analytics?

Former Member
0 Kudos
343

Hi,

we have one requirement send user id(unique id) to google analytics,

I configured google analytics on my local and followed steps on below link to send user id

https://support.google.com/analytics/answer/3123666?hl=en

In above link syntax provided:

 ga('set', 'userId', {{USER_ID}}); /// this is not working throws error in console 'ga' not defined
 

But in googleAnalytics.tag _gaq defined i tried using below code but this also doesn't work

 _gaq('set', 'userId', {{USER_ID}});    // tried this it doesn't works
 

Can anyone please suggest approach OR provide syntax to send user id to google analytics?

Accepted Solutions (0)

Answers (0)