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 the code for the transactions before the page view. #265

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

puntope
Copy link
Contributor

@puntope puntope commented Apr 11, 2023

Changes proposed in this Pull Request:

Closes #263

This PR changes the order of some functions for preventing calling send page view before setting the ec:actions. Calling send page view before ec:actions causes the ecommerce tracking to stop working.

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:

Before:

Screenshot 2023-04-11 at 17 01 54

After

Screenshot 2023-04-11 at 16 55 13

Detailed test instructions:

  1. Install Google Analytics Debugger Chrome extension for an easy testing
  2. Setup GLA with Universal analytics and all the enhanced ecommerce options. Disable Use Global Site Tag
  3. GO to incognito and complete an order
  4. See in the console hot the ec:actions for purchase are triggered

Additional details:

Changelog entry

Fix - Bug with tracking enhanced ecommerce

@puntope puntope requested a review from a team April 11, 2023 13:05
@puntope puntope self-assigned this Apr 11, 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 Apr 11, 2023
@puntope puntope marked this pull request as ready for review April 11, 2023 13:08
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 @puntope,

With this PR I'm getting the data structure outlined in the After screenshot which matches the events in the previous version of the extension so LGMT ✅

@puntope puntope merged commit dc7959f into trunk Apr 12, 2023
@puntope puntope deleted the fix/trasactions-call branch April 12, 2023 14:00
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.

Analytics not recording properly since updating to v1.7.0
2 participants