Skip to content

Conversation

rafaelstz
Copy link
Member

Description (*)

This PR is implementing Gtag consent mentioned in the feature request below.

It doesn't include yet:

  • Checkbox to determine which cookies to accept.
  • Updating the Gtag after the customer browser and accepts cookies to get historical behavioral data pushed.

Related Pull Requests

Fixed Issues (if relevant)

  1. GA4 and GTM running in anonymous mode #38039

Manual testing scenarios (*)

  1. Configure cookie consent in Magento using GTM.
  2. Add GTM scripts that requires consent and another one that doesn't require consent.
  3. When you start browsering in the website without accepting the cookie consent banner, it won't inject your GTM's script that doesn't require consent. All GTM scripts are blocked.
  4. Add a GA script.
  5. Go to the website and doesn't accept the cookies banner.
  6. Browsering through the website you will see that data has been pushed to GA, but anonymously, following the lasted international cookies policies.
  7. Accept the cookie banner and continue browsering.
  8. You will see customer data pushed to your GA account.

Questions or comments

Learn more about consent mode → https://support.google.com/analytics/...
Check out the demo code for this series → https://github.com/googleanalytics/ga...
Youtube Set up consent mode in Google Analytics → https://www.youtube.com/...

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Oct 3, 2023

Hi @rafaelstz. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance:
  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-github-services m2-github-services added Partner: Le Site partners-contribution Pull Request is created by Magento Partner labels Oct 3, 2023
@engcom-Bravo engcom-Bravo added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Oct 4, 2023
@ricomonkeon
Copy link

Thanks for your work on this.
One thing it seems to be lacking at the moment are the parameters for V2, which have been introduced since the original feature request. I believe that without these, it won't be compliant.
https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#upgrade-consent-v2

@Priyakshic Priyakshic added the Project: Community Picked PRs upvoted by the community label Nov 13, 2024
@engcom-Bravo engcom-Bravo added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Nov 13, 2024
@engcom-Hotel engcom-Hotel self-requested a review November 18, 2024 06:18
@engcom-Hotel
Copy link
Contributor

Hello @rafaelstz,

Thanks for the contribution!

Please resolve these PR conflicts so we can pick them up for review. Meanwhile, we are moving this PR On Hold.

Thanks

@engcom-Hotel
Copy link
Contributor

Hello @rafaelstz,

Have you had a chance to check this #38040 (comment)?

Thanks

@engcom-Hotel
Copy link
Contributor

Hello @rafaelstz,

We have noticed that this PR has not been updated for a long time. Hence, we are closing it for now.

Let us know when you are ready to work on it again, and we will be happy to re-open it. Thank you for your contribution!

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Le Site partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Project: Community Picked PRs upvoted by the community Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants