Set up automated discounts

Automated discounts is an add-on feature in Merchant Center that uses Google AI to help increase your gross profit by optimizing discounted prices for products in your Shopping ads on Google. Learn more About automated discounts in Merchant Center.

On this page

Eligibility

Before you set up automated discounts, ensure you currently receive and measure purchase conversions from your Shopping campaigns in Google Ads. Learn more about how to Set up your conversions.


Instructions

Step 1 of 5: Get automated discounts for Merchant Center

Add the automated discounts add-on to your Merchant Center account. Learn more how to activate add-ons in Merchant Center.

  1. In your Merchant Center click Settings Tools and setting menu icon [Gear] and then Add-ons. You'll view a list of all available options.
  2. Find the "Automated discounts" add-on and select Add.
  3. In the "Add Automated discounts" add-on dialog, select Add.

An "Automated discounts" tab is added to the "Marketing" section in Merchant Center.

Step 2 of 5: Select online store builder and currency

Specify whether your online store is built with a third-party platform and select a currency to show in reports of your product performance.

  1. In your Merchant Center account, go to the Automated discounts tab in the "Marketing" section.
  2. In the "Automated discounts" screen, follow the on-screen instructions to select your online store builder and currency, then select Save basic info.
    • The Automated discounts screen opens, which includes information about setting up automated discounts.
    • Note that if you need to change your currency before or after you finish setting up automated discounts, contact us.
  3. Do one of the following steps:
    • If Shopify is your online store builder, either follow the steps in Set up automated discounts in the Shopify Google & YouTube app to finish setting up automated discounts in the Google & YouTube app, or if your Shopify channel partner is Simprosys or WoolyTech, work with your channel partner to finish setting up automated discounts.
    • If you use one of the following third-party builders, work with your channel partner.
    • If you don’t use an online store builder, or if you use a different third-party online store builder than those previously listed, go to the next step.

Step 3 of 5: Add products to automated discounts

The more products that you add to automated discounts, the more flexibility automated discounts has to optimize your gross profit.

Requirement: Add enough products to automated discounts so their combined impressions account for at least 20% of your total product impressions from Shopping ads.

Note:

  • If you use Shopify as your online store platform, follow the steps in Set up automated discounts in the Shopify Google & YouTube app to finish setting up automated discounts.
  • If you use WooCommerce, Magento 2, or Shopware 6 as your online store platform, work with your channel partner to help you finish setting up automated discounts.

For each product that you want to add to automated discounts, add the following attributes to product details in your data source. Learn more about how to Manage your data sources.

Don’t include sales tax or VAT in COGS.

Tip: COGS is used to estimate your gross profit and to optimize prices in your Shopping ads. For best results, add COGS to all products in your inventory, which helps automated discounts maximize your gross profit.
  • Minimum price [auto_pricing_min_price] — Add a value that is 5% to 95% lower than the product's current price, but not lower than the product’s COGS.

In the US and Canada, don’t include sales tax in minimum prices. Outside of the US and Canada, include sales tax or VAT in minimum prices.

Tip: Minimum prices are used to optimize prices in your Shopping ads. For best results, add a minimum price that is at least 10% lower than the product’s current price, which gives automated discounts more flexibility to optimize prices and maximize your gross profit.

Optimized prices will always be higher than or equal to your minimum prices.

Note: Google is committed to your data privacy and will never share your product and pricing details. For more information on privacy concerns while using Google products and services, review Google's Terms of Service. For details on how Google handles personal information, review Google's Privacy Policy.

Changes to product details in your data source will be applied within 1-2 days.

  • To remove products from automated discounts, in your product data source, either remove the minimum price attribute[auto_pricing_min_price] from a product’s details or enter a value in a product’s minimum price attribute that is equal to the price of the product.
Note: When you remove products from automated discounts, keep the COGS attribute [cost_of_goods_sold] and value for those products. COGS will still be used to estimate your gross profit and to calculate your total profit when those products are purchased.

Step 4 of 5: Set up conversions with cart data

Cart data from purchases allows Google to measure sales, revenue, and profit from your Shopping ads.

Automated discounts uses this information when selecting products, optimizing discounted prices in your Shopping ads, and reporting your profit performance in Merchant Center. Google Ads also uses your conversion and cart data when reporting your product and campaign performance.

Requirements:

  • Conversions must be Primary conversions
  • Primary conversions must measure Purchase events
  • Product IDs in cart data must match products in Merchant Center
  • Cart data must include a price value, such as 15.00
  • Total price of all items in a cart should be higher than the items’ total cost of goods sold

