Kajabi
Add OnyxMetric analytics to your Kajabi site
Kajabi has a site-wide Header Page Scripts field under Site details that puts code in the <head> of every page. It skips Offer checkout and upsell pages on purpose, and those have their own Checkout Tracking Code section.
Copy your tracking snippet
In OnyxMetric, open your site's Site Settings and copy the tracking script. It looks like this:
<script src="https://app.onyxmetric.com/api/script.js?siteId=YOUR_SITE_ID" async></script>YOUR_SITE_ID is the numeric ID of your site.
Add the snippet to Kajabi
Site-wide pages
- From the Dashboard, open Settings.
- Under Site settings, click Site details.
- Scroll to Page scripts and paste the snippet into Header Page Scripts.
- Save.
Checkout and upsell pages
- From the Dashboard, open Settings.
- Under Payment settings, click Checkout.
- In Checkout Tracking Code, edit the Header tracking code and paste the same snippet.
- Save.
Do not paste the snippet into a page's Custom Code section under Customize > Settings. That field takes CSS and JavaScript without <script> tags, and it applies to that one page only.
Check that it works
Load your live site and click through a few pages. Pageviews show up in the OnyxMetric dashboard within seconds.
If nothing arrives:
- View the page source and search for
script.js?siteId=to confirm the tag is present. - In the browser's Network tab, check that
script.jsreturns200and that requests go to/api/track. - Turn off ad blockers, or proxy the script through your own domain.
- Read script troubleshooting for other causes.
Troubleshooting
- Checkout pages missing: Header Page Scripts do not run on Offer checkout or upsell pages. Add the snippet under Settings > Checkout > Checkout Tracking Code as well.
- One visitor, two sites? Use the same site ID in both places, so a visitor who browses and then buys is one session and funnels can follow them through checkout.
- Snippet in a Custom Code block: the Add block > Custom Code block accepts
<script>tags but covers only that page. Keep the site-wide field as the main copy.
Next steps
- Track custom events such as signups, purchases, and clicks.
- Identify users to tie sessions to accounts.
- Proxy the script through your own domain to get past ad blockers.
- Script attributes let you skip or mask URLs and tag events.