_ga cookie value, pass the value returned by the following method:
- If the user has consented to cookies, this method will return the
_gacookie value. - If the user has not consented, it will return a generated anonymous ID (instead of
null).
How to implement
1
Replace the _ga cookie
If your CRM currently receives the
_ga cookie value, replace it with window.segmentstream.anonymousId().2
If replacement is not possible
Send the
anonymousId() value to a separate field in your CRM.3
Trigger the conversion event on the same page
On the same page where the lead is sent to the CRM, you must also call
window.segmentstream.conversion({ type: 'lead' }).4
Usage example