Follow these steps to integrate heatm.app analytics into your Angular application.
Add the tracking script to your Angular application in your main index.html:
1. Open your `src/index.html` file
2. Add the script to the `<head>` section:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Angular App</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<!-- Add heatm.app tracking script -->
<script
defer
data-website-id="YOUR_WEBSITE_ID"
data-domain="your_domain.com"
src="https://heatm.app/js/script.v2.min.js"
></script>
</head>
<body>
<app-root></app-root>
</body>
</html>Replace `YOUR_WEBSITE_ID` with your actual Website ID from heatm.app. Replace `your_domain.com` with your website's root domain.
After implementing:
For advanced configuration options like localhost tracking, custom API endpoints, or cross-domain setup, see the script configuration reference.