As a precautionary health measure for our Google support specialists in light of COVID-19, some support options may be unavailable or delayed. We apologize for any inconvenience this may cause and appreciate your patience. This message will be updated as the situation changes.

Display prices in Google Ads dynamic ads

Google Ads feeds can contain more than one price for an item, such as the regular price and a sale price. The Google Ads dynamic ad templates in Google Web Designer include functionality to determine which price should display for each feed item.

Learn more about creating dynamic ads for Google Ads in Google Web Designer.

Display a single price for each item

If your feed only contains a single price for each item, bind the text content of the price element to the Retail 0 > Regular price attribute. (Replace "Retail" with your business type.)

Display the sale price with the regular price

Your feed may contain sale prices but not for all items. The Google Ads remarketing dynamic templates in Google Web Designer include code that let you determine how to display prices, depending on whether an item has a sale price and whether the sale price differs from the regular price.

  1. Create three text elements in the creative for the following price types. Give each element an ID.
    • Default price - This price displays by itself when there's no sale price.
    • Sale price - When provided in the feed, this price displays alongside the regular price.
    • Regular price - When the sale price is provided in the feed, this price displays alongside the sale price, often in strikethrough, so viewers can see how much they can save.
  2. Bind the text content of the text elements to the following data schema objects:

    Example bindings for a Retail-type feed:

    • Default price - Bind to Retail 0 > Lowest price (replace "Retail" with your business type).
    • Sale price - Bind to Retail 0 > Sale price (replace "Retail with your business type).
    • Regular price - Bind to Retail 0 > Regular price (replace "Retail with your business type).
  3. In Code view, add the following classes to the elements:
    • Default price - Add the class js-item-price to the element.
    • Sale price - Add the class js-item-saleprice to the element.
    • Regular price - Add the class js-item-regularprice to the element.
  4. If your project folder has a common subfolder, open the custom.js file for editing. Otherwise, add the following code in your main document in Code view. In the initItemDisplay function, which is called for each feed item, call the displayCorrectPrices function (already defined in the template code) and pass a reference to the IDs of each text element. Example IDs are highlighted below:

    common.displayCorrectPrices(itemDefaultPrice, itemSalePrice, itemRegularPrice

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center