Note:

  • If you use Shopify as your online store platform, either follow the steps in Set up automated discounts in the Shopify Google & YouTube app to finish setting up automated discounts in the Google & YouTube app, or if your Shopify channel partner is Simprosys or WoolyTech, work with your channel partner to finish setting up automated discounts.
  • If you use WooCommerce, Magento 2, or Shopware 6 as your online store platform, work with your channel partner to help you finish setting up automated discounts.
  1. Follow the steps in Set up and test reporting with conversions with cart data to set up Primary conversions in Google Ads and to add cart data to your conversion tags.
    • Note that Automated discounts doesn’t support Floodlight conversions.
  2. If you haven’t yet completed a test order to ensure your conversion tag parameters are set up correctly, do the following steps.
    1. In your Chrome web browser, open Chrome DevTools by selecting the More icon 3 dot menu icon in the top-right corner and selecting More tools > Developer tools.
    2. In the DevTools panel, select Network.
    3. Submit a test order in the Chrome web browser.
    4. Search for "/conversion" which includes the request that contains your conversion. The query string parameters should include the cart parameters, as shown in the following example:
      mid = aw_merchant_id
      fcntr = aw_feed_country
      flng = aw_feed_language
      dscnt = discount
      bttype = event type
      item = items (the array) mapping all items with (items.id * items.price * items.quantity)
Tip: To troubleshoot your conversions and cart data, use the conversions with cart data diagnostics tool in Google Ads. Learn more About conversions with cart data diagnostics.

Step 5 of 5: Set up discounted prices in your online store

Set up your online store to show discounted prices and prior prices (for EEA countries) from Google-generated JSON Web Tokens (JWT), which are included in URLs from your Shopping ads.

Requirements:Discounted prices must show in the following places.

  • On product landing pages for at least 30 minutes, even if customers revisit a product landing page and the JWT is no longer in the URL
  • In the cart and checkout process for at least 48 hours

Note:

  • If you use Shopify as your online store platform, either follow the steps in Set up automated discounts in the Shopify Google & YouTube app to finish setting up automated discounts in the Google & YouTube app, or if your Shopify channel partner is Simprosys or WoolyTech, work with your channel partner to finish setting up automated discounts.
  • If you use WooCommerce, Magento 2, or Shopware 6 as your online store platform, work with your channel partner to help you finish setting up automated discounts.

Product landing page of a green candle with the original price crossed out and sale price in red.

Step 5a: Show discounted prices from Google-generated JSON Web Tokens (JWT)

JWT structure

Refer to the following JWT structure when you set up your online store.

JWTs contain two objects: header and payload.

JWT header

{

"alg" : "ES256",

"typ" : "JWT"

}

Google-generated JWT headers have 2 fields:

  • alg — used algorithm, value is always "ES256"
  • typ — media type, value is always "JWT"

If the JWT header contains any other fields or field values that are different from the required values, the token must be rejected.

JWT payload

{

"exp" : 1571673600,

"m" : "140301646",

"o" : "tddy123uk",

"c" : "USD",

"p" : 21.99,

"pp" : 15.00

}

The JWT payload includes the following fields:

  • exp — Expiration time as Unix time. If the token is expired, it must be rejected.
  • m — Merchant ID. If the merchant ID doesn't match, the token must be rejected.
  • o — Offer ID, used to check if the landing page matches the product or a valid variant, such as a different size of the same shoes. If the landing page doesn't match the product or a valid variant, the token must be rejected.
  • c — Currency in ISO 4217 format.
  • p — Price from automated discounts.
  • pp — Prior price from your Shopping ads.

Prior price for countries within the European Economic Area (EEA) : You may choose to show the prior price in your online store. The prior price will be included in the URL if the prior price is shown in your Shopping ad.

  • For Croatia, Latvia, Norway, Poland, and Spain: The prior price represents the previous lowest price shown to users on Google in the past 30 days before the latest price reduction.
  • For all other EEA countries: The prior price represents the previous lowest price shown to users on Google in the past 30 days before the latest price reduction, except when consecutive price reductions are applied (for example, 10% off, then 20% off, then 50% off) within the past 60 days. If consecutive price reductions are applied, the prior price will be the price that was applied before the first price reduction.

Example of prior price for EEA countries after consecutive price reductions:

Day 1, price before first reduction: 100€
Day 7, first price reduction: 90€
Day 14, second price reduction: 80€
Day 21, third price reduction: 70€

