What scope would you apply for a Custom Dimension that collects data for users who log in to your website?
When a user is known to your website or application, you should send an ID representing that user with all of your Analytics hits, such as pageviews, events, ecommerce transactions, etc., using the userId field.
Read more here: https://support.google.com/analytics/answer/6205850
Users may interact with your website or application from a number of different devices, such as a desktop web browser, a browser on a mobile phone, or via a native mobile application. By default, Analytics assigns each device a unique Client ID, and considers each unique Client ID as a unique user in your reports. User-ID enables holistic measurement of user interactions that span across devices, such as attributing an interaction with a marketing campaign on one device to a conversion that occurs on another device, or de-duplicating unique users across multiple devices.
The User-ID feature consists of:
userIdfield, which can be set to a stable, non-personally identifiable ID to represent a unique user.
- Cross-device reports that provide insight into behavior and conversion paths across devices.
When User IDs are sent with Analytics hits in the
userId field, your reports will reflect a more accurate count of unique users and offer new cross-device reporting options.
This article describes how you can configure and send User IDs to Analytics, as well as how User ID data is processed and reported in your User ID-enabled views.
Before sending User IDs to Analytics, you must enable at least one reporting view for User-ID.
Enabling a view for User-ID produces two effects on that view:
- New and unique users are calculated using unique User IDs rather than unique Client IDs.
- Cross-device reports that leverage the User ID will be enabled in that view.