> ## Documentation Index
> Fetch the complete documentation index at: https://help.trfyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bolt

> Install Trfyx analytics in a Bolt-built application.

# Add Trfyx to your Bolt application

Use Bolt to add Trfyx to the application's shared layout so it works across the site. The tracking script URL should be visible and explicit in the generated implementation: `https://app.trfyx.com/script.js`.

## 1. Prepare your tracking values

Use your Trfyx Website ID and the domain you want to measure. The reference HTML snippet is:

```html theme={null}
<script
  defer
  data-website-id="YOUR_TRFYX_PROJECT_ID"
  data-domain="yourdomain.com"
  src="https://app.trfyx.com/script.js"
></script>
```

<Warning>
  Replace `YOUR_TRFYX_PROJECT_ID` with your Trfyx Website ID and `yourdomain.com` with the domain you want to track. Do not change the script URL or reuse another project's Website ID.
</Warning>

## 2. Ask Bolt to install Trfyx

Paste this prompt into Bolt:

```text theme={null}
Integrate Trfyx analytics into my application.

Use https://app.trfyx.com/script.js as the tracking script URL.
Configure data-website-id="YOUR_TRFYX_PROJECT_ID" and data-domain="yourdomain.com", replacing both placeholders with the values I provide.

Use the appropriate integration point for this project's framework:
- For React or Next.js, use the shared root layout or framework script component.
- For a vanilla HTML app, put the script in the shared <head>.
- For server-rendered apps, use the base template or global layout.

Load the tracker once across all pages and routes. Do not add duplicate copies to individual pages or components. Show me which files you changed and how to verify the tracker in the browser.
```

Review the generated code and make sure it uses the real script URL and the correct project values before deploying.

## 3. Deploy and verify

1. Test the Bolt preview to catch implementation errors.
2. Deploy the application.
3. Open the deployed URL and visit several routes.
4. Check [app.trfyx.com](https://app.trfyx.com/) for new activity in the correct project.

## Troubleshooting

If only the landing page is tracked, move the tracker into the application's root layout or shared document. If no data appears, verify the Website ID and domain, inspect browser network requests, and check for CSP or consent restrictions. Make sure the tracker has not been installed both manually and through another integration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.