Answer the question
In order to leave comments, you need to log in
Question on google tag manager, how to pass information before redirecting to the payment site?
In the basket, after placing an order, they asked me to send information about the completed order to google, that the order has been created for me in the Ajax response, where I wrote the code:
dataLayer.push({
'event': 'PayByCard',
'ecommerce': {
'purchase': {
'actionField': {
'id': ''+rd.o_id['order_id']+'',
'revenue': ''+rd.o_id['price'].replace(/[^0-9$.,]/g, '')+'',
'coupon': ''+rd.o_id['coupon']+'',
},'products': products
}
},
'eventCallback' : function() {
alert('Сейчас Вы будите перенаправлены на страницу оплаты.');
id('order_payment').submit();
}
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question