Back to Installation Guides

Add heatm.app to your Replit project

Use Replit Agent to add the heatm.app tracking script so it loads on every page and route of your project.

Get your heatm.app details

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:

Code
<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.

Use this AI prompt in Replit Agent

Open Replit Agent (AI assistant) and paste the prompt below. Replace the placeholders with your Website ID and domain before sending:

Code
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.

Verify installation

After Replit Agent makes the changes:


  • Run your project — Use Replit's run button to start your application
  • Open the preview — View your app in Replit's webview or open the public URL
  • Check analytics — Monitor your heatm.app dashboard for visitor data (may take a few minutes)

Troubleshooting

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:


  • Script only added to one page instead of globally
  • Wrong file modified for the project framework
  • Analytics not working in Replit's development preview
  • Project not publicly accessible for testing

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.