Integration
Quickstart
Install the Tracuto loader, verify origins, and send first events.
Create a workspace, copy the loader from Complete setup or Project settings, paste it on your site, and confirm the three verification stages in the dashboard. For native apps, see Android or iOS instead of the web loader.
1. Workspace and project
Sign up to create an organization and project. After sign-in, open Complete setup or Project settings for your script URL and allowed origins. Do not guess project ids or hosts.
2. Install the loader
Add one async script tag. Defer until after consent if your policy requires it (see Consent article).
<script src="https://YOUR_LOADER_HOST/client/YOUR_PROJECT_ID.js" async></script>Integrate with AI
Copy this prompt into your coding assistant. It tells the agent to ask you for your Tracuto script tag from Complete setup before changing code.
Paste into Agent or Composer
Integrate Tracuto analytics on this codebase. Documentation — read before wiring business events: - Conversions & revenue (required for funnel outcomes): https://tracuto.com/integrate/conversions - Events vs automatic capture: https://tracuto.com/integrate/events - Identity after login: https://tracuto.com/integrate/identity - Browser API reference: https://tracuto.com/integrate/api - Consent & deferred loader (if applicable): https://tracuto.com/integrate/consent Before you write or change any code: 1. Ask me for the exact loader <script> tag from my Tracuto dashboard (Complete setup or Project settings). Do not guess hosts, paths, or project ids. 2. Ask which pages or layout should load the script, and whether the script must wait for cookie or consent approval. 3. Ask which user actions are business conversions (purchase, signup completed, trial started, etc.) vs exploratory track() events. Follow the conversions doc for naming, revenue value, and metadata. Implementation rules: - Add one async <script> tag using only the URL I provide. - Guard every Tracuto call with window.Tracuto?.isReady?.() - Page views and contextual clicks are automatic; do not duplicate them with track(). - Wire measurable outcomes with Tracuto.conversion() per https://tracuto.com/integrate/conversions (revenue in the value argument; currency, orderId, items in metadata). - Use Tracuto.track() only for non-conversion signals (steps, views, experiments) per https://tracuto.com/integrate/events. - After login, wire setUserId and identify per https://tracuto.com/integrate/identity. - Match this project's framework, routing, and SSR patterns. When done, list files changed, which conversion() calls you added and where, and how to verify in Tracuto Complete setup.
3. Verify in the dashboard
Complete setup shows three stages:
- Snippet generated for your project
- Project URL saved (auto-added to allowed origins)
- Browser fetched the client bundle from an allowed origin
After the bundle loads, ingest events confirm collection is working.
- In the browser developer tools, confirm requests to Tracuto succeed. If collection is blocked, check Allowed origins for your exact origin.
- Match http vs https and hostname to the environment you configured (local vs production).
- Session replay and experiments follow the same project and origin rules as analytics.
4. Track and identify
Contextual clicks and suggested event names are automatic. Call Tracuto.track() / conversion() for explicit business events; use Key actions in the dashboard to approve click names. Identify users after login (Identity article).
if (window.Tracuto?.isReady?.()) {
window.Tracuto.track('cta_signup_click', { category: 'hero', label: 'Get started' });
window.Tracuto.conversion('signup_completed', undefined, { source: 'integration_guide' });
}See Identity and Browser API.