Skip to content

Smoke Testing WP Consent API integration with other extensions

Tomek Wytrębowicz edited this page May 26, 2024 · 2 revisions

⚠️ 🏗️ This feature is still under development in https://github.com/woocommerce/woocommerce-google-analytics-integration/pull/425

In general, we do not have the capacity to support integration with so many the extensions in the wild.

That's why we stick to WP Consent API, which should act as somewhat of a "standard" API for others to integrate. We have synthetic WP Consent API checks in our automated and manual testing.

However, to ensure it delivers real value to merchants, we would like to check that there is an extension serving the UI that works over WP Consent API integration.

Complianz setup

  1. Install GA4W
  2. Set Google Analytics Tracking Id /wp-admin/admin.php?page=wc-settings&tab=integration&section=google_analytics
  3. Install WP Consent API & Complianz
    wp plugin install wp-consent-api --activate
    wp plugin install complianz --activate
    (optional) you can test it also with the Autoptimize plugin wp plugin install autoptimize --activate
  4. Set up Complianz through its wizard (/wp-admin/admin.php?page=complianz#wizard) using GDPR preset and all defaults, "Show Consent Banner: Yes", "Enable cookie and script blocker: No".
  1. Install GA4W
  2. Set Google Analytics Tracking Id /wp-admin/admin.php?page=wc-settings&tab=integration&section=google_analytics
  3. Install WP Consent API & Cookiebot
    wp plugin install wp-consent-api --activate
    wp plugin install cookiebot --activate
    (optional) you can test it also with the Autoptimize plugin wp plugin install autoptimize --activate
  4. Go through the registration process on /wp-admin/admin.php?page=cookiebot.
  5. Obtain “Domaing group ID” from the registration process, or read it from https://admin.cookiebot.com/domain-groups?page=1
  6. Fill it in /wp-admin/admin.php?page=cookiebot_settings and save the changes
  1. Install GA4W
  2. Set Google Analytics Tracking Id /wp-admin/admin.php?page=wc-settings&tab=integration&section=google_analytics
  3. Install WP Consent API & GDPR Cookie Compliance
    wp plugin install wp-consent-api --activate
    wp plugin install gdpr-cookie-compliance --activate
    (optional) you can test it also with the Autoptimize plugin wp plugin install autoptimize --activate
  4. Enable the "Reject button" in the settings /wp-admin/admin.php?page=moove-gdpr&tab=banner-settings (to be have UI to reject all)
  5. Enable the "Flotaing button" /wp-admin/admin.php?page=moove-gdpr&tab=floating-button (to get UI to update consent)
  6. Enable the "3rd party cookies" /wp-admin/admin.php?page=moove-gdpr&tab=third-party-cookies (marketing)
  7. Enable the "Additional cookies" /wp-admin/admin.php?page=moove-gdpr&tab=advanced-cookies (statistics)

Testing

  1. Open https://tagassistant.google.com/ (TA) for your test domain

  2. Add an item to the cart

  3. Check in TA that the event was hit but w/o consent

    image

  4. Grand some consents

    image

  5. Check that the update was tracked

    image

  6. Add item to the cart

  7. Check that this time, it was hit with consent

    image

  8. Reload the page

  9. Check that the default denies are updated with the opt-in consent is before the view_item_list event

    image

  10. Update content using UI banner again

    image image

  11. Add the item to the cart and check that the update consent is propagated to the add_to_cart event.