[FIX] website ecommerce tracking: payment blocked by GA4 clobbering advanced_tracking JSON helpers - #467
Closed
ALopez-Adhoc wants to merge 1 commit into
Closed
[FIX] website ecommerce tracking: payment blocked by GA4 clobbering advanced_tracking JSON helpers#467ALopez-Adhoc wants to merge 1 commit into
ALopez-Adhoc wants to merge 1 commit into
Conversation
Contributor
…avoid clobbering advanced_tracking website_sale_advanced_tracking exposes prepare_purchase_information() and prepare_checkout_information() on sale.order(.line) returning a JSON string (json.dumps), consumed as-is by the facebook_pixel_tracking and google_tag_manager_advanced_tracking checkout interactions (JSON.parse on data-purchase_info / data-cart_info). This module redefined those same methods with an incompatible return type (python dict/list) for its own GA4 templates, silently overriding the shared ones when both modules are installed. QWeb then rendered a python repr (single quotes) into data-purchase_info, so JSON.parse threw in PaymentForm.submitForm and super.submitForm() never ran: the pay button did nothing (task 121712, "no funciona el pago demo en runbot"). Rename the GA4 helpers to ga4_purchase_information() / ga4_checkout_information() so they no longer collide with the shared contract. GA4 templates and the Measurement Protocol confirmation hook use the namespaced names; advanced_tracking / facebook / GTM keep receiving a valid JSON string. Also keep the defensive try/catch in facebook_pixel_tracking.submitForm so a tracking error can never block the payment flow again.
ALopez-Adhoc
force-pushed
the
19.0-h-121712-loa
branch
from
July 8, 2026 19:43
830d469 to
d343154
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Ticket
OBA 121712 — no funciona el pago demo en runbot
Root cause
website_sale_google_analytics_4overrodesale.order.prepare_purchase_information()and
sale.order.line.prepare_checkout_information()(owned bywebsite_sale_advanced_tracking, return type = JSON string) with a pythondict/list. With both modules installed GA4 wins the MRO, QWeb renders a python
repr (single quotes) into
data-purchase_info, andJSON.parsethrows in thefacebook_pixel / GTM
PaymentForm.submitFormoverride, blockingsuper.submitForm(). Result: the pay button does nothing. Latent,load-order-dependent collision (two sibling modules redefining the same method
with different contracts).
Fix
ga4_purchase_information/ga4_checkout_information)so they stop clobbering the shared contract. No change to advanced_tracking /
facebook / GTM behaviour.
facebook_pixel_tracking.submitFormas asafety net so tracking can never block checkout again.
Testing
prepare_purchase_information()returns aJSON string again;
JSON.parse(data-purchase_info)OK for public and portalorders.
checkout proceeds and AddToCart / InitiateCheckout / Purchase fire in console.