Upon integrating Wix with our everflow account upon purchase we have a postback fire from wix to our everflow with some of the data.
function registerListener() {
window.wixDevelopersAnalytics.register('head',
function (eventName, eventParams) {
if (eventName == "Purchase") {
var order;
order = {
cc: eventParams.coupon,
items: []
};
order.items.push(item);
order_id: eventParams.id,
coupon_code: eventParams.coupon,
email: eventParams.email,
parameters: {
"currency": eventParams.currency
},
amount: eventParams.revenue - eventParams.shipping - eventParams.tax,
});
}
})
}
window.wixDevelopersAnalytics?
registerListener() :
window.addEventListener('wixDevelopersAnalyticsReady', registerListener);
I added eventParams.email, but I dont think that’s a real thing. I do want to capture the email entry and forward it along with the other stuff in here. Anyone have any experience with this?
I was expecting to grab the email, but the id is dynamically created, I think I can grab the email from the type=email, but I’m not sure if that’s the best way to get this done.
Colin Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.