urx.si/docs/website-analytics
Install website analytics
See who visits your website, where they come from and which pages turn them into customers. Setup takes about five minutes and visitors stay anonymous.
Before you start
- A URX account, and a project for the product the website belongs to.
- A way to edit your website's pages, or its shared layout or theme.
- A way to upload one small text file to your site, so we can confirm it is yours.
Install in three steps
- 1Add your websiteOpen Website analytics in your dashboard and enter the address people type to visit your site, for example
yourproduct.com. - 2Paste the scriptCopy the script from the setup screen. It already contains your site's token. Paste it inside the
<head>of every page, or once in your shared layout or theme. - 3Show us the site is yoursSave the code from the setup screen as a text file at
/.well-known/urx-analytics.txton your site, then press Check installation. Nothing is recorded until this check passes.
The script looks like this. Use the copy on your setup screen, since it has your real token:
<script defer src="https://urx.si/urx-tracker.js"
data-urx-token="YOUR_SITE_TOKEN"></script>Where to paste it
- Plain HTML: inside
<head>on every page, or in your shared template. - Next.js: in the
<head>ofapp/layout.tsx. Page changes are tracked automatically. Save the ownership file aspublic/.well-known/urx-analytics.txt. - WordPress: add it to your header with a plugin like WPCode, or paste it before
</head>in your theme'sheader.php. Upload the ownership file with your host's file manager.
Check it works
After the installation check passes, the setup screen waits for your first visit. Open your website in another tab and it shows up within a few seconds. If nothing arrives:
- Make sure the script is on the page you opened (view the page source and search for
urx-tracker.js). - If your site uses a Content Security Policy, allow scripts and connections to
urx.si. - Ad blockers can hide your own visit. Try a private window or another browser.
What you will see
- Visitors, revenue, conversion rate, revenue per visitor, bounce rate, visit length and who is online, each against the period before. Click one to chart it; click a day to see it hour by hour, or press N for the last 30 minutes.
- Where visitors came from (channel, referrer, campaign and the Smart Link they clicked), their pages (entry, exit, 404s, downloads), countries and devices. Click any row to filter everything; open a page's flow to see where people came from and went next.
- A live map (press M) of who is on your site now, with a Buying Score for each visitor and the reasons for it, and a profile of every visit they made.
- Insights in plain sentences: which source brings the money, the best converting country, how long people take to buy and when they visit.
- Goals and funnels, once you add them, with what each funnel step's visitors paid.
You can also pause tracking, leave out pages such as /admin, change the time zone reports use, and choose how long visits are kept. Pausing stops new visits being recorded but keeps what you already have.
Track sign-ups and goals
A goal is something you want visitors to do. In Website analytics, open Goals and add one of these:
- A page visit, such as
/thank-you. - Scrolling a set amount down a page.
- An event you send from your site with one line of code:
window.URXAnalytics.goal("signup", { plan: "starter" });For things that must be exact, such as a paid sign-up, send the goal from your own server with an API key instead of from the browser. To see where people drop off, create a funnel with two or more steps in order, for example landing page, pricing, sign-up.
More to track
- File downloads are counted on their own: any link to a file (PDF, ZIP, DMG, APK and so on), or with a
downloadattribute. - Missing pages: add
data-urx-404to the script on your 404 page, or callURXAnalytics.notFound(). - Page speed: add
data-urx-vitalsto see Core Web Vitals from real visits. Each page load sends its speed once, as an extra event. - Names on visitors: after someone signs in, call
identifywith a name and picture to show them on the live map and in profiles. The account id stays in your browser. - Subdomains: turn on Count its subdomains too under Websites & tools to follow visitors between
yourproduct.comandapp.yourproduct.com. - Smart Links: links to your verified website say which link brought each visit. Nothing to set up.
<script defer src="https://urx.si/urx-tracker.js"
data-urx-token="YOUR_SITE_TOKEN"
data-urx-vitals
data-urx-404></script>window.URXAnalytics.identify(user.id, { name: user.name, image: user.avatarUrl });Moving from Plausible
Add your website and verify it as above, then keep your Plausible snippet and point it at URX with data-api. Page views, goals with their properties, outbound clicks, file downloads and 404s arrive as they do in Plausible. When you are ready, swap it for the URX script.
<script defer data-domain="yourproduct.com"
data-api="https://urx.si/api/event"
src="https://plausible.io/js/script.js"></script>Privacy options
Each website uses one of three modes. You can change it later.
- No cookies (default): visitors are counted anonymously each day, so you do not need a cookie banner. Returning visitors on another day count as new.
- Cookies: returning visitors are recognised, so you see repeat visits more accurately.
- Ask first: nothing is recorded until the visitor agrees. Do Not Track and Global Privacy Control are respected.
You can delete a single visitor's data or export everything you have collected at any time.
Share your dashboard
Share your traffic with investors, buyers or your audience. Choose a public link, a secret link or a password, and an end date. Shared dashboards show totals only, never individual visitors or revenue. Turn sharing off or create a new link at any time and the old one stops working.
Add revenue
Connect your payment provider in Revenue to see which pages and sources bring paying customers. Revenue always comes from the provider itself, never from what a browser reports. How we verify revenue.
Using Stripe Checkout? Keep ?session_id={CHECKOUT_SESSION_ID} in your success URL and put the script on that page. URX asks your connected Stripe account whether the checkout was paid and records it in that visit, with no code. Revenue in website analytics is on Pro and up; Free records payments so you see them when you upgrade.
Reference
- Script:
https://urx.si/urx-tracker.js, loaded withdefer. Your site token is public and only identifies the site; it is not an API key. - Single-page apps: route changes are tracked automatically. Load the script once per page. If your router needs it, you can send page views yourself instead.
- Ownership file:
https://your-site/.well-known/urx-analytics.txt, containing only the code from the setup screen. - Other installs: browser and server SDKs, a WordPress and WooCommerce plugin, and Shopify. See Integrations in your dashboard.
- API: server-side goals and exports use an API key. See the developer reference.