Web Tracker

Installing the web tracker script on your website

186 views March 26, 2025 September 5, 2025 robert 0

Get Your Tracker Script

To install the eMarketeer Web Tracker on your website, follow these steps:

  1. Retrieve your tracker script from your eMarketeer account (admin access required).
    Go to
    Settings → Plugins & Integrations → Website scripts
  2. Place the script on your website so that it loads on every page.
  3. 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://app.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() and start() with your cookie consent system.
  • If consent is granted, call both emtv2.init() and emtv2.start().
  • If consent is declined or revoked, call emtv2.stop().

Trigger onComplete

Sometimes you want to run your own scripts when a form is submitted. Use the script below to trigger on a completed form.

<script>
 em_cta.getSurvey().then(survey => {
  console.log('survey is: ', survey);
  survey.onComplete.add(() => {
   console.log('Survey completed'); //Your script here
  })
})
</script>

Was this helpful?