Step 1: Install Innkeepr.js
Innkeepr.js is the starting point of every installation. It automatically captures page events from your shop or web app and sends it to the Innkeepr servers. Additionally Innkeepr.js provides building blocks for identifying users and capturing conversion events in the form of Identify and Track methods.Learn More
- Navigate to Sources.
- Click Add Source.
- From the source catalog page, select JavaScript.
- Insert your Innkeepr URI.
- Paste this snippet into the
<head>
tag of your site or a custom HTML tag of your Tag Manager.
Step 2: Identify Users
Theidentify
method is how you tell Innkeepr who the current user is. It includes a unique User ID and optional traits you know about them. You can read more about it in the identify method reference.
Note: You don’t need to manually implement
identify
if you have a source connected that supports user identification. We automatically assign an anonymousId
as well as other User IDs.identify
might look like:
f4ca124298
, which is what you know him by in your database) and labels him with name
and email
traits. When you put that code on your site, you need to replace those hard-coded trait values with the variables that represent the details of the currently logged-in user.
Step 3: Track Events
Thetrack
method is how you tell Innkeepr about events users perform on your site. Every action triggers what Innkeepr calls an “event”, which can also have associated properties. You can read more about track
in the track method reference. Here’s an example of what a call to track
might look like when a user signs up:
10.99
in revenue.
Certain Sources (e.g., Shopify), automatically implement Track calls for important events, such as
checkout_completed
or added_to_cart
, so you don’t need to set them up manually.We recommend checking out our sources catalog before implementing Track calls.track
calls, you’re done with setting up Innkeepr. You successfully installed Innkeepr.js tracking. Now you’re ready to create your first audiences.