Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-ID and Custom Dimensions? #44

Open
grimmwerks opened this issue May 5, 2014 · 1 comment
Open

User-ID and Custom Dimensions? #44

grimmwerks opened this issue May 5, 2014 · 1 comment

Comments

@grimmwerks
Copy link

They seem similar from a GA standpoint; but the attribution of User-ID was added to track users across devices. Google says to implement by

ga(‘set’, ‘&uid’, {{USER_ID}}); // Set the user ID using signed-in user_id.

Is this the same as setting custom dimensions and metrics, and how do we do that with rack-google-analytics?

In some cases, you might want to send a custom dimension or metric with all the hits on a given page (or for the lifetime of the tracker object). In this case, you can set the custom dimension or metrics using the set command:

ga('set', 'dimension5', 'custom data');
To set values for both a dimension and metric, you can use:

ga('set', {
'dimension5': 'custom dimension data',
'metric5': 'custom metric data'
});
Read the Custom Dimensions and Metrics Section in the Field Reference document for the specific format of how to send this data.

@grimmwerks
Copy link
Author

...and with the user_D send - this seems to be something done on everypage; unsure if there's a way to send it into the gem so that it too sends along on page views automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant