Code Monkey home page Code Monkey logo

Comments (7)

benstr avatar benstr commented on June 3, 2024 2

@dkleiman thanks for all the research. It turns out this option can be configured through your settings.

'public': {
    'analyticsSettings': {
      'Google Analytics' : {'trackingId': <ga-id>, 'sendUserId':true}
    }
}

Reference: https://github.com/segmentio/analytics.js/blob/master/analytics.js#L12900

from analytics.

pauldowman avatar pauldowman commented on June 3, 2024

I think analytics.js does send use rid info to Google on identify. The most recent version does anyway.

Can you give us steps or ideally sample code to easily reproduce it?

from analytics.

dkleiman avatar dkleiman commented on June 3, 2024

I just set up a dedicated view in Google Analytics to view user data, and since the package automatically calls identify on login, I figured I would start seeing data in the Realtime reporting tab in GA when a user logs in. Since that didn't work, I tried calling identify setting {integrations:{"Google Analytics": true}} in the callback of the Meteor.login, but that also didn't work. All of the usual data like pageviews was being sent to GA and I could view it, but not the user data.

I think the problem might be related to analytics.js not sending user data to GA without it being explicitly specified.

It says here that "Segment will never pass anything from an identify call to Google unless you specifically tell us to."

I have since switched to using a simpler package that only handles GA, and I can see the uid.

from analytics.

KristerV avatar KristerV commented on June 3, 2024

does this send the Meteor.userId() automatically then?

from analytics.

steven-tib avatar steven-tib commented on June 3, 2024

I'm trying to get the userId (Meteor.userId()) sent to google analytics but doesn't seem to work. I've followed the different suggestions above but still not working. Isn't it necessary to specify a new "dimension" for the custom user id?
@dkleiman what is the simpler package that you are now using, which works with userIDs?

from analytics.

steven-tib avatar steven-tib commented on June 3, 2024

Ok, it was actually properly saving the data linked to each user, and found the way to display it.
By configuring properly my views in google analytics I was able to show the analytics per userId.
more info here: https://support.google.com/analytics/answer/3123666?hl=en&ref_topic=3123660

from analytics.

pauldowman avatar pauldowman commented on June 3, 2024

I'm glad you got it figured out!

from analytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.