StatelessID

Wix

Wix lets you add tracking code through its Marketing Integrations panel or via Wix Velo. Both methods inject the snippet sitewide without editing individual pages.

Using Wix Marketing Integrations

The easiest path on Wix is the built-in tracking integrations panel. In your Wix site editor or dashboard, go to Marketing & SEO → Marketing Integrations (or Settings → Custom Code, depending on your Wix plan). Look for "Add Custom Code" or "Tracking & Analytics."

Click Add Code, paste the StatelessID snippet in the code field, give it a name like "StatelessID tracking," choose to place it in the body (end of body or before </body>), and set it to apply to All Pages. Click Apply.

Publish your site after adding the code. Wix applies custom code to the published site, not the editor preview. After publishing, open your live site URL in a browser and check your StatelessID dashboard for the first page view.

Using Wix Velo for code injection

Wix Velo is the developer mode for Wix. If your site has Velo enabled, you have more control over code placement. In the Velo sidebar, find the Public folder and open or create a file called trackingSetup.js. However, note that Velo JavaScript runs in Wix's sandboxed environment and may not have access to the window.onload event in the same way a plain <script> tag does.

The more reliable Velo path is to use the HTML Embed element: in the Wix editor, add an HTML element (Insert → Embed Code → Custom Code). Resize it to 1x1 pixel (make it invisible) and paste the full script tag into the HTML iframe editor. This creates a true browser-level script execution context.

For most Wix users, the Marketing Integrations or Custom Code path is simpler and more reliable than Velo. Use Velo only if you have specific code requirements that the standard panel does not support.

Wix and custom domains

Wix sites are hosted at username.wixsite.com/sitename by default. When you connect a custom domain through Domains → Connect a domain, your site becomes accessible at the custom domain.

After connecting a custom domain, register the custom domain in your StatelessID dashboard and use its key. Update the snippet in your Marketing Integrations panel to use the new key. The Wix internal URL (wixsite.com) will redirect to the custom domain, so visitors only land on the custom domain URL.

Wix handles SSL automatically for connected custom domains. Within a few hours of connecting, the site will be live at https://yourcustomdomain.com. Use https:// in your site registration.

Wix limitations and what they mean for tracking

Wix sites are rendered differently from conventional HTML pages. Wix uses a proprietary rendering engine that delivers content as JSON and assembles the DOM client-side. Some Wix plan tiers or page types may have restrictions on when injected scripts execute.

If the snippet fires but load time data looks off, that is because Wix's client-side rendering delays the browser's native load event. The beacon still fires — it just may report a longer load time than what a visitor actually perceived. Page view counts remain accurate.

Wix does not support server-side rendering of custom scripts in the traditional sense. The script fires in the visitor's browser after the Wix runtime assembles the page. This is normal for a hosted website builder and does not affect the accuracy of page view counts.

Troubleshooting

I added the custom code and published, but my dashboard shows no data. Wix custom code requires the site to be published — the editor preview does not execute injected scripts. After publishing, open the live site URL (not the editor preview) and check the dashboard.

The snippet was working and then stopped after a Wix update. Wix occasionally changes how custom code is handled between platform updates. Go back to Marketing Integrations or Custom Code settings and verify the snippet is still saved there with the correct placement settings.

My Wix Velo HTML embed snippet fires but the page view count seems low. HTML embeds on Wix run inside an iframe sandbox. The origin reported in the beacon may be the Wix iframe origin rather than your site's domain. Use the Marketing Integrations panel instead for accurate origin tracking.

Similar pages