Closed martynmjones closed 2 months ago
Attention: Patch coverage is 0%
with 12 lines
in your changes missing coverage. Please review.
Project coverage is 64.3%. Comparing base (
340cb89
) to head (210333d
). Report is 17 commits behind head on develop.
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 https://github.com/woocommerce/google-listings-and-ads/compare/add/2387-wp-consent-api-integration...dev/add-consent-tests?expand=1
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.
Hey @tomalec, many thank for adding the tests and docs 🙌 I've merged your branch into this one.
I tested it with Complianz and GDPR Cookie Compliance :)
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 develop
.
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 https://github.com/woocommerce/woocommerce-google-analytics-integration/pull/425
Changelog entry