Get Your Tracker Script
To install the eMarketeer Web Tracker on your website, follow these steps:
- Retrieve your tracker script from your eMarketeer account (admin access required).
Go to
Settings → Plugins & Integrations → Website scripts - Place the script on your website so that it loads on every page.
- Ensure all pages on your site are encoded in
UTF-8
.
(Make sure your HTML includes:<meta charset="utf-8">
inside the<head>
)
Base Tracking Script
Paste the following script tag on all your pages:
<script type="application/javascript" src="https://develop.emarketeer.com/public/scripts/t.js"></script>
Script Functions
After the base script has loaded, use the following functions to control tracking behavior. No tracking occurs until these functions are triggered — giving you full control for GDPR compliance.
emtv2.init(‘<unique id>’);
- Initializes local tracking by storing visited pages in
localStorage
. - Note: the unique id is automatically populated when you retrieve the script from the eMarketeer UI.
- At this stage, no data is sent to eMarketeer.
emtv2.start();
- Starts sending tracking data to eMarketeer.
- Should only be called after consent has been given by the visitor.
emtv2.stop();
- Revokes consent and stops tracking.
- Can be tied to a “Withdraw Consent” button or your cookie consent system.
Best Practice for GDPR
- Always load the base script on all pages.
- Integrate
init()
andstart()
with your cookie consent system. - If consent is granted, call both
emtv2.init()
andemtv2.start()
. - If consent is declined or revoked, call
emtv2.stop()
.
Example Integration with CookieInformation
Here’s an example using CookieInformation as your consent manager. This can be placed on your site or in Google Tag Manager:
<script type="application/javascript" src="https://develop.emarketeer.com/public/scripts/t.js"></script>
<script>
function handleEmtv2Tracking() {
if (CookieInformation.getConsentGivenFor('cookie_cat_marketing')) {
emtv2.init('<unique id>'); // the unique id is auto-filled when script is generated
emtv2.start();
} else {
emtv2.stop();
}
}
handleEmtv2Tracking();
window.addEventListener('CookieInformationConsentGiven', function () {
handleEmtv2Tracking();
}, false);
</script>