Add Sumly to a Wix site
Wix adds custom code to the head of all pages. Load Sumly's line once: Wix changes pages without reloading them, and Sumly counts each change by itself.
Step by step
- 1
In Sumly, open Visitors and copy your project's line.
- 2
In Wix, open Settings › Custom Code and click + Add Custom Code. Paste the line, give it a name, choose All pages and Load code once, and place it in Head. Click Apply.
- 3
Open the published site and the visit shows on Visitors.
The whole line, as Sumly shows it with your own key.
<script defer src="https://sumly.dev/s.js" data-site="sl_your_key"></script>
Or let your coding assistant do it
Paste this into Claude Code, Cursor or Codex in your project. It fits the code to how your project is built, asks you for the dashboard steps and leaves the keys to you.
See what it says
Set up Wix for Sumly in this project.
Sumly (https://sumly.dev) shows revenue next to the visits and app users it came from. The full guide is https://sumly.dev/install/wix; read it if anything below is unclear.
Steps:
1. In Sumly, open Visitors and copy your project's line.
2. In Wix, open Settings › Custom Code and click + Add Custom Code. Paste the line, give it a name, choose All pages and Load code once, and place it in Head. Click Apply.
3. Open the published site and the visit shows on Visitors.
Custom code: The whole line, as Sumly shows it with your own key.
```
<script defer src="https://sumly.dev/s.js" data-site="sl_your_key"></script>
```
Consent: With Wix's cookie banner: a second piece of custom code, all pages, with its Code Type set to Analytics, so Wix runs it only once the visitor agrees.
```
<script>
(function tell() { window.sumly ? sumly.consent(true) : setTimeout(tell, 200); })();
</script>
```
Keep in mind: Custom code needs a published site with a connected domain, which on Wix takes a Premium plan. Code added here belongs to the domain: change the site's main domain and add it again. Do not choose **Load code on each new page**: Sumly would start again on every page.
How to work:
- Look at how this project is built first, and fit the code to its framework and its way of doing things; the examples above are a starting point, not something to paste as is.
- Steps that happen in a dashboard (Sumly, or Wix's own) are mine: tell me exactly what to click, then wait for me.
- Keys the code needs belong in environment variables, never in the code or the repository. Never ask me to paste a secret key into this chat; tell me which variable to set.
- Change only what this needs, show me the changes before you commit, and tell me how to check that it works.
- sl_your_key stands for the project's public key; it is on the Visitors page in Sumly. Ask me for it.
Consent
Wix marks custom code as Essential unless you choose otherwise, so Sumly's line runs for every visitor and, in the EU, the EEA, the UK and Switzerland, counts them without a cookie. The second piece of code, typed Analytics, runs only after the visitor agrees and tells Sumly so.
Checkout
Stripe Payment Links, pricing tables and buy buttons, Polar checkout links, Paddle buttons and Gumroad product links on your pages carry the visitor into checkout by themselves. For a checkout your own server creates, pass the sumly_vid cookie as metadata named sumly_visitor_id, or send the buyer back to a page with the script and ?session_id={CHECKOUT_SESSION_ID} (Stripe) or ?checkout_id={CHECKOUT_ID} (Polar).
Your own domain
On Starter and Growth, one DNS record serves the script from your own address, past ad blockers: under Visitors › Add tracking › Your own address, enter one such as signal.your-site.com and add the CNAME it shows. If your checkout or app is on another domain, add it under Projects and payments › Other domains: the line then carries data-domains and one person stays one visitor across them.
Clicks and sections
Clicks on links to other sites count by themselves. Mark a button with data-sumly-event="signup" to count its clicks, and a section with data-sumly-scroll="pricing" to count the page views that reached it, a goal such as reached pricing.
Good to know
- Custom code needs a published site with a connected domain, which on Wix takes a Premium plan.
- Code added here belongs to the domain: change the site's main domain and add it again.
- Do not choose Load code on each new page: Sumly would start again on every page.
From Wix's own documentation, checked 4 November 2026: support.wix.com/en/article/embedding-custom-code-on-your-site, support.wix.com/en/article/custom-code-loading-options, support.wix.com/en/article/categorizing-your-custom-code .
Other platforms
Try it with your own projects
Sign in with Google or a code by e-mail and connect your first project. Free for one project, and 14 days of a paid plan with no card.
Start freeOr look around first: open the live demo.