View Single Post
  #4  
Old 03-30-2011, 03:45 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

Quote:
Originally Posted by motion rush View Post
thanks eugene. I will look into it.

How about this (ADCENTER conversion)

Code:
<script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script>
<script id="mstag_tops"type="text/javascript"src="//flex.atdmt.com/mstag/site/b5c71523-6bfe-XXX-XXX-XXXXXXX/mstag.js"></script>
<script type="text/javascript">mstag.loadTag("conversion", {cp:"XXXX",dedup:"1"})</script>
<noscript><iframe src="//flex.atdmt.com/mstag/tag/b5c71523-6bfe-XXX-XXX-XXXXXXX/mstag.js/conversion.html?cp=XXXX&dedup=1"frameborder="0"scrolling="no"width="1"height="1"style="visibility:hidden;display:none"></iframe></noscript>
thanks for your help in advance
mrm
For this kind of tracker you can change the code the following way:

Code:
function trackConversion() {
    var hash = document.location.hash;
    if (hash.indexOf('mode=orderConfirmation') > 0) {
        //Set vars
        if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script>


        //Do conversion
        var newScript = document.createElement('script');
        newScript.type = 'text/javascript';
        newScript.src = "//flex.atdmt.com/mstag/site/b5c71523-6bfe-XXX-XXX-XXXXXXX/mstag.js";

        newScript.onload = newScript.onreadystatechange = function(){
            mstag.loadTag("conversion", {cp:"XXXX",dedup:"1"});
        }

        document.getElementsByTagName("head")[0].appendChild(newScript);



        clearInterval(pollTimer);
    }
}

pollTimer = setInterval(trackConversion, 100);
Let me know how it worked.