Answer the question
In order to leave comments, you need to log in
What array structure should be generated so that it is equally transferred to YA and GA?
You need to set up the transfer of e-commerce transactions through Tag Manager YM and GA.
The question is, in what form should the array be generated so that it is equally suitable for both GA and YM
Following the model of YM
dataLayer.push({
"ecommerce": {
"purchase": {
"actionField": {
"id" : "TRX987",
"affiliation": "Яндекс.Маркет"
},
"products": [
{
"id": "25341",
"name": "Толстовка Яндекс мужская",
"price": "1345.26",
"brand": "Яндекс / Яndex",
"category": "Одежда/Мужская одежда/Толстовки и свитшоты",
"variant": "Оранжевый цвет"
},
{
"id": "25314",
"name": "Толстовка Яндекс женская",
"price": "1543.62",
"brand": "Яндекс / Яndex",
"category": "Одежда/Женская одежда/Толстовки и свитшоты",
"variant": "Белый цвет",
"quantity": 3
}
]
}
}
});
<script>
dataLayer = [{
'transactionId': '1234',
'transactionAffiliation': 'Acme Clothing',
'transactionTotal': 38.26,
'transactionTax': 1.29,
'transactionShipping': 5,
'transactionProducts': [{
'sku': 'DD44',
'name': 'T-Shirt',
'category': 'Apparel',
'price': 11.99,
'quantity': 1
},{
'sku': 'AA1243544',
'name': 'Socks',
'category': 'Apparel',
'price': 9.99,
'quantity': 2
}]
}];
</script>
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