Reputation: 1
I'm setting up the GA4 of an ecommerce, but I'm having some issues with the purchase tag:
Some purchases are not being properly logged in GA4, while others are being logged twice. However, when I test the tag using Google Tag Manager's Preview mode, it appears to work correctly.
The items parameters are not available to me in the GA4 schema because my datalayer is from a different platform and I cannot modify the variable names within it. How can I access this information?
Here is my datalayer for the purchase event:
{
pageCategory:,
order: {
id: ,
token: ,
payment_method: ,
number: ,
total: ,
total_without_taxes: ,
total_without_shipping:,
customer_id: ,
customer: {
id:,
first_name:,
last_name: ,
full_name:,
email: ,
document:,
document_type:,
birthday:,
phone_number:
},
authorized: ,
optionsIds: [],
skusIds: [ ],
status: ,
prices: { },
address_info: {
hashed_first_name:,
hashed_last_name:,
hashed_street_address:,
city: ,
state: ,
postal_code: ,
country_code:
},
items: [
{
product: {
id: ,
sku: ,
price: ,
brand: ,
categories: [
]
},
quantity: ,
name: "",
product_id: ,
categories_names: [
]
},
{
product: {
id:
sku:
price:
brand:
categories: [
]
},
quantity:
name:
product_id:
categories_names: [
]
}
]
},
orderConversionValue: ,
purchasedSkus: [ ],
purchasedSkusText: ,
orderId:,
event: "conversion",
gtm: {},
eventModel: {
value: ,
currency:,
transaction_id:
}
}
And here is how I create my purchase tag in GTM: Purchase tag
When I acess the the debug view and preview mode the tag is fired correcty in GTM(only once, but without the items parameters). But when I look in the preview mode of GTM in the GA4 proprety sometimes is fired twice.
Upvotes: 0
Views: 448
Reputation: 26
Hi can you paste the value of {{DLV -order.items}} variable from your GTM debug tag assistant?
You can use customjs variable to map the datalayer for your GA4
Upvotes: 0