How to identify and convert anonymous leads via Webhook on a site that has the SprintHub tracking script.
Identifying the 'shubid' cookie
When inspecting the website page that contains the tracking script, you will see a listing of all stored cookies. The cookie used to identify the lead is the shubid.
The image below shows this view in Google Chrome:
Page inspection tool.
Getting the page cookies
To view the cookies via code, use the following JavaScript expression in the browser console:
It will return an object with the page cookies, including the shubid. With this, the desired cookie will be available as a property of that object, as shown below:
Getting the cookie via JavaScript.
The way to send or include the cookie in a Webhook or form may vary depending on the platform used. From this point, it is assumed that the cookie can be sent correctly along with the other lead data.
Webhook: Where to send the cookie
The shubid can be sent in the request body and should be mapped as the lead identifier in the 'Identifier For' column. That way, when the integrated Webhook receives the lead data, it will be identified and it will be possible to configure actions for it under 'Extra Actions'.
Request body mapping.
Webhook: Automatic Lead Creation
For the lead to be identified and updated automatically when sending the Webhook, simply enable the 'Enable automatic creation?' option and map the fields to the keys received in the request.
'Automatic Lead Creation'.
Checking the lead's history
To check whether the lead was successfully associated, the history will show when they access a page, as well as information such as their location and the devices used to access the tracked site. It is worth noting whether the data was also updated, such as name, WhatsApp, email, etc.
You can now check whether the lead visited specific pages and, based on that, add them to an automation flow or segment, optimizing the customer journey and boosting conversion.