How to install heeet Javascript

Heeet's Javascript SDK lets you easily track website visits and form submissions. Follow these steps to get started:


1. Copy and Paste the Code Snippet

Add the following code inside your website's <head> tag:

<script src="https://javascript.heeet.io?v=2"><\/script>
<script>
Heeet.trackVisit();
Heeet.trackForm("putyourformselectorhere", {
data: "putyourinputnamehere"
heeetId: "putyourinputnamehere"
});
<\/script>

2. SDK Methods

MethodParametersDescriptionHeeet.trackVisit()NoneTracks a page visit.Heeet.trackForm()formSelector: CSS selector for the form element
options.heeetId: Heeet ID of lead (Not needed if you use Heeet for Salesforce & Hubspot)
options.data: the field where the tracking data will beInsert tracking data in form.

Implementation Example

Here's a complete example of how to implement Heeet on your website:

<!DOCTYPE html>
<html>
<head>
<title>Your Website</title>
</head>
<body>
<!-- Your website content -->

<!-- Contact Form -->
<form id="contact-form">
<input type="text" name="name" placeholder="Name" required>
<input type="email" name="email" placeholder="Email" required>
<input type="hidden" name="Heeet__Data__c" id="heeet-data">
<input type="hidden" name="Heeet__Id__c" id="heeet-id">
<button type="submit">Submit</button>
</form>

<!-- Heeet Script -->
<script>
// Initialize Heeet tracking
Heeet.trackVisit();
Heeet.trackForm("#contact-form", {
heeetId: ".heeet-id",
data: ".heeet-data"
});
</script>
</body>
</html>

End Google Tag Manager (noscript)