Server-Side Installation
Last updated
Last updated
This guide walks you through how to set up server-side conversion tracking with Innkeepr. This involves collecting a visitors anonymousId
and sessionId
on the client side, and sending conversion event via Events API.
The anonymousId
is a unique identifier used to track anonymous users. This ID is generated and managed by Innkeepr.js.
Steps:
Retrieve the anonymousId
: Use the provided function from Innkeepr.js to get the anonymousId
of the current user.
The sessionId
is used to track user interactions during a specific session. This ID is also managed by Innkeepr.js.
Steps:
Retrieve the session ID
: Use the provided function from the Innkeepr.js to get the sessionId
of the current user.
Once you have collected the anonymousId
and the sessionId
, you can send the conversion event to the Event API.
Steps:
Prepare the Data: Ensure that the anonymousId
, sessionId
, and other necessary information are included in your conversion event. Here is an example structure of the event:
Send the Data to the Event API: Use fetch
to send the data to the Event API.
By following these steps, you can set up server-side conversion tracking with Innkeepr. Ensure that you correctly capture the anonymousId
and sessionId
and properly send the conversion event to the Event API to obtain accurate and useful analytics.