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

feat: add parity between ga4 and gtm for v1 #975

Closed

Conversation

talbertosilva
Copy link

Description

  • Added changes to guarantee a better parity between ga4 and gtm tracking, this involves the addition of events that weren't being tracked on gtm and the respective parameters based on ga4 trackings.
  • Changed two utils functions that are directly related with the trackings as well (getProductData and getProductCategory)
  • Implemented and adjusted the unit tests affected by this changes.

Dependencies

None.

Checklist

  • The commit message follows our guidelines
  • Tests for the respective changes have been added
  • The code is commented, particularly in hard-to-understand areas
  • The labels and/or milestones were added

Disclaimer

By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement

danielbento92 and others added 30 commits May 23, 2023 17:41
- update fields on `order_completed` event contract of
GA4 and Omnitracking integration to add new fields.
This updates the github release title format to remove the `Release`
string from it and use only the tag name as it will be the new default
for the `main` releases.
This fixes the exchanges result reducer by changing the return from
action.payload.result to action.payload.
- Update omnitracking contract to v17.
- remove invalid fields (started with "_") of ga4 analytics integration.
- Add analytics versions field to omnitracking output payload.
- add new parameter `page number` for cases of endlessScrolling in
interact content events (scrolling)
@talbertosilva talbertosilva added the type: feature New feature label Jan 24, 2024
@talbertosilva talbertosilva added this to the dev-v1-23-01-24 milestone Jan 24, 2024
@talbertosilva talbertosilva self-assigned this Jan 24, 2024
@github-actions github-actions bot added type: feature New feature 📦 react Relative to the `@farfetch/blackout-react` package and removed type: feature New feature labels Jan 24, 2024
@talbertosilva talbertosilva force-pushed the feat_add_parity_between_ga4_and_gtm_v1 branch from 2bbe2e7 to 4760943 Compare January 29, 2024 09:58
@github-actions github-actions bot added type: feature New feature and removed type: feature New feature labels Jan 29, 2024
@talbertosilva talbertosilva force-pushed the feat_add_parity_between_ga4_and_gtm_v1 branch from 4760943 to d00158f Compare January 29, 2024 11:19
@github-actions github-actions bot added type: feature New feature and removed type: feature New feature labels Jan 29, 2024
const properties = getEventProperties(data);

return {
products: get(properties, 'products', []).map(getProductData),
orderId: properties.orderId,
total: properties.total,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this property total could be missing.
I understand that was "replaced" by value, but for full compatibility, I think we need to guarantee that total stay on payload, so I suggest on new method, add total value, mapping to new value property.

Note: this could be relevant if some tenat had previous third party integration that use this specific event, and this specific value.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed! I've added a verification on getEventTotalValue method to check if total exists and, if so, map that to value property.

Base automatically changed from dev-v1-23-01-24 to v1 January 31, 2024 09:43
@danielbento92 danielbento92 removed this from the dev-v1-23-01-24 milestone Jan 31, 2024
@talbertosilva talbertosilva force-pushed the feat_add_parity_between_ga4_and_gtm_v1 branch from d00158f to 3e7177e Compare February 1, 2024 10:46
@github-actions github-actions bot added type: feature New feature and removed type: feature New feature labels Feb 1, 2024
@talbertosilva talbertosilva changed the base branch from v1 to dev-v1-06-02-2024 February 1, 2024 10:48
@talbertosilva talbertosilva added this to the dev-v1-06-02-24 milestone Feb 1, 2024
@danielbento92 danielbento92 deleted the branch dev-v1-06-02-2024 February 1, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 react Relative to the `@farfetch/blackout-react` package type: feature New feature
Development

Successfully merging this pull request may close these issues.

9 participants