Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: New update function to ga4 ecommerce events (#107)
#### What is the purpose of this pull request? Implements the update function working as described on [docs](https://developers.google.com/tag-manager/ecommerce-ga4?hl=pt-br#measure_promotion_clicks) and following the line implemented in [faststore](https://github.com/vtex-sites/nextjs.store/blob/chore/add-sentry/src/sdk/analytics/index.tsx#L18:L18), isolating the event data and update the event with the correct body #### What problem is this solving? Send the events to `window.dataLayer` in the correct format #### How should this be manually tested? check if the events in dataLayer are in the correct format `{event: ..., ecommerce: { ... } }` #### Screenshots or example usage #### Types of changes * [ ] Bug fix (a non-breaking change which fixes an issue) * [X] New feature (a non-breaking change which adds functionality) * [ ] Breaking change (fix or feature that would cause existing functionality to change) * [ ] Requires change to documentation, which has been updated accordingly.
- Loading branch information