Open sukafia opened 1 year ago
These are the javascript snippets added by WooCommerce Google Analytics Integration plugin that tracks add_to_cart and view_item events. As you can see the product id is #110635 while the one uploaded in merchant center by Google Listings and Ads would be gla_110635.
This breaks correspondence between Google Analytics segments data and Merchant Center products that is needed for remarketing campaigns.
$( '.single_add_to_cart_button' ).on( 'click', function() {
gtag( 'event', 'add_to_cart', {
'event_category': 'ecommerce',
'event_label': '#110635',
'items': [ {
'id': '#110635',
'name': 'Disco Freno Mtb Saccon 160mm 6 fori',
'quantity': $( 'input.qty' ).val() ? $( 'input.qty' ).val() : '1'
} ]
} );
});
gtag( 'event', 'view_item', {
'items': [ {
'id': '#110635',
'name': 'Disco Freno Mtb Saccon 160mm 6 fori',
'category': 'Altre marche/Componenti MTB/Dischi Freno',
'price': '14.90',
} ]
} );
The best option, in my honest opinion, would be to add a setting that lets the user decide wich prefix use for product ids.
This would give maximum compatibility over different plugins.
I have the same problem. It's interesting not solved yet. This problem is a killer for effective ad campaigns. Someone immediately should fix it.
How can such a serious problem go unsolved for almost a year. We're throwing money down the drain with remarketing campaigns
Another report here: https://wordpress.org/support/topic/id-merchant-center-gla_
zd-6735502
If you're experiencing this issue, here is a code snippet that would sync products without the gla_ prefix:
// Sync products without GLA prefix.
add_action(
'woocommerce_gla_get_google_product_offer_id',
function ( $mc_id, $product_id ) {
return (string) $product_id;
},
10,
2
);
Please read How do I remove the gla_ prefix from synced products for additional instructions.
It's worth mentioning that our developers are looking into the best way to address this issue, ensuring Google Listings & Ads data matches that of Google Analytics and other integrations.
If you're experiencing this issue, here is a code snippet that would sync products without the gla_ prefix:
// Sync products without GLA prefix. add_action( 'woocommerce_gla_get_google_product_offer_id', function ( $mc_id, $product_id ) { return (string) $product_id; }, 10, 2 );
Please read How do I remove the gla_ prefix from synced products for additional instructions.
It's worth mentioning that our developers are looking into the best way to address this issue, ensuring Google Listings & Ads data matches that of Google Analytics and other integrations.
where I enter this code ?
I just added this code and its only randomly removing the gla
Same log file:
2024-08-09T05:54:20+00:00 Debug Automattic\WooCommerce\GoogleListingsAndAds\Product\ProductSyncer::update_by_batch_requests Submitted 100 products: [{"woocommerce_id":259643,"google_id":"online:en:AU:gla_259643"},
2024-08-09T05:54:46+00:00 Debug Automattic\WooCommerce\GoogleListingsAndAds\Product\ProductSyncer::update_by_batch_requests Submitted 100 products: [{"woocommerce_id":259743,"google_id":"online:en:AU:259743"},{"woocommerce_id":259744,"google_id":"online:en:AU:259744"},
Can someone explain to me where to add the code to remove the gla prefix? In which file or place to put the code
He is working on a file. functions
With the new update
The status readings for events in Google Analytics have become
For each event twice
I don't know where the problem is, but when the universe is stopped
The events are once
And when it is turned on, they become twice
Is anyone facing the same problem?
I ended up removing the $slug from google-listings-and-ads\src\Product\WCProductAdapter.php
I saw that the code might be this though:
add_action( 'woocommerce_gla_get_google_product_offer_id', function ( $mc_id, $product_id ) { return (string) strreplace('gla', '', $product_id); }, );
Works once and every update It's up to putting gla tag in product data Tired of the situation All our money went into the sea To run a remarketing campaign Everything is gone From here I say to all those responsible for this add-on We will hold you accountable on the Day of Judgment
yes, but install the snippets plugin and add it there.
Describe the bug:
WooCommerce product IDs only consist of numbers, while the Google Listings & Ads product ID uses a prefix that precedes the numbers:
– WooCommerce product ID: 12345 – GL&A product ID: gla_12345
We're seeing reports regarding the difference in GL&A product IDS from WooCommerce and other analytics integration such as WooCommerce Google Analytics causing a problem with remarketing as the product IDs don't correspond.
According to one user, WooCommerce Google Analytics Integration” plugin instead sends plain product IDs data in gtag events that get captured by Google Ads as you can see here:
().
Due to this difference in product IDs between GL&A and WooCommerce Google Analytics (as well as other analytics integrations), Google Ads cannot find any correspondence between products IDs added by the user in the shopping cart and the merchant feed as you can see here: