Wix
Wix custom code needs a premium plan and a connected domain.
Steps
- In your Wix dashboard, go to Settings and open Custom code (under Advanced).
- Click Add custom code and paste the snippet below.
- Set it to load on All pages, in the Head, and apply it.
- Publish your site.
The snippet
Replace SITE_ID with the ID from your Glyphex site settings.
<script defer src="https://glyphex.io/t/SITE_ID.js"></script>
Verify it works
Open your live site in a new tab, then open Realtime in your Glyphex dashboard. Your visit should show up within a few seconds. You can also open your site's Getting started page and click Check installation, which fetches your URL and looks for the tag.
Cookies and consent
Glyphex sets no cookies and stores nothing on the visitor's device, so it needs no cookie banner.
Track custom events
HTML embed elements run in an iframe, so declarative attributes do not reach your page. Listen for clicks in custom code instead:
<script>
document.addEventListener("click", function (e) {
if (e.target.closest("a, button")) {
var label = (e.target.textContent || "").trim();
if (label === "Sign up") {
window.analytics.track("signup_click");
}
}
});
</script>Events can also be sent with window.analytics.track(name, props) or the declarative data-glyphex-event and data-glyphex-event-<prop> attributes.
Troubleshooting
- No data? Check that the Site ID matches exactly and the page was republished or the cache cleared.
- Ad blockers can block analytics scripts. Disable yours to test.
- Content Security Policy: allow https://glyphex.io in both script-src and connect-src.
- Check DevTools > Network for a request to glyphex.io/t/. A 404 means the Site ID is wrong.