-
Notifications
You must be signed in to change notification settings - Fork 21
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 integration with WP Consent API #2425
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2425 +/- ##
============================================
+ Coverage 63.4% 64.3% +0.9%
- Complexity 0 4281 +4281
============================================
Files 321 780 +459
Lines 5027 21910 +16883
Branches 1218 1218
============================================
+ Hits 3188 14097 +10909
- Misses 1672 7646 +5974
Partials 167 167
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Thanks for implementing it @martynmjones . I tested it with Complianz and GDPR Cookie Compliance :) I'm not sure if you already worked on it, but to save some time, I made a branch with E2E tests moved from GA4W |
also added some docs notes https://github.com/woocommerce/google-listings-and-ads/compare/add/2387-wp-consent-api-integration...tweak/add-consent-api-docs?expand=1 Feel free to merge those PRs or disregard them if you have a better implementation. |
I also made changes to the public-faceing docs as for GA4W. |
Add E2E tests for WP Consent API integration
Hey @tomalec, many thank for adding the tests and docs 🙌 I've merged your branch into this one.
Thanks for testing! I've not made further changes but have published the PR properly and requested a review to confirm were good to merge into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the code, tested locally with Complianz and GDPR Cookie Compliance, LGTM :)
Changes proposed in this Pull Request:
Adds integration with the WP Consent API plugin to better support different consent banner configurations.
If the plugin is installed on a website then the existing consent state will be sent as an update when tracking is initialised. For on-page updates, we're adding an event listener for
wp_listen_for_consent_change
which is dispatched by WP Consent API when any changes are made.Detailed test instructions:
General test instruction
add/2387-wp-consent-api-integration
Consent
event is sent with the updated stateOn-page Update
isGranted
(Under the Consent tab)Granted
in Tag AssistantAdditional details:
Copied and modified slightly from woocommerce/woocommerce-google-analytics-integration#425
Changelog entry