<!-- Custom parameter Starts Here -->
<script type="text/javascript">
var pagetype = 'other'
var googleprice = 0;
var googleprodid ='';
var pathname = window.location.pathname;
if(pathname == "/" || pathname == "Default.asp" || pathname == "default.asp"){ /* If home page */
pagetype = 'home';
}else
if(pathname.indexOf('-s/') > -1){/* If Category Page */
pagetype = 'category';
}else
if(pathname.indexOf('-p/') > -1){/* If Product Page */
pagetype = 'product';
googleprice = jQuery('span[itemprop="price"]').text().replace(/[^0-9.]/g,'');
googleprodid = window.global_Current_ProductCode;
}else
if(pathname.indexOf('shoppingcart') > -1 || pathname.indexOf('ShoppingCart') > -1){/* If cart Page */
pagetype = 'cart';
googleprice = jQuery(".pricecolor.colors_productprice b:first").text().replace(/[^0-9.]/g, '');
var productIdArray = new Array();
var cartquantity = $('a .cart-item-name').length;
for (var i=0; i < cartquantity; i++) {
var link = $('a.cart-item-name').eq(i).attr('href');
var substr = link.split('&');
var pcode = substr[0].split('=');
googleprodid = pcode[1].replace("%","-");
productIdArray.push(googleprodid);
}
googleprodid = productIdArray;
}
else
if(pathname.indexOf('OrderFinished') > -1 || pathname.indexOf('orderfinished') > -1){/* If confirmation Page */
pagetype = 'purchase';
googleprice = Order[2];
productIdArray = new Array();
for (var i=0; i < OrderDetails.length; i++) {
productIdArray.push(OrderDetails[i][2]);
}
googleprodid = productIdArray;
};
/* GOOGLE TAG PARAM INITIALIZATION */
var google_tag_params = {
ecomm_prodid: googleprodid,
ecomm_pagetype: pagetype,
ecomm_totalvalue: parseFloat(googleprice)
};
</script>
/* custom parameter ends here */
<!-- Google Code for Remarketing Tag -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = XXXXXXXXXXXX;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/XXXXXXXXXXXX/?value=0&guid=ON&script=0"/>
</div>
</noscript>