Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing semicolon to the gtag call #336

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Conversation

tomalec
Copy link
Member

@tomalec tomalec commented Nov 27, 2023

Changes proposed in this Pull Request:

Add the missing semicolon to the gtag call, allowing the HTML to be minified.
Fixes https://wordpress.org/support/topic/gtag-event-js-error/

Checks:

  • Does your code follow the WordPress coding standards?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Screenshots:

Detailed test instructions:

  1. Configure the extension to use gtag implementation
  2. Open the shop page with list of products as non-admin user (incognito)
  3. Check the source code of the page
    gtag('event', 'view_item_list',… should have ; at the end of line.

Additional details:

Changelog entry

Fix - Add semicolon after gtag calls.

@tomalec tomalec requested review from martynmjones and a team November 27, 2023 15:37
@tomalec tomalec self-assigned this Nov 27, 2023
@github-actions github-actions bot added changelog: fix Took care of something that wasn't working. type: bug The issue/PR is a confirmed bug. labels Nov 27, 2023
Copy link
Contributor

@martynmjones martynmjones left a comment

Choose a reason for hiding this comment

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

Hey @tomalec, thanks for the fix!

Tested locally and confirmed that all calls to gtag( 'event'... end with a semi-colon so LGTM ✅

@tomalec tomalec merged commit 6a5812b into trunk Nov 27, 2023
7 checks passed
@tomalec tomalec deleted the fix/phpjs-semicolon branch November 27, 2023 17:17
@tomalec tomalec mentioned this pull request Nov 28, 2023
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Took care of something that wasn't working. type: bug The issue/PR is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants