Trackthemetric + Bolt
Bolt creates full-stack applications using AI prompts. Ask Bolt to add Trackthemetric so the script loads globally and tracks all pageviews.
1Gather your tracking information
Copy your Website ID and root domain from your Trackthemetric site settings.


Your script should look like this:
<script defer id="TrackTheMetric" data-website-id="YOUR_WEBSITE_ID" data-domain="YOUR_DOMAIN.COM" src="https://app.trackthemetric.com/tracker.js" ></script>
Replace the YOUR_WEBSITE_ID
and YOUR_DOMAIN.COM
with your actual values.
2Use this AI prompt in Bolt
I need to integrate Trackthemetric analytics into my application. Please implement tracking that works across all pages of my app. Add this analytics script to my project: <script defer data-website-id="⚠️[[[REPLACE WITH YOUR WEBSITE ID]]]⚠️" data-domain="⚠️[[[REPLACE WITH YOUR DOMAIN]]]⚠️" src="https://app.trackthemetric.com/tracker.js" ></script> Implementation guidelines: - For React/Next.js apps: Add the Script component to the root layout or _app.js - For vanilla HTML apps: Include in the <head> section of all pages - For Vue/Nuxt apps: Add to the app.vue or nuxt.config.js - Ensure the script loads on every route and page - Maintain the "defer" attribute for performance Please confirm the implementation method you used and verify that analytics will track across all pages of the application.
3Confirm implementation
- Use Bolt's preview to verify analytics loads.
- Deploy via Bolt's options (e.g., Vercel, Netlify).
- Check your Trackthemetric dashboard.
4Troubleshooting
Can you verify the Trackthemetric analytics implementation? Please check: 1) Which framework/structure did you use for my app? 2) Where exactly did you place the analytics script? 3) Will it load on all routes and pages? 4) Can you show me the implementation? The script should load: https://app.trackthemetric.com/tracker.js Using my website ID: ⚠️[[[REPLACE WITH YOUR WEBSITE ID]]]⚠️
Common problems
- Analytics only tracking on landing page.
- Script not included in the build process.
- Missing or incorrect tracking parameters.
- Bolt hasn't deployed the latest changes.