Para vc que é parsa, toma ai o código completo
trocar o valor [[CODIGO EBIT]] no código pelo da sua empresa no ebit.
Se você conseguir suporte do ebit para conseguir 100% passa depois para nós o caminho das pedras.
Parametros: mktSaleId e platform
<script type="text/javascript">
var DiasEntrega = '0';
var CEPEntrega = '';
var DL_Email = '';
var DL_TransactionId = '0';
var DL_TransactionTotal = '0.00';
var DL_EC_PU_AF_Shipping = '';
var DL_EC_PU_PR_Id = '';
var DL_EC_PU_PR_Name = '';
var DL_EC_PU_PR_Price = '';
var DL_EC_PU_PR_Quantity = '';
var JS_Platform = '0';
var JS_BirthDay = '23-12-1980';
var JS_Gender = 'F';
var JS_UA = navigator.userAgent || navigator.vendor || window.opera;
if (/windows phone/i.test(JS_UA)) {
JS_Platform = "WP";
}
else if (/android/i.test(JS_UA)) {
JS_Platform = "ANDROID";
}
else if (/iPad|iPhone|iPod/.test(JS_UA) && !window.MSStream) {
JS_Platform = "IOS";
}
else if (JS_Platform == '0') {
var pf = ["Android", "iOS"];
for (var i = 0; i < pf.length; i++) {
if (navigator.platform.indexOf(pf[i]) > -1) {
if (pf[i] == "iOS") {JS_Platform = "IOS";}
else if (pf[i] == "Android") {JS_Platform = "ANDROID";}
}
}
}
(function(document) {
//console.log("document");
$(document).ready(function() {
//console.log("document.ready");
$.get( "/conta/editar", function( data ) {
JS_BirthDay = $(data).find('#id_data_nascimento')[0].value.toString().replace(/\//g, '-');
JS_Gender = $(data).find('#id_sexo')[0].value.toString().toUpperCase();
})
.always(function() {
setTimeout(function() {
//console.log("document.ready.setTimeout");
DiasEntrega = $("b:contains('dia')")[0].innerText.split(" ")[0];
CEPEntrega = $($("b:contains('CEP')")[0].parentNode).find("span")[0].innerText;
/* Estrutura */
$.each(dataLayer, function(i, val) {
if (val != null && val != undefined) {
if (val.PageType === 'TransactionPage') {
DL_Email = encodeURI(val.email.toString());
DL_TransactionId = encodeURI(val.transactionId.toString());
DL_TransactionTotal = encodeURI(parseFloat(val.transactionTotal).toFixed(2).toString());
} else if (val.ecommerce != null && val.ecommerce != undefined) {
if (val.ecommerce.purchase != null && val.ecommerce.purchase != undefined) {
if (val.ecommerce.purchase.actionField != null && val.ecommerce.purchase.actionField != undefined) {
DL_EC_PU_AF_Shipping = encodeURI(parseFloat(val.ecommerce.purchase.actionField.shipping).toFixed(2).toString());
}
if (val.ecommerce.purchase.products != null && val.ecommerce.purchase.products != undefined) {
var pros = val.ecommerce.purchase.products;
$.each(pros, function(j, pro) {
if (DL_EC_PU_PR_Id == '') {
DL_EC_PU_PR_Id = encodeURI(pro.id.toString());
DL_EC_PU_PR_Name = encodeURI(pro.name.toString());
DL_EC_PU_PR_Price = encodeURI(parseFloat(pro.price).toFixed(2).toString());
DL_EC_PU_PR_Quantity = encodeURI(parseFloat(pro.quantity).toFixed(0).toString());
} else {
DL_EC_PU_PR_Id = DL_EC_PU_PR_Id + "|" + encodeURI(pro.id.toString());
DL_EC_PU_PR_Name = DL_EC_PU_PR_Name + "|" + encodeURI(pro.name.toString());
DL_EC_PU_PR_Price = DL_EC_PU_PR_Price + "|" + encodeURI(parseFloat(pro.price).toFixed(2).toString());
DL_EC_PU_PR_Quantity = DL_EC_PU_PR_Quantity + "|" + encodeURI(parseFloat(pro.quantity).toFixed(0).toString());
}
});
}
}
}
}
});
$("#ebitParam")[0].value = 'platform=' + JS_Platform + '&gender=' + JS_Gender + '&birthDay=' + JS_BirthDay + '&email=' + DL_Email + '&zipCode=' + CEPEntrega + '&parcels=1' + '&transactionId=' + DL_TransactionId + '&deliveryTax=' + DL_EC_PU_AF_Shipping + '&deliveryTime=' + DiasEntrega + '&mktSaleId=0' + '&totalSpent=' + DL_TransactionTotal + '&invoiceEmissor=19' + '&paymentType=14' + '&cardFlag=7' + '&sku=' + DL_EC_PU_PR_Id + '&productName=' + DL_EC_PU_PR_Name + '&value=' + DL_EC_PU_PR_Price + '&quantity=' + DL_EC_PU_PR_Quantity + '&ean=' + DL_EC_PU_PR_Id;
$("#bannerEbit")[0].href = $("#bannerEbit")[0].href.toString().replace('{PARAMETROS}', $("#ebitParam")[0].value);
var imgBannerEbit = $($("#bannerEbit")[0]).find("img")[0];
imgBannerEbit.src = imgBannerEbit.src.toString().replace('{PARAMETROS}', $("#ebitParam")[0].value);
}, 1000);
});
});
})(document);
</script>
<param id="ebitParam" value="storeId=[[CODIGO EBIT]]&{PARAMETROS}"/>
<a id="bannerEbit"></a>
<script type="text/javascript" id="getSelo" src="https://imgs.ebit.com.br/ebitBR/selo-ebit/js/getSelo.js?[[CODIGO EBIT]]&lightbox=false"></script>