Google Ads Dynamic Remarketing for WooCommerce – How to setup?
Learn to setup dynamic remarketing for WooCommerce in Google Ads (formerly Google AdWords), using Google Tag Manager and GTM4WP.
This page describes GTM4WP 2.0.0 and newer. Where the legacy 1.x versions of the plugin behaved differently, the older behavior is marked with a bold GTM4WP 1.x: lead-in.
Dynamic remarketing in general
The term dynamic remarketing in general was being used way before Google implemented it in Google Ads. In general this term stands for a special kind of remarketing that uses several signals on your website to tailor the message shown to your past visitors without the need to create several or maybe hundreds or thousands of unique ad copies.
Dynamic remarketing is utilized many times in e-commerce where there are lots of products or offers in a webshop. With prices and availability varying daily can make managing those campaigns almost impossible manually.
There are several advertising platforms out there where you can access dynamic remarketing features but the way (the algorithm) a platform implements varies a lot. Some of them are collecting several signals like cart additions, checkouts and purchases, others are “simply” keen of the product ID a visitor was seeing. Some platforms can collect user behavior data without further tagging on your website.
Dynamic remarketing in Google Ads (AdWords)
Google Ads first introduced dynamic remarketing for retail businesses who first had to open a Merchant Center account and list their products there using a product feed. For years this was the only dynamic remarketing solution in Google Ads which excluded several other types of e-commerce businesses (like hotels, flight ticket services and so on).
Google Merchant Center now covers a long list of countries, but not every country, so it is worth checking whether yours is supported before you plan a retail campaign.
Google later introduced a revamped dynamic remarketing solution which allows other verticals to start using remarketing in a more sophisticated way.
Google Ads uses several signals to make sure your message is being shown to more prospect users:
- visiting a product detail page
- adding products into the cart
- the express of the user for conversion (like entering the checkout funnel)
- conversions of users
Because of this, Google can have a robust list of product data and signals about which product can be sold quicker. This also includes data about what could be the alternatives for a product or what are the cross-sell opportunities.
Two ways to send the data
GTM4WP already sends GA4 ecommerce events, and those events carry the product data that dynamic remarketing needs. If your Google Analytics 4 property is linked to your Google Ads account, Google can pass those attributes across for you, and you do not need the remarketing tag described further down this page.
Google describes this on the Tag Platform dynamic remarketing page and in Analytics Help: web and app display dynamic remarketing is available in Google Analytics, and it transfers dynamic attributes such as product IDs and price values directly to Google Ads.
The Analytics route needs three things:
- ecommerce tracking set up as described in the GA4 setup guide, so that your events carry the item data
- Google signals or user-provided data collection turned on in your GA4 property
- the property linked to your Google Ads account, with Enable Personalized Advertising selected in the link
Allow up to two days after linking for the audience lists to appear in Google Ads.
The rest of this page covers the other route, where a tag of your own in Google Tag Manager sends the data to Google Ads directly. Pick it if you do not want the data to travel through Analytics, if the two accounts are not linked, or if you would rather leave the personalized advertising features of your GA4 property switched off.
Step 1 below matters either way. The business vertical, the SKU choice and the product ID prefix shape the item data itself, so they decide what Google Ads receives through Analytics just as much as what your own remarketing tag sends.
Setting up Google Ads dynamic remarketing for WooCommerce using GTM4WP
Google Tag Manager for WordPress supports setting up dynamic remarketing for Google Ads in your WooCommerce shop.
Step 1: setup business vertical, product ID prefix and ID vs SKU
The data the Google Ads remarketing tag needs is almost ready to be used in the data layer. You only need to set some options so that your tagging matches your Google Ads setup.
Open the GTM4WP plugin settings page and go to the WooCommerce section. Turn on Track e-commerce in the General group if it is still off, because it is the master switch of the whole WooCommerce integration. The three options below are in the Product data group.
GTM4WP 1.x: all of these live on the Integration->WooCommerce tab, in one long list rather than in groups.
Google Ads Business Vertical
Select your business vertical so that Google Ads can pick the right algorithm for your dynamic remarketing campaign. The choice decides the name of the item ID parameter in your tagging and adds the matching google_business_vertical parameter to the data layer.
The plugin offers nine verticals: Retail, Education, Flights, Hotel rental, Jobs, Local deals, Real estate, Travel and Custom. Retail is the default, and it is also the fallback if a stored value is no longer valid.
For Flights and Travel the item identifier is sent as destination. Every other vertical sends it as id. You do not need to configure this, but it is worth knowing when you compare your tagging against your feed.
GTM4WP does not handle the advanced parameters of the special verticals, such as origin for Flights or location_id for Jobs.
Use SKU instead of ID
Product IDs are WordPress post IDs which are unique to each product. Products in WooCommerce are a special kind of post with additional options that turn those posts into real products with prices and stock info. Product IDs are generated automatically by WordPress, so they do not follow the system you use in your own inventory tracking.
SKU is the WooCommerce field where you can enter your own product identifiers (stock keeping units).
Feed plugins usually use the product ID in the feed, but some of them use the SKU from the WooCommerce product page. The identifiers in your feed and in your site tagging must match, otherwise Google Ads cannot connect the products in your feed to the products your visitors viewed. Turn on Use SKU instead of ID when your feed uses SKUs. The plugin falls back to the ID for any product with no SKU set.
Product ID prefix
Some feed generator plugins prepend a fixed text to the product ID in the feed, for example woocommerce_gpf. Enter that text in Product ID prefix so that the IDs in your tags match the IDs in your feed.
Next to proper tagging, dynamic remarketing also requires you to generate product feeds. For the Retail vertical the feed has to be uploaded to Google Merchant Center. For other verticals it can be uploaded directly to Google Ads.
Step 2: import GTM4WP Google Analytics 4 container template
If you already setup Google Analytics 4 tracking then you can skip this step.
If you have not set it up before, visit the GA4 setup article and go through Step 1. That import creates the {{Event}}, {{Ecommerce Value}} and {{Ecommerce Items}} variables and the “Event – Ecommerce Events” trigger used below.
Step 3: check your existing Google Ads remarketing tag
Skip this step if you are setting up dynamic remarketing for the first time.
If you configured dynamic remarketing years ago with a much older release of GTM4WP, you probably have a Google Ads remarketing tag firing on “All pages” or “DOM Ready” that carries product parameters of its own. Those parameters came from a way of sending product data that the plugin no longer supports, so remove them:

Remove the other triggers from this tag and keep only the “All pages” trigger. Your container may also carry blocking triggers that enforce your GDPR rules, and those differ by consent management platform. Keep them when you edit the triggers. The goal is to fire this tag on all pages where the visitor has granted consent for remarketing.
After this change the tag collects page view data but no ecommerce data. The tag you build in the next step handles the ecommerce part.
Step 4: setup your Google Ads dynamic remarketing tag
Create a new Google Ads remarketing tag next to the tag shown above. Set a name, for example “Google Ads – Remarketing – Ecommerce Events”.

- Enter your Conversion ID, which is usually the same as in your generic Google Ads remarketing tag. If you imported the container template, you can select the {{Google Ads Conversion ID}} constant instead of typing it again
- Turn on the Send dynamic remarketing event data option
- Set the {{Event}} variable in the Event Name field
- Set the {{Ecommerce Value}} variable in the Event Value field
- Set the {{Ecommerce Items}} variable in the Event Items field
- Scroll down to the Triggering section and add the Event – Ecommerce Events trigger
- Add every blocking trigger that prevents data collection when the visitor has not consented to it
Save the tag.
You are now ready to use dynamic remarketing for WooCommerce in Google Ads
That’s it: you are now sending proper signals and product data to Google Ads about what users are doing on your site while browsing. But as I said, this is only half of the tasks you have to do: you will need to obtain an other plugin that can generate a proper product feed.

