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

Improvements to Google Analytics 4 code #3342

Merged
merged 32 commits into from
Jun 23, 2023
Merged

Improvements to Google Analytics 4 code #3342

merged 32 commits into from
Jun 23, 2023

Conversation

empiricompany
Copy link
Contributor

Description (*)

This refactor some code, avoid notice (#3323) and fix quantity in purchase

Related Pull Requests

#3323

@github-actions github-actions bot added Component: GoogleAnalytics Relates to Mage_GoogleAnalytics Template : base Relates to base template translations Relates to app/locale labels Jun 21, 2023
@fballiano
Copy link
Contributor

@empiricompany how did you open this PR with conflicts already? :-))) maybe you had an old branch?

@github-actions github-actions bot removed the Template : base Relates to base template label Jun 21, 2023
@empiricompany
Copy link
Contributor Author

@empiricompany how did you open this PR with conflicts already? :-))) maybe you had an old branch?

yes sorry now is aligned

empiricompany and others added 2 commits June 21, 2023 10:37
Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
fballiano
fballiano previously approved these changes Jun 21, 2023
@fballiano fballiano changed the title Ga4 improvement Improvements to Google Analytics 4 code Jun 21, 2023
Co-authored-by: Mohamed ELIDRISSI <67818913+elidrissidev@users.noreply.github.com>
@pquerner
Copy link
Contributor

See #3228 for more discussion as I identified wrong types we sent to Google. Apparantly Google auto-converts it someway to the backend and it didnt break anything. (ie. not sending "number" values but "string" values.)

@empiricompany
Copy link
Contributor Author

Unfortunately, a proper way to test it is to wait for 24 hours and hope that there are no bugs or misalignments on GA4, which is constantly changing.

@pquerner
Copy link
Contributor

Unfortunately, a proper way to test it is to wait for 24 hours and hope that there are no bugs or misalignments on GA4, which is constantly changing.

Not true. You can turn on debug view and see the data "coming in". I've tested that with numbers/string values and they came in both the same, hence my comment about "they get parsed before something".

@empiricompany
Copy link
Contributor Author

Unfortunately, a proper way to test it is to wait for 24 hours and hope that there are no bugs or misalignments on GA4, which is constantly changing.

Not true. You can turn on debug view and see the data "coming in". I've tested that with numbers/string values and they came in both the same, hence my comment about "they get parsed before something".

Yes, but for example, the 'amount' is not as you send it It's multiplied by 1000 or something like that, and I can tell you from experience that it doesn't help much. That's why I have set up the log on Magento to know exactly the JSON format sent in the data layer.

@elidrissidev
Copy link
Member

Ready to approve if the new changes were tested.

@empiricompany
Copy link
Contributor Author

Ready to approve if the new changes were tested.

obviously for me that I am the author is tested but you can test it too

@fballiano fballiano merged commit b4cee73 into OpenMage:main Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: GoogleAnalytics Relates to Mage_GoogleAnalytics translations Relates to app/locale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants