Use Replit Agent to add the heatm.app tracking script so it loads on every page and route of your project.
Open your heatm.app dashboard and copy your Website ID and domain (e.g. yourdomain.com). You'll find these in your site settings or in the tracking script.
Your tracking script looks like this:
<script
defer
data-website-id="YOUR_WEBSITE_ID"
data-domain="your_domain.com"
src="https://heatm.app/js/script.v2.min.js"
></script>Replace `YOUR_WEBSITE_ID` with your actual Website ID from heatm.app. Replace `your_domain.com` with your website's root domain.
Open Replit Agent (AI assistant) and paste the prompt below. Replace the placeholders with your Website ID and domain before sending:
Help me integrate heatm.app analytics into my web project. I need this tracking script added to work across my entire application:
<script
defer
data-website-id="YOUR_WEBSITE_ID"
data-domain="your_domain.com"
src="https://heatm.app/js/script.v2.min.js"
></script>
Implementation based on my project type:
- HTML/CSS/JS projects: Add to the <head> section of index.html and all pages
- React projects: Use proper Script component in the main layout
- Next.js projects: Add Script component to _app.js or layout
- Express/Node.js: Include in your template engine or static HTML files
- Python Flask/Django: Add to base template head section
Requirements:
- Script must load on every page/route
- Preserve the defer attribute
- Use the exact source URL: https://heatm.app/js/script.v2.min.js
Please implement this and show me exactly what changes you made to which files.Replace `YOUR_WEBSITE_ID` and `your_domain.com` in the prompt with your actual values before sending.
After Replit Agent makes the changes:
If tracking isn't working, paste this into Replit Agent:
Verification prompt:
The heatm.app analytics doesn't seem to be working. Can you help debug this? Please verify: (1) What type of project am I running? (React, HTML, Next.js, etc.) (2) Which files did you modify to add the analytics? (3) Is the script loading in the browser's developer tools? (4) Will it track visitors on all pages of my site? The analytics should connect to: https://heatm.app/js/script.v2.min.js with my website ID. Please fix any implementation issues you find.
Common issues:
For advanced configuration options, see the script configuration reference. Contact support@heatm.app if you need help.
For advanced configuration options like localhost tracking, custom API endpoints, or cross-domain setup, see the script configuration reference.