woocommerce / google-listings-and-ads

Sync your store with Google to list products for free, run paid ads, and track performance straight from your store dashboard.
https://woo.com/products/google-listings-and-ads/
GNU General Public License v3.0
46 stars 21 forks source link

[HC] - Google Analytics 4 Click Events not tracked when GLA 2.6.1 or above is active. #2387

Open OmarFPG opened 5 months ago

OmarFPG commented 5 months ago

Describe the bug:

The user reports that their click events are not being tracked with GLA active. They've tested with WP Rollback for previous versions and found out that it works for 2.6.0 and it stops working on 2.6.1 or above.

Steps to reproduce:

  1. Install and activate GLA
  2. Setup tracking for click events with GA4

Expected behavior:

The click events should be generated and passed along to Google Analytics.

Actual behavior:

Click events are not being generated and tracked.

Additional details:

`

WordPress Environment

WordPress address (URL): https://akraclimapruebas.akraclima.com Site address (URL): https://akraclimapruebas.akraclima.com WC Version: 8.8.2 REST API Version: ✔ 8.8.2 Action Scheduler Version: ✔ 3.7.4 Log Directory Writable: ✔ WP Version: 6.5.2 WP Multisite: – WP Memory Limit: 768 MB WP Debug Mode: – WP Cron: ✔ Language: es_ES External object cache: –

Server Environment

Server Info: Apache PHP Version: 8.1.28 PHP Post Max Size: 15 MB PHP Time Limit: 60 PHP Max Input Vars: 1000 cURL Version: 7.74.0 GnuTLS/3.7.1

SUHOSIN Installed: – MySQL Version: 10.5.21-MariaDB-1:10.5.21+maria~deb11-log Max Upload Size: 15 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 8.8.2 WC Database Prefix: wp_ Tamaño total de la base de datos: 73.36MB Tamaño de los datos de la base de datos: 66.60MB Tamaño del índice de la base de datos: 6.76MB wp_woocommerce_sessions: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_woocommerce_api_keys: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_woocommerce_attribute_taxonomies: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_woocommerce_downloadable_product_permissions: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB wp_woocommerce_order_items: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_woocommerce_order_itemmeta: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_woocommerce_tax_rates: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB wp_woocommerce_tax_rate_locations: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB wp_woocommerce_shipping_zones: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_woocommerce_shipping_zone_locations: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB wp_woocommerce_shipping_zone_methods: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_woocommerce_payment_tokens: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_woocommerce_payment_tokenmeta: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_woocommerce_log: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_actionscheduler_actions: Datos: 0.16MB + Índice: 0.13MB + Motor InnoDB wp_actionscheduler_claims: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_actionscheduler_groups: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_actionscheduler_logs: Datos: 0.09MB + Índice: 0.09MB + Motor InnoDB wp_addonlibrary_addons: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_addonlibrary_categories: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_commentmeta: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_comments: Datos: 0.02MB + Índice: 0.09MB + Motor InnoDB wp_depicter_documents: Datos: 0.48MB + Índice: 0.03MB + Motor InnoDB wp_depicter_meta: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_depicter_options: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_e_events: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_gla_attribute_mapping_rules: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_gla_budget_recommendations: Datos: 0.19MB + Índice: 0.14MB + Motor InnoDB wp_gla_merchant_issues: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_gla_shipping_rates: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_gla_shipping_times: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_links: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_masterslider_options: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_masterslider_sliders: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_options: Datos: 6.47MB + Índice: 0.14MB + Motor InnoDB wp_postmeta: Datos: 16.52MB + Índice: 3.03MB + Motor InnoDB wp_posts: Datos: 17.52MB + Índice: 0.42MB + Motor InnoDB wp_revslider_css: Datos: 0.13MB + Índice: 0.00MB + Motor InnoDB wp_revslider_layer_animations: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_revslider_navigations: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_revslider_sliders: Datos: 0.05MB + Índice: 0.00MB + Motor InnoDB wp_revslider_slides: Datos: 0.11MB + Índice: 0.00MB + Motor InnoDB wp_revslider_static_slides: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_smush_dir_images: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_termmeta: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_terms: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_term_relationships: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_term_taxonomy: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_trustindex_google_reviews: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_usermeta: Datos: 0.06MB + Índice: 0.03MB + Motor InnoDB wp_users: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB wp_wc_admin_notes: Datos: 0.13MB + Índice: 0.00MB + Motor InnoDB wp_wc_admin_note_actions: Datos: 0.09MB + Índice: 0.02MB + Motor InnoDB wp_wc_category_lookup: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wc_customer_lookup: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_wc_download_log: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_wc_orders: Datos: 0.02MB + Índice: 0.11MB + Motor InnoDB wp_wc_orders_meta: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_wc_order_addresses: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB wp_wc_order_coupon_lookup: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_wc_order_operational_data: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_wc_order_product_lookup: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB wp_wc_order_stats: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB wp_wc_order_tax_lookup: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_wc_product_attributes_lookup: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wc_product_download_directories: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wc_product_meta_lookup: Datos: 0.05MB + Índice: 0.09MB + Motor InnoDB wp_wc_rate_limits: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wc_reserved_stock: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wc_tax_rate_classes: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wc_webhooks: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wfblockediplog: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wfblocks7: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB wp_wfconfig: Datos: 1.52MB + Índice: 0.00MB + Motor InnoDB wp_wfcrawlers: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wffilechanges: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wffilemods: Datos: 12.55MB + Índice: 0.00MB + Motor InnoDB wp_wfhits: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB wp_wfhoover: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wfissues: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB wp_wfknownfilelist: Datos: 7.52MB + Índice: 0.00MB + Motor InnoDB wp_wflivetraffichuman: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wflocs: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wflogins: Datos: 0.39MB + Índice: 0.16MB + Motor InnoDB wp_wfls_2fa_secrets: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wfls_role_counts: Datos: 0.00MB + Índice: 0.00MB + Motor MEMORY wp_wfls_settings: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wfnotifications: Datos: 0.05MB + Índice: 0.00MB + Motor InnoDB wp_wfpendingissues: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB wp_wfreversecache: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wfsecurityevents: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wfsnipcache: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB wp_wfstatus: Datos: 0.22MB + Índice: 0.13MB + Motor InnoDB wp_wftrafficrates: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wfwaffailures: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wpforms_logs: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wpforms_payments: Datos: 0.02MB + Índice: 0.14MB + Motor InnoDB wp_wpforms_payment_meta: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB wp_wpforms_tasks_meta: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_campaign: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_campaign_list: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_custom_field: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_email: Datos: 0.05MB + Índice: 0.00MB + Motor InnoDB wp_wysija_email_user_stat: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_email_user_url: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_form: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_list: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_queue: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wysija_subscriber_ips: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_wysija_url: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_url_mail: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_user: Datos: 0.08MB + Índice: 0.02MB + Motor InnoDB wp_wysija_user_field: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_user_history: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_wysija_user_list: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_xcloner_scheduler: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB wp_yith_wcwl: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_yith_wcwl_lists: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB wp_yoast_indexable: Datos: 0.11MB + Índice: 0.09MB + Motor InnoDB wp_yoast_indexable_hierarchy: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB wp_yoast_migrations: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB wp_yoast_primary_term: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB wp_yoast_seo_links: Datos: 0.08MB + Índice: 0.03MB + Motor InnoDB wp_yoast_seo_meta: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB

Post Type Counts

attachment: 306 custom_css: 2 elementor_library: 1 essential_grid: 22 jaw-faq: 4 jaw-portfolio: 3 jaw-testimonial: 4 nav_menu_item: 14 oembed_cache: 1 options: 2 page: 30 post: 32 product: 22 product_variation: 319 revision: 1226 shop_order: 44 shop_order_refund: 1 wp_global_styles: 2 wp_navigation: 1 wpcf7r_action: 2 wpcode: 2 wpforms: 1 wysijap: 1

Security

Secure connection (HTTPS): ✔ Hide errors from visitors: ✔

Active Plugins (3)

Google Listings and Ads: por WooCommerce – 2.6.8 WPCode Lite: por WPCode – 2.1.11 WooCommerce: por Automattic – 8.8.2 (la actualización a la versión 8.8.3 está disponible)

Inactive Plugins (24)

Akismet Anti-spam: Spam Protection: por Automattic - Anti-spam Team – 5.3.2 Better Search Replace: por WP Engine – 1.4.6 Depicter: por Averta – 2.1.11 Elementor: por Elementor.com – 3.21.3 Essential Addons for Elementor: por WPDeveloper – 5.9.17 Google Analytics for WooCommerce: por WooCommerce – 2.0.6 Image Widget: por The Events Calendar – 4.4.9 Joinchat: por Creame – 5.1.5 Lazy Load Clarity: por Jorcus – 1.1.1 Loco Translate: por Tim Whitlock – 2.6.7 Maintenance: por WebFactory Ltd – 4.08 Ocean Extra: por OceanWP – 2.2.7 OMGF: por Daan from Daan.dev – 5.9.0 Smush Pro: por WPMU DEV – 3.15.2 SOGO Add Script Header Footer: por orenhav (SOGO) – 3.9 W3 Total Cache: por BoldGrid – 2.7.1 Widgets for Google Reviews: por Trustindex.io support@trustindex.io – 11.8.3 Widgets for WooCommerce Products on Elementor: por Themelocation – 2.0.0 WooCommerce Legacy REST API: por WooCommerce – 1.0.1 Wordfence Security: por Wordfence – 7.11.5 WPForms Lite: por WPForms – 1.8.8.2 YITH WooCommerce Catalog Mode: por YITH – 2.34.0 Yoast Duplicate Post: por Enrico Battocchi & Team Yoast – 4.5 Yoast SEO: por Team Yoast – 22.5

Settings

API Enabled: ✔ Force SSL: – Currency: EUR (€) Currency Position: right_space Thousand Separator: . Decimal Separator: , Number of Decimals: 0 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock-2) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-3 (rated-3-2) rated-4 (rated-4) rated-5 (rated-5)

Connected to WooCommerce.com: – Enforce Approved Product Download Directories: – HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: –

Logging

Enabled: ✔ Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2 Retention period: 30 días Level threshold: – Log directory size: 314 KB

WC Pages

Base de la tienda: #30 - /tienda/ Carrito: ❌ La visibilidad de la página debe ser pública Finalizar compra: ❌ La visibilidad de la página debe ser pública Mi cuenta: ❌ La visibilidad de la página debe ser pública Términos y condiciones: #3457 - /terminos-y-condiciones/

Theme

Name: Twenty Twenty-Four Version: 1.1 Author URL: https://es.wordpress.org Child Theme: ❌ – Si estás modificando WooCommerce en un tema padre que no has creado personalmente te recomendamos utilizar un tema hijo. Ver: Cómo crear un tema hijo

WooCommerce Support: ❌ No declarada

Templates

Overrides: /usr/home/akraclima.com/web/akraclimapruebas/wp-content/plugins/woocommerce/templates/block-notices/error.php /usr/home/akraclima.com/web/akraclimapruebas/wp-content/plugins/woocommerce/templates/block-notices/notice.php /usr/home/akraclima.com/web/akraclimapruebas/wp-content/plugins/woocommerce/templates/block-notices/success.php

Admin

Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customize-store customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks product-variation-management product-virtual-downloadable product-external-affiliate product-grouped product-linked product-pre-publish-modal remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page

Disabled Features: minified-js new-product-management-experience product-custom-fields settings async-product-editor-category-field launch-your-store

Daily Cron: ✔ Next scheduled: 2024-05-01 07:49:11 +02:00 Options: ✔ Notes: 203 Onboarding: completed

Action Scheduler

Completo: 252 Oldest: 2024-03-30 14:24:37 +0100 Newest: 2024-04-30 10:17:05 +0200

Fallida: 31 Oldest: 2023-03-24 17:35:35 +0100 Newest: 2024-04-29 10:59:36 +0200

En curso: 1 Oldest: – Newest: –

Pendiente: 4 Oldest: 2024-04-30 20:49:50 +0200 Newest: 2024-05-01 05:28:20 +0200

Status report information

Generated at: 2024-04-30 10:20:29 +02:00

shameemreza commented 5 months ago

Reported here: 8106340-zen Thread link: https://wordpress.org/support/topic/not-receiving-ga4-events-after-installing-the-plugin/

jorgemd24 commented 5 months ago

Hey, thanks for bringing this up.

I noticed that the website https://akraclimapruebas.akraclima.com/ is targeting customers in Spain but doesn't seem to have a consent mode banner. Since March 2024, it's been required for users to consent to capturing some event data for EEA, UK, and Switzerland regions.

Since GLA 2.6.1 (https://github.com/woocommerce/google-listings-and-ads/releases/tag/2.6.1), the following events are disabled by default for all EEA, UK, and Switzerland regions:

https://github.com/woocommerce/google-listings-and-ads/blob/ad637eb00b292f1d1798c218d56578f17273bda0/src/Google/GlobalSiteTag.php#L290-L296

See more here: https://github.com/woocommerce/google-listings-and-ads/blob/develop/docs/gtag-consent-mode.md

I'd recommend adding a consent banner and giving it another shot with the latest GLA version.

shameemreza commented 5 months ago

It seems another report here: 8049142-zen Thread: https://wordpress.org/support/topic/no-traffic-and-data-after-latest-updates/

I shared the update based on @jorgemd24 comment.

OmarFPG commented 5 months ago

First, thank you so much, @jorgemd24, for the valuable input! Can you share a bit more details about which would be the best way to add a consent banner that is proven to work with GLA?

I ask since we have another request here... Thread: https://wordpress.org/support/topic/google-ads-tag-events-are-not-sent-since-update-2-61/ 8136599-zd

The user shared these details and concerns:

How does the plugin check acceptance and how can it be integrated with some cookie consent checking solution? This is incomprehensible to me. For example, the Pixel Your Site plug-in solves this problem in such a way that you can set all consents as accepted by default and block the activation of the tag using an external solution.

Thanks a lot!

eclipseinformatica commented 5 months ago

Hey, thanks for bringing this up.

I noticed that the website https://akraclimapruebas.akraclima.com/ is targeting customers in Spain but doesn't seem to have a consent mode banner. Since March 2024, it's been required for users to consent to capturing some event data for EEA, UK, and Switzerland regions.

Since GLA 2.6.1 (https://github.com/woocommerce/google-listings-and-ads/releases/tag/2.6.1), the following events are disabled by default for all EEA, UK, and Switzerland regions:

https://github.com/woocommerce/google-listings-and-ads/blob/ad637eb00b292f1d1798c218d56578f17273bda0/src/Google/GlobalSiteTag.php#L290-L296

See more here: https://github.com/woocommerce/google-listings-and-ads/blob/develop/docs/gtag-consent-mode.md

I'd recommend adding a consent banner and giving it another shot with the latest GLA version.

Hi.

I reported this error at Wordpress forum.

I can tell that if I disable the GLA module, then the click events working ok and are caught by Google Analytics. If I active the GLA module, then does not work ok. Too I reported that with 2.6.0 and older version, the click events always work ok. The problem happens only when I active the GLA module with 2.6.1 o newest versions.

If you need it, I can do any action at these subdomain for testing.

Regards.

ianlin commented 5 months ago

@OmarFPG

Can you share a bit more details about which would be the best way to add a consent banner that is proven to work with GLA?

I personally have not tested it but right now on the GL&A WooCommerce product page there is a note saying:

To ensure continued tracking, you’ll need to implement Consent Tracking through third-party plugins like Complianz, Consent Mode API, etc.

It might worth taking a look at the plugin like Complianz.

OmarFPG commented 5 months ago

Thank you, @ianlin! Yes Complianz is the current recommendation we're giving users! /cc @sukafia

chrism245 commented 4 months ago

8194644-zen