Wix
See what visitors do after they reach your Wix site
When someone clicks a link in a Quotient email and lands on your Wix site, you want to know what happens next. Quotient's JavaScript pixel records the visit and the pages they view while preserving the original campaign, email, or social post as the source.
You only need to install the pixel once. Wix will add it to every page on your site.
Before You Start
Wix only runs custom code on sites that are published and have a connected
domain. Connecting a domain requires a Wix site plan, so a site on the free
wixsite.com address can't use the pixel yet. You also need permission to
manage the site's settings.
Create your API key in
Settings → Developers. Choose a
Public key and give it the Analytics: write permission. For its allowed
origins, add your site's domain exactly as visitors see it in their browser,
such as https://www.example.com. If your site loads both with and without
www., add both versions. This prevents other websites from using your key.
The key should begin with pk_. Never put a private sk_ key in Wix or any
other browser code.
Add the Pixel to Wix
- Go to Settings in your site's dashboard.
- Click Custom Code in the Development & integrations section.
- Click + Add Custom Code at the top right.
- Paste the following snippet into the text box, replacing
pk_replace_with_your_public_keywith the public key you copied from Quotient:
<script src="https://unpkg.com/@quotientjs/client@0.6.2/dist/quotient.browser.js"></script>
<script>
Quotient.QuotientClient.init({
apiKey: "pk_replace_with_your_public_key",
});
</script>
- Name the code something you will recognize later, such as
Quotient. - Under Add Code to Pages, choose All pages, then choose to load the code only once per visit.
- Under Place Code in, choose Body – end.
- Click Apply.
Loading the code once matters. Wix can move between pages without a full reload, and the pixel already tracks those page changes on its own. If Wix loads the code again on every page, you may start a second copy of the pixel and count the same visit twice. For the same reason, do not add another page-view call. See Wix's custom code guide if you cannot find these settings.
Check the Installation
Visit your live site on its connected domain and move between a few pages. To confirm that the pixel is sending data:
- Open your browser's developer tools and select Network.
- Reload the page.
- Search the requests for
analytics/web. - Select the request and confirm that its status is
200.
If the request returns 403, check the key's allowed origins and Analytics:
write permission. A common cause is adding example.com when your site
actually loads at www.example.com. If there is no request, make sure the code
is applied to all pages and the snippet contains a public key beginning with
pk_.
Privacy and Consent
The pixel stores device and session identifiers in the visitor's browser. Your privacy notice and consent setup should cover this tracking.
Wix treats custom code as essential by default, which means it loads before a visitor responds to your cookie banner. If you require consent before loading analytics, open the Code Type tab while adding the snippet and choose the analytics category. See Wix's guide to categorizing custom code for details.