Prior price after the third price reduction:

  • 80€ (previous lowest price) for Croatia, Latvia, Norway, Poland, and Spain
  • 100€ (price before first reduction) for all other EEA countries

Consuming the token

There are 3 general steps to consume the token depending on the library you use: decoding and signature validation, field validation, and consuming price.

  1. Decode the token and validate the signature.

    Most libraries combine decoding and signature validation into a single function, where 'token," "ES256" (algorithm), and "public key" are inputs, and "token_body" is the output:
    token_body = decode(token, 'ES256', public_key)
    1. Decode the Base64URL encoded token, which is passed in a pv2 URL request parameter:
      http://my.site.com/blacktee?pv2=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJjIjoiVVNEIiwiZXhwIjoxNTcxNjczNjAwLCJtIjoiMTQwMzAxNjQ2IiwibyI6InRkZHkxMjN1ayIsInAiOjIxLjk5fQ.Qlyr1dQ0vLUJx-iQKwkYE2uLHfYCLVEVGZkAq4fwGTSpMDQCbtzDJr5uGHG8dNKaKV5OlYDxLpW40tQVVe2gk
    2. Copy the following public key exactly as it appears and use it to validate the signature.
      -----BEGIN PUBLIC KEY-----

      MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAERUlUpxshr67EO66ZTX0Fpog0LEHc nUnlSsIrOfroxTLu2XnigBK/lfYRxzQWq9K6nqsSjjYeea0T12r+y3nvqg==

      ----END PUBLIC KEY-----
      Note that this public key doesn’t expire and follows the Privacy-Enhanced Mail format.
  2. Validate the header and payload fields.
  • Header: If your library accepts the key and algorithm, as described in the previous step, and forces their use despite header options, there's no need for additional header checks. Otherwise, check the header fields according to the guidelines previously described. For more information, review the JSON Web Token best practices.
  • Payload:
    • Validate the o, m, and p fields against merchant-side data. If they don't match, the token must be rejected to prevent customers from copying and using tokens from other products or merchants.
    • Validate the exp field. Tokens are valid for 60 minutes. If a token is expired, it must be rejected to prevent customers from using expired tokens.
  1. Consume the price.

If all fields are valid and the token isn't expired, show the price provided in the p field. For EEA countries, you may also show the prior price provided in the pp field.

Requirements:Discounted prices must show in the following places.
  • On product landing pages for at least 30 minutes, even if customers revisit a product landing page and the JWT is no longer in the URL
  • In the cart and checkout process for at least 48 hours

Step 5b: Test discounted prices

  1. Test the functionality with a temporary key pair, which gives you full control over the tokens.
    Use the following command to generate a valid key pair:
    $ openssl ecparam -genkey -name prime256v1 -noout -out privkey.pem
    $ openssl ec -in privkey.pem -pubout -out pubkey.pem
    Generate tokens with JWT Debugger or a similar tool that uses the ES256 algorithm.
  1. Validate the production keys with the signed tokens that are available in Merchant Center. To do so, in your Merchant Center account, go to the Automated discounts tab in the Marketing section, and click the test links for sample products.

    If you need more test links, contact automated-discounts-support@google.com.

Step 5c: Request a review

Your setup will be reviewed within 2-3 business days to confirm whether discounted prices show as required in your online store.

  • In your Merchant Center account, go to the Automated discounts tab in the "Marketing" section and click Submit for review at the bottom of the screen.

You’ll be notified by email when automated discounts is activated or if there are issues you’ll need to fix.

Any issues will be shown on the Automated discounts screen. After you fix all issues, request another review. Allow up to 24 hours for any changes that you make to be reflected in Merchant Center.

What happens after automated discounts is activated

To ensure your setup works as expected, optimized prices will show in your Shopping ads on Google for only 10% of visitors for the first 3 days after automated discounts is activated. After 3 days, 90% of visitors on Google will see optimized prices in your Shopping ads.

Note: Sale price suggestions will no longer be available in Merchant Center Analytics because the suggested prices will be automatically applied to the products you’ve added to automated discounts. Learn more About pricing in Merchant Center Analytics.

To view your performance measurements, including incremental gross profit, revenue, and clicks, in your Merchant Center account, go to the Automated discounts tab in the Marketing section.

Depending on your product performance, it may take a few days or several weeks before measurements and reports of your performance begin to show in automated discounts.

  • To pause automated discounts at any time, in your Merchant Center account, go to the Automated discounts tab in the Marketing section, and click Pause discount automation in the Product inventory coverage report.

Related links

Was this helpful?

How can we improve it?