When you use one of CoolaData’s Trackers, CoolaData automatically enriches each event with a user_id that uniquely identifies the end user who performed the event. This user_id is saved as a CoolaData cookie on the device that generated the event and is uniquely associated with that user_id.

In addition, you have the option to add your own user_id to each event.

To assign your own user_id to an event:

Add a property named user_id to the JSON sent to CoolaData. Internally, CoolaData stores your user_id as customer_user_id.

Note – When you use the CoolaData REST API to send events, CoolaData does not automatically generate a user_id. In order to manage user IDs, you must enrich each event with the user_id property.

Consolidating Multiple Users

If you added your own user_id to an event then CoolaData has –

  • The user_id that you sent – CoolaData stores it as customer_user_id.

– and –

  • The user_id that CoolaData automatically generated – CoolaData stores it as a cookie on the device and internally as user_id.

CoolaData treats both types of user_ids as the same user and maintains a one-to-one relationship between them.

In addition to the above, you may want CoolaData to manage multiple users as a single entity. This may be useful when you want CoolaData to consolidate the events of users that log in anonymously (or with a different login name) on the same computer or users that log in using the same name on a different computer.

To consolidate multiple users:

  • Add an alternative_user_id property containing your website/app login name to an event along with a user_id property that contains the cookie on the device (CoolaData stores this as customer_user_id). Using this alternative_user_id enables you to map multiple customer user IDs to the same internal CoolaData user_id.
  • Adding this property to any event, to some events or to all events has the same effect.

Tip – For better performance, when writing in CQL, use the user_id whenever possible, instead of the customer_user_id or the alternative_user_id.

TIP – To display the user_id that you sent to CoolaData, query the customer_user_id property.

Print Friendly