Introduction
This guide provides everything you need to get started with Neotag implementation. Neotag helps you identify website users and track their actions seamlessly. Follow the steps below to integrate Neotag into your website.
Prerequisites & Source Setup
Before installing Neotag, ensure you meet the following prerequisites and configure your website source in the Datahash dashboard.
- You must have an active Datahash account.
- You need to have a Website source configured in your Datahash dashboard.
Go to the Setup tab of your website source in the Datahash dashboard.
Installation Snippet
You can add Neotag to your site by embedding the following script in your HTML’s “<head>” tag, or by using a tag manager like Google Tag Manager (GTM). The snippet loads Neotag asynchronously without affecting your page load time.
<script type="text/javascript">
!(function () {
var e = (window.neotag = window.neotag || []);
if (e.initialize) e.initialize.apply(e, arguments);
else {
(e.methods = [
"load", "page", "track", "identify", "alias", "group", "ready",
"reset", "getAnonymousId", "setAnonymousId",
]),
(e.factory = function (t) {
return function () {
var r = Array.prototype.slice.call(arguments);
return r.unshift(t), e.push(r), e;
};
});
for (var $L = 0; $L < e.methods.length; $L++) {
var r = e.methods[$L];
e[r] = e.factory(r);
}
(e.loadJS = function (e, t) {
var r = document.createElement("script");
(r.type = "text/javascript"),
(r.async = !0),
(r.src = "https://SUBDOMAIN/neotag/neotag.min.js");
var a = document.getElementsByTagName("script")[0];
a.parentNode.insertBefore(r, a);
}),
e.loadJS(),
e.load("2AJb9OyIA0VZ5JV6idoNoOUFUa2", "https://SUBDOMAIN/neotag/"),
e.page();
}
})();
</script>
What the Snippet Does:
- Creates an array to store the events until the Neotag object is ready.
- Stores the following methods to replay them when the Neotag object is ready.
- Loads the Neotag object with the specified subdomain.
- Makes a `page()` call to track the page views. It captures the entire URL, including UTM parameters, as part of the page call payload, such as path, referrer, search, title, and URL.
Key Methods:
Method | Description |
---|---|
load() | Loads `neotag.min.js` with the specified subdomain. |
track() | Tracks user events along with the associated properties. |
page() | Tracks page views. |
Supported Browsers
- Chrome v54+
- Firefox v47+
- Safari v7+
- Edge v80+
- Opera v43+
- IE v10+
Important Note on Existing Pixels
If Neotag is implemented for a specific pixel, and you currently have other tracking scripts (such as Meta, Snap, etc.) installed for the *same* pixel, it is crucial to pause or remove those existing scripts. Using multiple tracking scripts on the same pixel might lead to conflicts and duplicate tracking. Since Neotag handles both browser-side and server-side tracking, it’s best to consolidate your tracking through Neotag for accurate data.