yireo/Yireo_GoogleTagManager2

Value and price without VAT and shipping costs.

Closed this issue · 3 comments

Many Magento GTM modules have the option to include value and price without VAT and shipping costs.

Google also recommends this: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag#purchase

  • Set value to the sum of (price * quantity) for all items in items. Don't include shipping or tax.

I think preference varies by company and an option in the configuration for this would be a nice addition to the current module. What do you guys think?

Yes, it would be very nice to get prices ex. tax/shipping

Thanks for noticing this. This will be fixed in the next release: ac0ce6c

Hi @jissereitsma ,

In have tested the new version in a staging environment. Currently, value is still inclusive of VAT. I will let my developer check whether this goes wrong in the module or somewhere else.

I also notice that price and discount in items are not yet implemented correctly either.
See: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag#purchase

Price should be:

The monetary unit price of the item, in units of the specified currency parameter.
If a discount applies to the item, set price to the discounted unit price and specify the unit price discount in the discount parameter.

You can see this in the example below:

gtag("event", "purchase", { transaction_id: "T_12345", // Sum of (price * quantity) for all items. value: 72.05, tax: 3.60, shipping: 5.99, currency: "USD", coupon: "SUMMER_SALE", items: [ { item_id: "SKU_12345", item_name: "Stan and Friends Tee", affiliation: "Google Merchandise Store", coupon: "SUMMER_FUN", discount: 2.22, index: 0, item_brand: "Google", item_category: "Apparel", item_category2: "Adult", item_category3: "Shirts", item_category4: "Crew", item_category5: "Short sleeve", item_list_id: "related_products", item_list_name: "Related Products", item_variant: "green", location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo", price: 10.01, quantity: 3 }, { item_id: "SKU_12346", item_name: "Google Grey Women's Tee", affiliation: "Google Merchandise Store", coupon: "SUMMER_FUN", discount: 3.33, index: 1, item_brand: "Google", item_category: "Apparel", item_category2: "Adult", item_category3: "Shirts", item_category4: "Crew", item_category5: "Short sleeve", item_list_id: "related_products", item_list_name: "Related Products", item_variant: "gray", location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo", price: 21.01, promotion_id: "P_12345", promotion_name: "Summer Sale", quantity: 2 }] });

I guess discount should also be without VAT.

I hope you can follow me. Please let me know if I can help.