Skip to main content

MaxConv JS Tag (Event System)

The MaxConv JS Tag feature is a tookit that you can use in the webpage, to fire events, get parameters, register visits...etc.

Import js tag file

To use the js tag, you need to first import it to your webpage. You can get ready-to-copy code in campaign links popup, the basic import code looks like:

<!-- MaxConv Tag -->
<script>
!function (w,d,n){var s=d.createElement(n),t=d.getElementsByTagName(n)[0];s.async=!0;s.defer=!0;s.src="//YOUR-TRACKING-DOMAIN/mctag.js";t.parentNode.insertBefore(s,t);w.mctag=w.mctag||function(){(w.mctag.q=w.mctag.q||[]).push(arguments)};}(window,document,"script");
</script>
<!-- End MaxConv Tag -->

Your own code will have your actual domain, instead of "YOUR-TRACKING-DOMAIN". So to import js tag, just put this code in anywhere between <head>...<head> of your lander.

tip

This is the basic importing code of MaxConv js tag, so you only need to put it once per one webpage.

Function List

mctag("visit"); register a visit to MaxConv, its mostedly used in "No Redirect" tracking method.

mctag("getUrlParam", "URL_PARAM_NAME"); fetch parameter value from url, for example, to fetch the country from "https://lander.com/?country=united-states", just call mctag("getUrlParam", "country");, it will return "united-states".

mctag("saveUrlClickID", "URL_PARAM_NAME"); fetch maxconv click id from url, and save it to cookie. so the click id is available in first-party cookie.

mctag(function(){......}); set tag callback, all following function should be included in the callback.

mctag("conversion", {...OPTIONS}); register a conversion to MaxConv, for example:

mctag(function(){
mctag('conversion', {
event: '', //optional
payout: 0, //optional
txid: '' //optional
});
});

You can pass optional values with conversions. The optional values have the same name like Postback Url Parameters. You don't need to provide click id, the js tag will fetch it automatically.

mctag("getClickID"); get current MaxConv click id, for example:

mctag(function(){
var clickID = mctag('getClickID');

//...do you work
});

mctag("getClickData"); get current MaxConv click data, including click id, cookieless click url...etc, for example:

mctag(function(){
var clickData = mctag('getClickData');

console.log(clickData);
//...do you work
});

The url in the click data is cookieless, which means it works in anyplace, so you can use it in offline scenario such as in email.