> ## Documentation Index
> Fetch the complete documentation index at: https://support.tapfiliate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to integrate the Wix store with Tapfiliate

> This article guides you through connecting your Wix online store to Tapfiliate.

November 10, 2026

### In this article, we will cover:

* [Wix integration peculiarities](#h_1943c944d4)
* [What you need before starting the integration](#h_e81b68c6fe)
* [Step-by-step setup](#h_4f580d69f4)
* [Testing and verification](#h_75f7b64e53)

Tapfiliate makes it easy to bring powerful affiliate tracking to your Wix Online Store. Add our lightweight script, and you’re ready to start rewarding partners and growing through word-of-mouth referrals. Perfect for ecommerce stores selling physical or digital products directly on Wix.

## Important things to note

* Tracking runs on your Wix thank-you page ensures customers land there for conversions to be recorded.
* Subscription renewals and off-site checkouts aren’t tracked automatically.
* Cancelled and refunded orders are not synced either: disapprove the commission or adjust the conversion amount yourself.

## Prerequisites

Before you start, make sure you have:

* A Tapfiliate account with access to your Account ID
* [Access to your WIX Editor Page](https://support.wix.com/en/article/accessing-your-editor)
* Your WIX website is in **WIX Online Store format**

## Steps to complete tracking setup

**Step 1: Locate the Wix editor**\

Go to your WIX account and find the ✏️ *Edit Site* button.

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13230304/01-72a525f0-0c60-409c-b9d4-ee48e0ade853.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=f31d935594841fa7f350b4bfcdb160b4)

**Step 2: Switch to Dev mode**\

In the *Editor* tab, find the *Dev Mode* on the top panel and switch to the dev mode.

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13230304/02-333db95f-0deb-441e-9f26-d47d87d49177.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=3614c3e9eb7d614510eed8d0f972ecdf)

**Step 3: Verify the ThankYouPage ID**\

On the left sidebar, locate your *Thank You Page* (1) and find the Thank You Page ID (2):

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13230304/03-4a399f7e-07b0-4d86-b404-cb15023b5940.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=3f45de88c736e16124429fbb7623c3ff)

By default, it’s set to `#thankYouPage1`.\

**Step 4: Add the tracking script**\

Now, switch to *masterPage.js* and paste the following code there:

> [!NOTE]
>
> `const thankYouPageId = "thankYouPage1"; // Replace with your thank you page id if not thankYouPage1`\\
>
> `const accountId = "YOUR ACCOUNT ID";`\\
>
> `import wixLocation from"wix-location";import wixWindow from"wix-window"`\\
>
> `;import{fetch}from"wix-fetch";import{local}from"wix-storage";let query=wixLocation.query;const removeUndefined=e=>{for(var t in e){`\\
>
> `if(e[t]===undefined)delete e[t]}return e};const objectToQueryString=e=>{var t,o,n,r,i,c;o=[];i=/%20/g;n=function(e,t){`\\
>
> `t=typeof t==="function"?t():t===null?"":t;o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(e instanceof Array){for(r in e){n(r,e[r])}`\\
>
> `}else{for(t in e){buildParams(t,e[t],n)}}c=o.join("&").replace(i,"+");return c};function buildParams(e,t,o){var n,r,i,c;c=/\[\]$/`\\
>
> `;if(t instanceof Array){for(r=0,i=t.length;r<i;r++){if(c.test(e)){o(e,t[r])}else{buildParams(e+"["+(typeof t[r]==="object"?r:"")+"]",t[r],o)}}`\\
>
> `}else if(typeof t==="object"){for(n in t){buildParams(e+"["+n+"]",t[n],o)}}else{o(e,t)}}const getPublisherMeta=()=>{let e=null;for(var t in query){`\\
>
> `if(t.slice(0,3)==="tm_"){e=e||{};e[t.slice(3,t.length)]=query[t]}}return e};const request=(e,t,o,n)=>{t=removeUndefined(t);t.sv="wix-v1"`\\
>
> `;const r=objectToQueryString(t);const i=e+"?"+r;o=o||i.length>2083?"POST":"GET";const c=o==="GET"?i:e;t=o==="POST"?JSON.stringify(t):null;const a={`\\
>
> `method:o,body:t};if(t){a.body=t}fetch(c,a).then(e=>{if(!e.ok)return null;return e.json()}).then(e=>{if(e&&typeof n==="function"){n(e)}})}`\\
>
> `;if(query.ref||(query.tap_a&&query.tap_s)){const e={acc:accountId,refc:query.ref,aid:query.tap_a,sid:query.tap_s,pm:getPublisherMeta(),ref:wixWindow.referrer,cup:wixLocation.url,`\\
>
> `int:"wix"};request("https://frstre.com/event/",e,null,e=>{local.setItem("tap_vid",e.vid)})}$w.onReady(function(){const e=$w("#"+thankYouPageId)`\\
>
> `;if(Array.isArray(e))return;e.getOrder().then(e=>{const t=local.getItem("tap_vid");if(!t)return;const o={customer_id:e.billingInfo.email,`\\
>
> `currency:e.currency};if(e.appliedCoupon){o.coupons=e.appliedCoupon.code}const n=e.totals.subtotal-e.totals.discount;const r={acc:accountId,vid:[t],`\\
>
> `tid:e.number,tam:n,options:o,int:"wix"};request("https://tapi.tapfiliate.com/conversions/",r,"POST")}).catch(()=>{})});`

* Make sure the thankYouPageId matches the value from the Thank You Page (Step 3);
* Don’t forget to add your Tapfiliate Account ID instead of ‘YOUR ACCOUNT ID’.

**Step 5: Click on the *Publish* button to apply the changes.**

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13230304/04-05174852-23f4-4f25-b6b4-f11b95ed9f6c.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=a001bc703d388d84de70fc4a16eac707)

## Testing and Verification

To run a tracking test, navigate to your website via an affiliate referral link in your program.\

Locate a test affiliate in your Tapfiliate account > Affiliates:

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13230304/05-57e32dce-3b15-4ca6-9ab7-4d311e225f56.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=c6f2d7faa60b31965c74febcc21c9792)

Use this link and go to your WIX website. Once the page is loaded, you should see a **click tracked** in your Tapfiliate account.

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13230304/06-137ead40-1c4c-4e29-bf52-eff2e71c9c84.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=c08e286c0e9c3f1ef84efba7d117d296)

Once you complete a test purchase on your website, you will see the **conversion record** in your Tapfiliate statistics.

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13230304/07-813588cb-2aff-4cde-9cca-210236f22a73.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=509e25faf6dbe6ba0758e8d3f507eb99)

## FAQ

**Can I connect any other WIX-based website (e.g., Wix Subscriptions)?**\

No, our integration is designed only for the Wix Online Store format.\

**Can the Wix integration be tested using the Tapfiliate Tester tool?**\

Since Wix can only render custom-formatted code, the Tester won’t work for verification. Tapfiliate Tester can read only the JavaScript code, whereas the Wix script is different.

***

**Still need help?**\

If you have any questions or if something in this guide is unclear, please don't hesitate to contact us at [support@tapfiliate.com](mailto:support@tapfiliate.com). We're happy to assist!


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.