Registry Mirror
Skip to content

Conversation

@grandnode-dev

Copy link
Copy Markdown
Member

Type: bugfix

Issue

On the checkout completed page the Google Analytics widget adds the e-commerce script of the customer's last order to the tracking script, in place of its {ECOMMERCE} placeholder. When there is no order (a visitor who opens the page without one), the placeholder stayed in the rendered script as the literal text {ECOMMERCE}, which is a JavaScript syntax error in the default tracking script and stops the tag from running.

Solution

Without an order the placeholder is replaced by nothing, as GetTrackingScript already does on every other page.

Breaking changes

None.

Testing

  • The plugin builds. No unit test: the view component needs the MVC route data, the consent cookie and the settings, and Grand.Modules.Tests does not reference this plugin.

… order

On the checkout completed page the widget builds the e-commerce script from the customer's last order. Without one it left the literal {ECOMMERCE} in the tracking script, which breaks the inline JavaScript. It is now replaced by nothing, as on every other page.
Copilot AI balanced review requested due to automatic review settings November 28, 2026 14:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@grandnode-dev
grandnode-dev merged commit eb5d0b3 into develop Nov 29, 2026
9 checks passed
@grandnode-dev
grandnode-dev deleted the fix/google-analytics-no-order-placeholder branch November 29, 2026 09:53
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.

2 participants