Server-Side Installation
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.
Collecting Anonymous IDs
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 theanonymousId
of the current user.
Collecting Session IDs
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 thesessionId
of the current user.
Sending Conversions Events
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.
Summary
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.
Last updated