Integration Guides
Wix
Add OnyxMetric analytics to your Wix site
Wix adds third-party scripts through the Custom Code panel in the site dashboard, where you choose which pages load the code and where in the document it goes.
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 Wix
Custom code needs a Wix Premium plan and a connected domain. Free Wix sites cannot use it.
- Open your site's dashboard and go to Settings.
- Open Custom Code (under Advanced). Older dashboards list it as Tracking Tools & Analytics under Marketing & SEO.
- Click + Add Custom Code and paste the snippet.
- Name it, for example
OnyxMetric. - Under Add Code to Pages, choose All pages and Load code once. The script follows Wix's client-side navigation itself, so loading it on every page change would inject it repeatedly.
- Under Place Code in, choose Head.
- Click Apply.
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
- Custom Code missing from Settings: the site has no Premium plan or no connected domain. You need both.
- Duplicate pageviews: the code was added with Load code on each new page. Edit the entry and switch to Load code once.
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.