# Install on Wix

Canonical: https://sourcetag.io/docs/install-wix

Add SourceTag's tracking script to your Wix site through the Custom Code settings. No Wix apps or marketplace installs needed.

## Step 1: Copy your script tag

In your SourceTag dashboard, go to your site's detail page and copy the script tag. It looks like:

```html
<script src="https://cdn.sourcetag.io/scripts/YOUR_SITE_ID/st.js"></script>
```

## Step 2: Open Custom Code settings

1. In your Wix dashboard, go to **Settings**
2. Click **Custom Code** (under the Advanced section)

If you don't see Custom Code, you may need a Wix Premium plan. Free Wix plans don't support custom code injection.


## Step 3: Add the script

1. Click **+ Add Custom Code**
2. Paste the SourceTag script tag into the code box
3. Give it a name like "SourceTag"
4. Under **Add Code to Pages**, select **All pages**
5. Under **Place Code in**, select **Head**
6. Click **Apply**


## Step 4: Publish

Click **Publish** on your Wix site. The script won't be active until the site is published.

## Step 5: Test

Visit your published site with UTM parameters:

```text
https://yoursite.com/?utm_source=test&utm_medium=cpc&utm_campaign=wix-test
```

Open your browser's developer tools (F12 or Cmd+Option+I on Mac) and check:

1. **View page source** or the Elements panel to confirm the script tag is present in the `<head>`
2. **Application > Cookies** to confirm a `_sourcetag` cookie has been created
3. Submit a form on your site and check the form notification. You should see attribution data in the hidden fields.

## Notes

- SourceTag works with Wix forms, though Wix's native form builder has limited hidden field support. For reliable results, use an HTML embed with a custom form. See the [Wix form fields guide](https://sourcetag.io/docs/fields-wix) for details.
- If you're embedding third-party forms (Typeform, JotForm, etc.) via HTML embed on Wix, the script will detect those too via MutationObserver.
- Browser cookies are limited to 7 days on Wix. There's no server-side cookie option for Wix sites. See [Safari Cookies](https://sourcetag.io/docs/safari-cookies) for details.
- Wix Premium (or higher) is required for custom code injection. The free plan does not support it.
