HTML
Install EventDash with one script tag on any HTML website.
1
Add the Script Tag
Add the EventDash script to your HTML file, typically in the head section. The crawl line counts known agents such as Googlebot. It does not name an unnamed network. That report needs a server, documented on the Next.js install page.
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Website</title>
<!-- EventDash Tracker -->
<script
defer
data-api-key="YOUR_API_KEY"
src="https://www.eventda.sh/tracker.js"
></script>
<link rel="preload" as="image" href="https://www.eventda.sh/api/crawl?key=YOUR_API_KEY">
</head>
<body>
<!-- Your website content -->
</body>
</html>2
Configure Options (Optional)
Add optional configuration attributes to the script tag
html
<script
defer
data-api-key="YOUR_API_KEY"
data-domain="example.com"
data-allow-localhost="false"
data-debug="false"
src="https://www.eventda.sh/tracker.js"
></script>
<link rel="preload" as="image" href="https://www.eventda.sh/api/crawl?key=YOUR_API_KEY">3
Start Tracking
The tracker will automatically start collecting events. You can also use HTML attributes for goal tracking.
html
<!-- Track button clicks -->
<button data-ed-goal="signup_clicked">Sign Up</button>
<!-- Track scroll visibility -->
<section data-ed-scroll="pricing_viewed">
<h2>Pricing</h2>
<!-- Content -->
</section>Script Configuration Options
data-api-keyYour EventDash API key (required)
data-domainDomain being tracked (optional, for reference)
data-allow-localhostSet to "true" to enable tracking on localhost (default: false)
data-debugSet to "true" for debug logging (default: false)
Complete Example
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Website</title>
<script
defer
data-api-key="ed_your_api_key_here"
data-domain="example.com"
data-allow-localhost="false"
data-debug="false"
src="https://www.eventda.sh/tracker.js"
></script>
<link rel="preload" as="image" href="https://www.eventda.sh/api/crawl?key=ed_your_api_key_here">
</head>
<body>
<header>
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
</nav>
</header>
<main>
<h1>Welcome to My Website</h1>
<!-- Track button click -->
<button data-ed-goal="signup_clicked">Sign Up</button>
<!-- Track section visibility -->
<section data-ed-scroll="pricing_viewed">
<h2>Pricing</h2>
<p>Our pricing plans...</p>
</section>
</main>
</body>
</html>