# Install on Kajabi

> Add MetricRaven to Kajabi site pages with Page scripts and to checkout with the checkout tracking code.

Source: https://metricraven.com/docs/install-kajabi  
Markdown: https://metricraven.com/docs/install-kajabi.md  
Section: Installation guides

Kajabi has two places for scripts: one for your site pages, and a separate one for checkout pages. Add the tag to both to follow visitors through to purchase.

## Site pages

1. **Open Settings → Site details**

   In your Kajabi dashboard, open **Settings**, then **Site details** under the site settings.

2. **Paste the snippet into Header Page Scripts**

   Replace `YOUR_SITE_ID` with the public site ID from your site's **Settings → Install** card. The site ID is public and safe in browser code; never put your secret key in a page.

   ```html title="Page scripts → Header Page Scripts"
   <script
     defer
     src="https://metricraven.com/js/script.js"
     data-site-id="YOUR_SITE_ID"
   ></script>
   ```

   Save. It loads in the head of your website, product, lesson and landing pages.

## Checkout pages

1. **Open Settings → Payment settings → Checkout**

   Header Page Scripts don't run on checkout, so add the tag here as well.

2. **Paste the same snippet into the header tracking code**

   ```html title="Checkout Tracking Code → Header tracking code"
   <script
     defer
     src="https://metricraven.com/js/script.js"
     data-site-id="YOUR_SITE_ID"
   ></script>
   ```

   Save. Each offer can switch the header tracking code off, so check that it is on for the offers you sell.

3. **Open your site in a private window**

   Browse a page, then open an offer's checkout.

> **Verify it works**
>
> Open your live website in a normal browser window (not an automated or embedded one). In the browser's Network panel, look for `script.js` and then a request to `/api/v1/collect` whose response contains `ok: true`. Open your site's **Traffic** tab and choose **Refresh**; the selected dates must include your visit.
>
> Nothing showing? See [Troubleshooting](https://metricraven.com/docs/troubleshooting).

## Notes

- Only hostnames listed in your site's **Settings → General → Site** domains (and their subdomains) are accepted. To also count visits on a platform address such as `your-site.mykajabi.com`, add it there; otherwise those requests are refused with `domain_not_allowed`.
- Sales show in MetricRaven only if they're paid into a Stripe account you connect. See [Other Stripe methods](https://metricraven.com/docs/stripe-other-methods) for what can be linked to a visit.
- If you use a cookie banner, connect it with [Consent & visitor IDs](https://metricraven.com/docs/consent).

## Attribute sales

To credit Kajabi sales to the visits that brought the buyer, connect Stripe and follow [Attribute revenue with Kajabi](https://metricraven.com/docs/attribution-guide-with-kajabi).

Optional script attributes are listed in [Install & verify](https://metricraven.com/docs/install). To exclude your own visits, see [Exclude your visits](https://metricraven.com/docs/exclude-visits).
