Innkeepr
Home
  • Home
    • Welcome to Innkeepr
    • Getting Started
  • Guides
    • A Basic Installation
    • Server-Side Installation
  • Connections
    • Overview
    • The Innkeepr Spec
      • Spec: Identify
      • Spec: Track
      • Spec: Ecommerce Events
    • Sources Catalog
      • Innkeepr.js
      • Google Ads
      • Google Analytics 4
      • Meta Ads
      • Shopify
      • TikTok Ads
  • References
    • Audiences
    • Events
      • Standard events
      • Custom events
  • Support
    • Resources
      • Cookie Consent
      • Data Protection Statement
    • FAQ
    • Contact
Powered by GitBook
On this page
  • Step 1: Install Innkeepr.js
  • Step 2: Identify Users
  • Step 3: Track Events
  1. Guides

A Basic Installation

PreviousGetting StartedNextServer-Side Installation

Last updated 1 month ago

This guide walks you through setting up Innkeepr on your site.

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 methods.

Learn More

To install Innkeepr on your site:

  1. Navigate to Sources.

  2. Click Add Source.

  3. From the source catalog page, select JavaScript.

  4. Insert your Innkeepr URI.

  5. Paste this snippet into the <head> tag of your site or a custom HTML tag of your Tag Manager.

Step 2: Identify Users

The identify 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 .

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.

Here’s an example of what a basic call to identify might look like:

Innkeepr.identify('f4ca124298', {
  name: 'Michael Brown',
  email: 'mbrown@example.com'
});

This identifies Michael by his unique User ID (in this case, 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

Innkeepr.track('Checkout completed', {
  revenue: 10.99
});

This example shows that your user triggered the Checkout Completed event and checked out with 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 cataloge before implementing Track calls.

Properties can be anything you want to record, for example:

Innkeepr.track('Product Viewed', {
  id: 'c6ca124228',
  category: 'shoes',
  price: 20.99
});

If you’re just getting started, some of the events you should track are events that indicate the success of your site, like Signed Up, Item Purchased or Article Bookmarked. Innkeepr recommends that you track a few important events as you can always add more later. Once you add a few track calls, you’re done with setting up Innkeepr. You successfully installed Innkeepr.js tracking. Now you’re ready to create your first Audiences.

The track 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 . Here’s an example of what a call to track might look like when a user signs up:

Identify and Track
Innkeepr Spec
Spec: Identify
Spec: Track
identify method reference
track method reference