Tracking snippet

Paste this snippet before </head> on every page. Find your site key in Stats → Tracking.

<script defer src="https://marketthisnow.com/t.js" data-site="YOUR_SITE_KEY"></script>

Tracking leads and sales

Add data-mtn-lead to any form to count its submissions as leads, or call:

mtn('track', 'lead');
mtn('track', 'sale', { value: 49.00 });

Attribution

Visits are attributed to channels from UTM tags (we add them to every link we publish) and referrers. A visitor's channel is set on their first page of the session.

Where to put it

Paste the snippet just before </head> on every page. The issued snippet uses defer, so it does not block the page from rendering. You can put it in the body if you have to, but the head is best.

Cookie banners

It is fine to load the tracker only after someone accepts analytics or marketing cookies. Visits before they accept are not counted, and the tracker does not keep a queue of those earlier page views.

For the Test it button on the Stats page to see the code, either:

  • Leave the official snippet in the page HTML, wrapped so it stays off until consent — for example <script type="text/plain" data-category="analytics" defer src="…/t.js" data-site="YOUR_SITE_KEY"></script> (use whatever category attribute your banner already understands), or
  • Add it in your consent code using the official https://marketthisnow.com/t.js address and this site’s data-site key (so the key still appears in the page source).

The ?mtn_test=1 test switch

Please honour ?mtn_test=1 on any page that has a cookie banner. When that is in the address, load the MarketThisNow tracker for that one page view so we can test the install — even if the visitor has not accepted cookies. Do not treat it as a permanent “accept all cookies” choice. If you use our optional data-consent="required" attribute, the tracker itself also honours ?mtn_test=1 and will send a test visit.

Then open your homepage with ?mtn_test=1 on the end, wait a few seconds, and press Test it. A real visit arriving in Stats is the final proof, including a test visit from that address.

Content Security Policy

If your site uses a CSP, allow MarketThisNow in these places (the issued snippet uses https://marketthisnow.com):

  • script-src: https://marketthisnow.com — for /t.js and the small helper at /x/w.js
  • connect-src: https://marketthisnow.com — the tracker sends visits with navigator.sendBeacon, or a POST if sendBeacon is not available
  • img-src: not required for the JavaScript snippet. (A GET to /t can return a 1×1 gif if you ever use a noscript pixel, in which case allow https://marketthisnow.com here too.)

Privacy

No third-party cookies. On your own domain the tracker sets a first-party visitor cookie (_mtn_v, 365 days) and a short session cookie (_mtn_s), and may set _mtn_ar for affiliate attribution. UTM values are kept in sessionStorage for the tab. It does not use localStorage. Bots are ignored.