Install Spurn on Wix
Spurn runs on Wix through a custom code snippet in your site's head. It does nothing on organic visits and starts work when a visitor arrives from a paid ad.
Before you start#
- A published Wix site with a connected domain. Wix only runs custom code on sites that have both.
- Your site's public key from Spurn: Sites, then your site, then the Install tab (it is also on the Keys tab). It looks like
sp_pub_XXXXXXXXXXXXXXXXXXXXXXXX.
Add the tag#
In your Wix dashboard, go to Settings, then Custom code (under Development & integrations, or Advanced, depending on your site).
Click + Add Custom Code.
Paste this, with your public key:
<script async src="https://spurn.io/s.js" data-site="sp_pub_XXXXXXXXXXXXXXXXXXXXXXXX"></script>Name it
Spurn.Under Add Code to Pages, choose All pages and Load code once.
Under Place Code in, choose Head.
Click Apply.
Wix moves between pages without reloading them, so loading the tag once per visit is right: it keeps track of the paid session itself.
Wix ties custom code to your domain. If you change the site's primary domain, Wix deletes the snippets, and you need to add this one again.
Report Wix Stores orders (optional)#
Detection and blocking work without conversions. Reporting them adds evidence: a click that led to a purchase counts in its favour, and the dashboard shows which paid clicks converted.
Add a second snippet the same way (All pages, Load code once, Body - end):
<script>
window.spurn = window.spurn || function () { (window.spurn.q = window.spurn.q || []).push(arguments) }
function spurnListen() {
window.wixDevelopersAnalytics.register('spurnConversions', function (eventName, data) {
if (eventName !== 'Purchase') return
spurn('conversion', { value: data.revenue, currency: data.currency, orderId: data.orderId || data.id })
})
}
window.wixDevelopersAnalytics
? spurnListen()
: window.addEventListener('wixDevelopersAnalyticsReady', spurnListen)
</script>
It listens for the same Purchase event Wix's own Google Ads conversion guide uses. Only buyers who arrived on a paid click are reported. Place a test order on your live site and check the click shows as converted in Spurn.
Check it works#
- Add your own IP address to the allowlist in Spurn (Blocking, then Allowlist), so your tests are never blocked.
- Open your live site with a test click id:
https://yoursite.com/?gclid=test-123. - Open Clicks in Spurn. The visit appears within a minute, and the site's Install tab shows Receiving.
A test landing counts as a real paid click and uses one credit. Custom code doesn't run in the Wix editor's preview.
Troubleshooting#
Nothing arrives. Check the site is published on its connected domain and the test URL has a click id. Visits without one are ignored by design.
Clicks are rejected for the wrong site. Spurn checks the page reporting a click against your site's domain and extra hosts. If the site also answers on another domain, add it in Sites, then your site.
The tag is blocked. Ad blockers can stop the tag in your own browser; try a private window without extensions.
A consent banner holds the tag back. Wix's cookie banner can hold custom code until the visitor accepts, depending on the category you give it. Visitors who decline aren't checked by the tag. The tracking template still records the IP behind Google and Microsoft clicks: /docs/guides/tracking-template.
Wrong key. The tag takes the public key (sp_pub_…). A secret key (sp_sec_…) must never go in a page; if one did, revoke it in Sites, then your site, then Keys.
What data is sent#
On paid landings only: the landing URL and referrer, the IP address and user agent, browser signals used to spot automation, and engagement such as time on page and scrolling. The order snippet sends the order id, total and currency. See /docs/detection.