Websites and tracking
A website (a tracking client) sends its page views and events to one project. Its analytics stay first-party, and its visits from your emails count in the results of your campaigns.
Add a website
- Open Settings → Tracking clients and choose + Add tracking client. Project admins add and change websites.
- Enter a Name and the Allowed origins your site is served from, such as
https://mysite.com, https://www.mysite.com. - Tick Issue a client secret only if a server-side SDK will send events; browser-only tracking does not need it.
You can also add one from a campaign: Add website → New website creates it and shows its snippet. From a website's menu you can Disable it, Edit allowed origins, Rotate secret or Delete it. Read Tracker security for what the client ID and the allowed origins protect.
Install the tracker
Choose Show snippet on the website and copy the version for your site:
- HTML: a script tag for any site, no npm package needed.
- Astro, Next.js, Nuxt and React: the
@usereachout/astro,@usereachout/nextjs,@usereachout/nuxtand@usereachout/webpackages.
The snippet already contains your client ID and the API address. Put it in the <head> of every page, then open Analytics or Real Time to see your first visits.
Events and visitors
Once installed, the tracker records on its own:
- a page view on load and on every navigation of a single-page app, with the page title and the referrer;
- the time each page stayed visible;
- clicks on links to other sites;
- clicks on elements with a
data-trackattribute, sent as events named after it, with the element's otherdata-*attributes as properties.
Send your own events with window.ro('track', name, properties); calls made before the script loads are queued. To tie events to a signed-in person, call identify with their ID and an identity token signed by your server: see Sign identity tokens.
<button data-track="pricing_cta" data-plan="pro">See plans</button>
<script>
// A custom event with properties
window.ro('track', 'signup', { plan: 'pro' });
// A signed-in visitor, with the identity token your server signed
window.ro('identify', 'user_42', { token: '<token from your server>' });
</script>Server-side tracking
To send events from your backend, use the Express middleware (@usereachout/express) or the Next.js route handler, with the website's client secret. Keep the secret on the server; when a website has one, server-side events without it are refused.
Goals
Goals are the pages or events that count as a conversion after someone clicks one of your emails. Each website lists them in its Goals table; choose Add goal and set:
- a Label, and a Key that is never reused;
- Counts when a visitor: Views a page (Path is or Path starts with a path) or Sends a custom event (the exact event name, case-sensitive).
A website has up to 5 active goals; archived ones stay listed. A goal counts the visits within 7 days of an email click, from the first full hour after you create it, never before; when someone clicked several emails, the last click wins.
Email attribution
Email clicks to this website decides how ReachOut recognizes a visit that comes from one of your emails:
- Add the attribution reference (default): each human click on a link to this website gets a short
ro_refparameter. It names the send and the minute, never the recipient, and lasts 60 minutes. ReachOut drops it before storing the page view; it stays in the page address, so other analytics tools on the site can see it. - Leave links unchanged: for a site that breaks on an extra parameter. Campaign analytics then show this website's page views only.
The website's status says whether it is attributing. A disabled website, or one without allowed origins, does not attribute.
Devices and bots
ReachOut recognizes a returning device with a first-party identifier kept in the browser and in a cookie limited to its tracking endpoint. When neither is available, it falls back to a daily-rotating hash of the IP address and the browser, so a device is not followed from one day to the next.
Known bots are recognized by their user agent and kept apart: they never count in your analytics.