Git Product home page Git Product logo

Comments (5)

ianstormtaylor avatar ianstormtaylor commented on July 24, 2024

Do you have a link to the differences between custom variables and custom dimensions/metrics?

#1 is the best for sure. The problem with it though is that looking for a slot property already means you're only tracking one of five slots. Ideally you could fill all the slots with useful data.

A couple more ways you could do it:

  • 4 — Take the first 5 properties of the identify and map them to the 5 slots. This is really unstable because it requires the properties to not change order.
  • 5 — Recognize 5 properties as the properties we keep in slots (eg. 1:plan, 2:revenue, 3:gender, etc.) for analytics.js and if any of the properties are there, record them to their slot.
  • 6 — Similar to 5, but allow the properties we look for to be passed into initialize. Problem is this is just a lot of extra work for the person initializing the Google Analytics provider. And even then, what happens when you want to switch slots?

Open to others if anyone wants to chime in. At this point, it seems like a lot of work for not that much gain. If you really need this kind of tracking this badly, why not use Mixpanel or KISSmetrics which are built for trait tracking.

from analytics.js.

drd avatar drd commented on July 24, 2024

After reading more about custom dimensions & metrics, I think they match the existing analytics.js API more closely than custom variables -- they are sent along with pageviews and events rather than separately.

https://developers.google.com/analytics/devguides/platform/features/customdimsmets

I don't currently have access to the new universal analytics features, but if/when I do I'll see about integrating pageview() and track() with those features.

from analytics.js.

ianstormtaylor avatar ianstormtaylor commented on July 24, 2024

Definitely, we'll be open to taking another look at these. I'm gonna close this for now, but feel free to re-open whenever it happens

from analytics.js.

philfreo avatar philfreo commented on July 24, 2024

I'm also really interested in passing traits from identify to Google Analytics. I don't care as much about the identifier/email address, but more generic custom traits like isPaying.

I'm not really sure if "Custom Dimensions & Metrics" or "Custom Vars" are the answer, but seems like one of them is. The page above actually says:

The fundamental difference between the two is that custom dimensions are primarily managed on the server side, whereas custom variables are primarily managed on the client side.

Seems like analytics.js might be a better fit for Custom Vars, set at the "Visitor" level.

https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._setCustomVar

Then again it's tricky because you can only send up to 5 vars.

Any more thoughts on this?

from analytics.js.

dmtintner avatar dmtintner commented on July 24, 2024

Any updates on this? From what I understand there's still no way to use analytics.js with setCustomVar methods from piwik or GA. Is that correct?

from analytics.js.

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.