Install the React SDK for TypeScript tracking. It wraps the shared tracker.
npm install @siteline.tools/react @siteline.tools/tracker
Render Analytics once with your public site id. Use useAnalytics when you need to send a named event from a component. The packages are the tracker, not an IDE extension and not an MCP client.
Pageviews are recorded by the provider. Custom events are explicit track calls. Property limits match the script: at most 10 keys, keys at most 64 characters, string values at most 256. The same cookieless collect endpoint is used. Credentials are omitted. No analytics cookie is set.
If a bundler or ad blocker drops the default origin, serve the script and the collect URL from your own domain. That proxy is your reverse proxy, not a CNAME SiteLine manages.
Install steps
- Register. The trial is 7 days, no card, from $4.99/mo.
- Add the website and copy its public site id. These docs call that id YOUR_SITE_ID.
- Install both packages.
@siteline.tools/reactis the React binding.@siteline.tools/trackeris the shared client. Neither package is an MCP client or an editor extension. - Render
Analyticsonce, near the root, with that site id. Pageviews start from the provider. Do not mount a second provider for the same site. - Call
useAnalytics().trackfor a named action. A pageview and a custom event are both billable. Creating a goal later is not.
npm install @siteline.tools/react @siteline.tools/tracker
<Analytics siteId="YOUR_SITE_ID" />
Property limits match the script: at most 10 keys, keys at most 64 characters, string values at most 256. Credentials are omitted on the collect request. No analytics cookie is set. If the default origin is blocked, point the provider at the proxied script and collect URL on your own host.