Form tracking: Sleeknote or Drift
Tracking forms using Sleeknote or Drift
Sleeknote
If you are using Sleeknote to collect leads, then here is how you can ensure we track the Sleeknote popups.
<head>
tag on each page of your site.<script>
document.addEventListener('sleekNote', function (e) {
if (e.data.type == 'submit' && window.analytics) {
window.analytics.identify(null, { email: e.data.email });
window.analytics.track('sleeknote-form-submit');
}
}, false);
</script>
Drift
If you have Drift chat on your website and want to identify users when an email is captured as part of a campaign, then, here is a snippet you can use to ensure the user is identified within Dreamdata.
<script>
drift.on("emailCapture", function(payload) {
if (payload.data && payload.data.email && window.analytics) {
window.analytics.identify(null, {
email: payload.data.email
});
window.analytics.track('drift-form-submit');
}
});
</script>