Skip to content

[IMP]google_tag_manager_advanced_tracking, facebook_pixel_tracking#451

Closed
JrAdhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-111463-jr
Closed

[IMP]google_tag_manager_advanced_tracking, facebook_pixel_tracking#451
JrAdhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-111463-jr

Conversation

@JrAdhoc
Copy link
Copy Markdown
Contributor

@JrAdhoc JrAdhoc commented Apr 20, 2026

google_tag_manager_advanced_tracking:

  • Shipping and discount separated from product items in GTM events
  • Reward lines filtered from items, accumulated as discount
  • Replaced legacy Python-dict string parsing with standard JSON.parse

facebook_pixel_tracking:

  • Migrated all events to current Meta Pixel standard (content_ids, contents, currency, value)
  • Fixed critical bug: Purchase event was not being fired (missing event name)
  • Delivery and reward lines excluded from contents

website_sale_advanced_tracking (shared):

  • prepare_purchase_information: delivery/reward lines separated; returns json.dumps()
  • prepare_checkout_information: added is_reward_line flag; item_name uses product name; returns json.dumps()
  • Template: data-product_id on add_to_cart now uses product.id (always present) instead of default_code

Copilot AI review requested due to automatic review settings April 20, 2026 19:28
@roboadhoc
Copy link
Copy Markdown
Contributor

Pull request status dashboard

@JrAdhoc JrAdhoc changed the title [IMP]google_tag_manager_advanced_tracking: shipping and discount sepp… [IMP]google_tag_manager_advanced_tracking: shipping and discount sepparated from items in object sent to GTM Apr 20, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Este PR ajusta el payload de eCommerce enviado a Google Tag Manager (GTM) para separar explícitamente shipping y discount de la lista de items, alineando mejor el tracking con escenarios de líneas de envío y líneas de recompensa/descuento.

Changes:

  • Se agrega el flag is_reward_line en la información de checkout por línea para poder excluir/reagrupar líneas de descuento en frontend.
  • En prepare_purchase_information() se separan líneas de descuento (reward) y envío (delivery) para enviarlas como discount y shipping, excluyéndolas de items.
  • En JS, el evento begin_checkout filtra líneas reward, calcula discount y envía items sin reward lines; además evita error cuando no existe #cart_products.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
website_sale_advanced_tracking/models/sale_order_line.py Añade is_reward_line al payload de checkout por línea.
website_sale_advanced_tracking/models/sale_order.py Separa shipping/discount de items al preparar la info de compra.
google_tag_manager_advanced_tracking/static/src/js/website_sale_tracking.js Ajusta begin_checkout para excluir reward lines y mandar discount; añade guard contra #cart_products inexistente.

Comment thread website_sale_advanced_tracking/models/sale_order_line.py Outdated
@JrAdhoc JrAdhoc force-pushed the 18.0-h-111463-jr branch 3 times, most recently from 9d18744 to 8fc82f9 Compare April 28, 2026 16:21
@JrAdhoc JrAdhoc changed the title [IMP]google_tag_manager_advanced_tracking: shipping and discount sepparated from items in object sent to GTM [IMP]google_tag_manager_advanced_tracking, facebook_pixel_tracking Apr 28, 2026
…arated from items / fix facebook pixel tracking #115773
@cem-adhoc
Copy link
Copy Markdown
Contributor

@roboadhoc r+ bump

roboadhoc pushed a commit that referenced this pull request May 5, 2026
…arated from items / fix facebook pixel tracking #115773

closes #451

Signed-off-by: Manuela Cepeda <cem@adhoc.com.ar>
roboadhoc added a commit that referenced this pull request May 5, 2026
…website_sale_advanced_tracking 18.0.1.3.0, facebook_pixel_tracking 18.0.1.1.0

Merged: #451
@roboadhoc roboadhoc closed this May 5, 2026
@roboadhoc roboadhoc deleted the 18.0-h-111463-jr branch May 5, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants