Dynamic ads automatically pull product information, images, and descriptions from a data feed to show each viewer a personalized ad based on what they’ve browsed, searched for, or shown interest in. Instead of building individual ads for every product in your catalog, you build one template and let the platform assemble the right creative for each person. Here’s how to set them up from start to finish.
How Dynamic Ads Work
A dynamic ad system has three connected pieces: a product feed (your catalog of items with titles, images, prices, and URLs), a tracking pixel or tag (code on your website that records what visitors look at), and an ad template (the layout the platform fills with the right product for each viewer). When someone visits your site, browses a product page, and leaves without buying, the tracking code captures that behavior and matches it to the corresponding item in your feed. The platform then serves that person an ad featuring the exact product they viewed, or similar items from your catalog.
This approach works across multiple industries and platforms. Google supports dynamic ads for retail, hotels, flights, real estate, jobs, education, and local deals. Meta runs a similar system through Advantage+ catalog ads. The core setup process is the same regardless of platform: build your feed, install your tracking, then create the campaign.
Build Your Product Feed
Your product feed is a structured file, typically a spreadsheet or XML document, containing every item you want to advertise. Each row represents one product, and each column holds a specific attribute like title, price, image URL, landing page, and availability. The exact fields depend on your platform and industry vertical.
For retail on Google, your feed lives in Google Merchant Center and needs fields like product ID, title, description, link, image link, price, availability, brand, and condition. Each product ID in your feed must match the ID your tracking pixel sends when someone views that product on your site. This matching is what connects visitor behavior to the right catalog item.
For other verticals, the required identifiers change. Hotels need a Property ID, flights need Origin and Destination IDs, job listings need a Job ID, and real estate needs a Listing ID. Meta uses similar feed templates for products, flights, hotels, destinations, automobiles, and real estate, each with its own required attributes.
Feed Image Requirements
Images in your feed must be PNG, JPG, JPEG, or GIF format. For best results, save them in RGB color space (not CMYK, which is designed for print and won’t process correctly). Keep image files under 1 MB each, and size them to the dimensions they’ll actually display at rather than uploading oversized images that get scaled down at serving time. Host your images on a server that responds quickly, with open permissions so the ad platform can access them. If your server uses SSL, verify that the certificate is valid, since broken SSL can prevent images from loading in your ads.
Remove special characters from image file names and URLs. Characters like ampersands, accented letters, or spaces in file paths can prevent images from loading properly.
Install Tracking on Your Website
Dynamic ads depend on knowing what each visitor does on your site. You install a base tracking tag (Google’s global site tag or Meta’s pixel) on every page, then add event snippets on key pages to capture specific actions.
Google’s dynamic remarketing uses event snippets that fire on different page types, each sending the relevant product ID back to the ad platform. The five recommended events are:
- view_search_results: fires when someone uses your site’s search, sending the IDs of products shown in results
- view_item_list: fires on category pages, capturing which product groups someone browses
- view_item: fires on individual product pages, the most important event for remarketing
- add_to_cart: fires when someone adds an item to their cart, signaling high purchase intent
- purchase: fires on the order confirmation page, letting the platform know the conversion happened so it stops showing ads for that item
Each event sends an items array containing the product ID and a google_business_vertical value that tells Google which feed to match against. For retail, you’d set google_business_vertical to “retail” and make sure the ID matches what’s in your Merchant Center feed. For hotels, the vertical is “hotel_rental” and the ID matches your Property ID. The event snippet looks like this in practice:
On a product page, the code fires a view_item event with the product’s ID and a value representing its price. On a cart page, it fires add_to_cart with the same structure. The critical detail is that the ID your snippet sends must exactly match an ID in your feed. If your feed lists a product as “SKU-1234” but your website sends “1234,” the platform can’t make the connection and won’t serve dynamic ads for that product.
Meta’s pixel works similarly, using events like ViewContent, AddToCart, and Purchase, each passing a content_ids parameter that maps to your catalog.
Create Dynamic Search Ads in Google
Dynamic Search Ads (DSAs) are a Google-specific format where Google automatically generates your ad’s headline and landing page URL based on your website content. You only write the description lines. This is different from dynamic remarketing display ads, but it’s one of the most common types of dynamic advertising.
To set one up, go to your Google Ads account and click the Campaigns icon, then create a new campaign. Select Search as the campaign type. Choose your bidding strategy, set your targeting locations, languages, and daily budget, then save and continue. After the campaign is created, go to Settings and expand the Dynamic Search Ads setting, where you’ll enter your website domain and select the language.
Next, create a Dynamic ad group by selecting the Dynamic ad group type. You’ll choose how to target your ads: you can let Google use the landing pages from your existing standard ad groups, select from categories Google has identified on your site, or specify exact URLs. When you create the ad itself, select Dynamic Search Ad as the format. Google generates the headline and final URL automatically based on the page it matches, so you only need to write compelling description text. Write descriptions that work broadly across multiple products or pages, since you don’t control which page Google pairs them with.
Create Catalog Ads on Meta
Meta’s dynamic ad format is called Advantage+ catalog ads. The setup has four main stages: create your product feed, build a catalog in Commerce Manager, connect the catalog to an ad, and link the ad to a campaign.
Start in Meta Commerce Manager by creating a catalog and choosing the right category (products, hotels, flights, destinations, automobiles, or real estate). Upload your feed as a CSV file or connect it through a hosted URL that Meta can refresh on a schedule. Each feed template is designed with the specific attributes Meta requires for that category.
Once your catalog is populated and your pixel is tracking visitor behavior on your site, create a new campaign in Ads Manager. At the ad set level, choose your catalog as the product source and define your audience. You can target people who viewed specific products on your site (remarketing) or use broad audiences to prospect new customers with items they’re likely to be interested in. At the ad level, Meta pulls images, titles, prices, and descriptions directly from your catalog into the ad template.
Design Your Ad Templates
The creative template is the layout your dynamic elements drop into. Getting this right determines whether your ads look polished or broken across thousands of product variations.
For dynamic text like headlines and calls to action, limit yourself to one or two fonts. Each additional font adds 5 to 10 KB to the file size, which slows loading. Keep all headlines short and roughly the same length, since every headline must fit the same space in the template. If one product has a 4-word name and another has a 15-word name, the longer one will either get cut off or shrink to an unreadable size. Avoid styling individual words with different sizes, colors, or kerning, because that formatting breaks when different text gets swapped in dynamically.
Use animation sparingly with dynamic text. The more you animate individual words or segments of a headline separately, the harder it becomes to make the sequence work across all possible headline variations. If you use special characters or non-Latin characters in your feed, test their visual appearance in the actual ad before going live.
For images, use JPG files when possible because of their smaller file size. Use transparent PNGs only when you need the image to blend seamlessly against the ad’s background. Always specify colors as hex values (like 0xFF0000) rather than color names, since hex values render consistently across devices and browsers.
Test Dynamic Elements Together
The trickiest part of dynamic ads is that each element (headline, image, price, CTA) changes independently, and combinations you never manually reviewed will appear in front of real people. A product image with a dark background might make white headline text invisible. A long product title might push a price or CTA button off screen.
Before launching, pull up a sample of products from your feed that represent the extremes: the longest and shortest titles, the lightest and darkest product images, the highest and lowest prices. Preview how the template renders with each combination. On Google, you can use the ad preview tool. On Meta, the ad preview in Ads Manager shows you how different catalog items appear in the template.
After launch, monitor which products get impressions and clicks. Products with poor images, vague titles, or missing attributes tend to underperform. Improving your feed data, writing tighter product titles, using higher quality images, and filling in every optional attribute, often does more for performance than adjusting bids or targeting. Your feed is the raw material, and the quality of your dynamic ads can never exceed the quality of what you put into it.

