How to implement Mantis' web analytics software

Note: This documentation is for individuals with technical experience; if you need assistance implementing our analytics into your website, please contact us.

Once accepted into our analytics program, all you have to do is use our CDN (Content Delivery Network) hosted Javascript library. The library is available on both SSL and Non-SSL HTTP connections.

We recommend that you include this on ALL of your pages and not just the ones you wish to track conversions on (i.e., thank you or payment success page). Tracking your traffic globally will enable additional features on our network.

Library Configuration

Prior to including our Javascript library on the page, you must first configure the global Mantis variable.

Advertiser

<script type="text/javascript>
 MANTIS = {
 advertiser: 'MY_UNIQUE_ADVERTISER_ID'
 };
</script>

Publisher

<script type="text/javascript">
 MANTIS = {
 property: 'MY_UNIQUE_PROPERTY_ID'
 };
</script>

GDPR Compliance

If you are using a Consent Management Platform (CMP) to ask a visitor in the EU if you can track them, after gaining consent to include Mantis, you can then notify us that you have gained consent like so (Note: if you do not send this flag, our JS tags will never make a request to our server to ensure you are in compliance):

<script type="text/javascript">
 MANTIS = {
 advertiser: 'MY_UNIQUE_PROPERTY_ID',
 consent: true
 };
</script>

Embed Library

<script type="text/javascript">
 var z = document.createElement("script");
 z.type = "text/javascript";
 z.async = true;
 z.src = "//assets.mantisadnetwork.com/analytics.min.js";
 
 var s = document.getElementsByTagName('head')[0];
 s.parentNode.insertBefore(z, s);
</script>

Did this answer your question?