Advertiser conversion tracking, Javascript tag : Helpdesk

Advertiser conversion tracking, Javascript tag

(function(){
    var script = document.createElement("iframe");
    script.width = 1;
    script.height = 1;
    script.frameBorder = 0;
    script.nid = "TO_BE_PROVIDED";
    script.oid = "TO_BE_PROVIDED";
    script.transaction_id = ""; //Optional
    script.amount = 0;

    script.order =
    {
        oid: "ORDER_ID",
        amt: "AMOUNT",
        bs: "BILLING_STATE",
        bc: "BILLING_COUNTRY",
        cc: "COUPON_CODE",
        items: [
            {
                ps: "PARENT_SKU",
                vs: "VARIANT_SKU",
                p: "PRICE",
                qty: "QUANTITY",
            },
        ],
    };
    script.src = "https://www.servecvr.com/?nid=" + script.nid + "&oid=" + script.oid + "&transaction_id=" + script.transaction_id + "";

    if (script.amount > 0) {
        script.src += "&amount=" + script.amount;
    }

    if (script.order) {
        script.src += "&order=" + encodeURIComponent(JSON.stringify(script.order));
    }

    document.getElementsByTagName("body")[0].appendChild(script);
})();
</script>
<noscript src="https://www.servecvr.com/?nid=TO_BE_PROVIDED&oid=TO_BE_PROVIDED&amount=" height="1" width="1" style="display:none;"/>


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.