1. Agree to the User-ID Policy

Under I agree to the User-ID Policy, set the switch to ON. Agreeing to the policy enables the feature in your account.

Click Next Step.

2. Set up User-ID in your tracking code

After you enable User-ID by agreeing to the policy, you must implement User-ID in your tracking code.

To employ User-ID, you must be able to generate your own unique IDs, assign IDs to new users and consistently reassign the same IDs to returning users, and include these IDs in the data you send to Analytics.

In this step, you can see the line of code that you have to add to your Analytics tracking code:

The tracking-code update should be completed by a developer. See Related resources below for more information.

You can employ User-ID for both websites and mobile apps. Both types of reporting views (web and app) will accept both web and app hits and report them together. With User-ID, we recommend that you maintain a consolidated view that includes all types of hits, and that you configure filtered views to isolate web and app hits as necessary.

If you're not able to assign an ID to a user, do not send the UID parameter. If you set the UID parameter to null or none when you can't assign an ID, then all of those users for which you do not have the necessary data count against your data limits and can cause discrepancies in your reporting.

Session unification

Session unification lets you associate hits that are collected before the User ID is assigned with the User ID when it is assigned, so long as those hits occur in the same session in which the ID is assigned for the first time.

Session unification is on by default.

When session unification is off, only hits that are collected when the User ID is already assigned are associated with an ID.

3. Create a User-ID reporting view

Enter a Reporting View Name.You might want to include the term "User ID" in the name to help you remember that this is a special User-ID view.

Select a Reporting Time Zone.

Under Show User-ID Reports, set the switch to ON.

Click Create.

You can create more User-ID views anytime by following the standard process to create a new view.

User-ID Views can't be converted to standard views, and standard views cannot be converted to User ID views. Only new views added to a User-ID enabled property can be designated as User-ID Views.

All reports in a User-ID view display data from sessions in which a User ID is assigned and related data is sent to Analytics. Use a different view to see data from sessions in which a User ID is not sent to Analytics.

Related resources

For details on how to add User-ID to your tracking code, refer to the instructions in the Developer Guide for your specific environment: