On this page
- Benefits
- How it works
- Eligibility and requirements
- Instructions
- Launch schedule
- Performance reporting
Benefits
- Effective pricing: Leverages advanced Google AI to continuously optimise and display the ideal sale prices for your products consistently across your Shopping ads and your online shop's product landing page.
- Increased performance: Unlock significant lift in (gross) profit, conversions, consumer clicks and increasing ROI on ad spend.
- Ease of use: Get optimised prices continuously, consistently and automatically and save time, effort and cost.
How it works
Automated discounts Open Beta is an AI-powered solution that helps to effectively maximise (gross) profit performance across your entire inventory.
Google uses AI algorithms to continuously optimise product sale prices based on market signals such as:
- Product demand
- Price elasticity
- Price competitiveness
- Seasonality trends
- Estimated delivery day
- Brand value
- Delivery cost
Adjusted sale prices will be shown in Shopping ads (channel-based discounting) and will be passed securely to display the same price on the product landing page in your online shop.
Eligibility and requirements
Before you decide to participate, check if this feature is a good fit for your business based on the following requirements:
- Conversion tracking with basket data. See more implementation details here.
- You need to provide the
[auto_pricing_min_price]
and[cost_of_goods_sold]
product data attributes for at least 20% of your total inventory impressions. To get you started, you can set:[auto_pricing_min_price]
attribute to <=95% of the price currently shown to consumers (current[price]
or[sale_price]
) and >=[cost_of_goods]
(details below).[cost_of_goods]
must be lower than[auto_pricing_min_price]
and between 5% and 95% of the price currently shown to consumers (current[price]
or[sale_price]
)
- Your website integration must be able to accept and honour Google-provided product prices from Google-generated JSON web tokens.
- Allow Google to show opted-in products to consumers with a performance-based ramp-up of 10% for the first three days and 90% after.
Instructions
Step 1 of 6: Select the programme and your preferred display currency
- Under 'Marketing', you'll find the 'Automated discounts' tab.
- Click Continue to select Automated discounts and your preferred display currency for performance reporting.
- If you're using a third-party platform, indicate the name of the platform or service. For third-party integrations, learn about how to set up automated discounts (for Shopify, WooCommerce and Magento 2 merchants).
- Upon submission, you can move on to set up conversion tracking and provide the required product data attributes.
Step 2 of 6: Set up conversions with basket data (CwBD)
- Product price: This value includes the discounted price before tax.
- Cost of goods sold: All products that might be included in the basket data need to be uploaded into your product data in Merchant Center including their cost of goods sold (COGS)
[cost_of_goods_sold]
value to ensure that all products in the basket can be taken into account for profit optimisation. - Discount: During the pilot, this field is used to collect all additional variable costs, like delivery and transaction costs that are not reflected at checkout.
After you've added basket data to your online shop's conversion tracking, verify that the conversion tag parameters have been implemented correctly by completing a test order and following the steps below:
- Open Chrome Developer Tools by clicking the Chrome menu in the top-right corner of your Google Chrome web browser, then selecting 'More tools' and clicking 'Developer tools'.
- In the 'Developer tools' panel, select 'Network'.
- Submit your test order in the Google Chrome web browser.
- Search for the request that contains your conversion (search for '/conversion'). The query string parameters should include the basket parameters, as shown in this 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)
Step 3 of 6: Submit product attributes to opt in products
[auto_pricing_min_pricing]
attribute for the countries of your preference. Performance reporting will show aggregated data across all participating markets; you're not able to filter by a specific country.How to opt in products
You can opt in products by providing valid auto pricing minimum price [auto_pricing_min_price]
and cost of goods sold (COGS) [cost_of_goods_sold]
attributes for each product to cover at least 20% of your total inventory impressions. You may provide these attributes via multiple data sources in your Merchant Center or through the API.
Bear in mind that the maximum price is the standard price provided in your product data and the minimum price is the value that you provided in the [auto_pricing_min_price]
attribute. Google will optimise the sale price between those two limits and change the price at a given time only for those products in your inventory that benefit the overall goal of maximising profit across your entire inventory; taking cross-selling and cannibalisation effects into account.
Required attributes | Value type | Description |
Minimum price [auto_pricing_min_price] |
String | This is the minimum price. Indicate the minimum below which you don't want the discount to be applied. Follow the same formatting rules as for the price [price] attribute. Note: This can generally equal the costs of goods sold (COGS) [cost_of_goods_sold] attribute unless there are special requirements (such as MAP restrictions). |
Cost of goods sold (COGS) [cost_of_goods_sold] |
String | This is the cost of goods sold (COGS). If accurate data is not readily available, start with your best estimate. |
Taxes
COGS doesn't include tax; however, tax must be included in the value for [auto_pricing_min_price]
.
Opt out products (optional)
If you want to opt out individual products from automated discounts, remove the auto pricing minimum price [auto_pricing_min_price]
attribute for each product or set the value equal to the price of your product.
[cost_of_goods_sold]
attribute for opted-out products. It's used to compute the total profit if those products appear in your basket.Step 4 of 6: Complete URL integration
Follow these instructions for implementing the price token.
Note:
- These instructions describe Google-generated JSON web tokens and the process of consuming the product price that they contain.
- This information is technical and is most useful to people who have a strong background in web development.
- The public encryption key is available below and applies to all automated discount integrations.
Token structure
JWT tokens contain two JSON objects: header and payload.
Header
{
"alg": "ES256",
"typ": "JWT"
}
Google-generated token headers have two fields:
- alg – used algorithm, value is always 'ES256'
- typ – media type, value is always 'JWT'
If the token header contains any other fields, or field values are different from described above, the token must be rejected.
Payload
{
"exp": 1571673600,
"o": "tddy123uk",
"m": "140301646",
"p": 21.99,
"c": "USD"
}
Payload has the following fields:
- exp – expiry time as Unix time. If the token has expired, it must be rejected.
- o – offer ID, which can be used to check that the landing page matches the product. If there's a mismatch, the token must be rejected.
- m – Merchant ID. If the Merchant ID doesn't match, the token must be rejected.
- p – discounted price
- c – currency, upper case
Consuming token
The exact details around consuming the token depend on the used library, but at a high level, there are three steps: decoding and signature validation, field validation and consuming price.
Decoding and signature validation The Base64URL-encoded token is passed in the pv2 URL request parameter:
http://my.site.com/blacktee?pv2=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJjIjoiVVNEIiwiZXhwIjoxNTcxNjczNjAwLCJtIjoiMTQwMzAxNjQ2IiwibyI6InRkZHkxMjN1ayIsInAiOjIxLjk5fQ.Qlyr1dQ0vLUJx-iQKwkYE2uLHfYCLVEVGZkAq4fwGTSpMDQCbtzDJr5uGHG8dNKaKV5OlYDxLpW40tQVVe2gkQ
Most of the 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)
Public key for validation:
The following key is meant to be used by all automated discount users without expiry.
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAERUlUpxshr67EO66ZTX0Fpog0LEHc nUnlSsIrOfroxTLu2XnigBK/lfYRxzQWq9K6nqsSjjYeea0T12r+y3nvqg==
-----END PUBLIC KEY-----
Field validation
In case the selected library accepts key and algorithm in the previous step and forces their use despite header options, there's no need for additional header checks. Otherwise, the header fields need to be checked according to the guidelines above. For more information, review the JSON web token best current practices.
No matter which library is used, the o, m and p fields must be validated against merchant-side data. If they don't match, then the token must be rejected so that customers can't copy tokens across products and/or merchants. The merchant may check the exp field and reject the token if it has expired, but this isn't mandatory.
Consuming price If all the fields are valid and the token isn't expired, the merchant must use the price provided in the p field.
You can use the existing coupon functionality to discount the price if it fulfils the requirements listed on this page. In particular, the price on the landing page must match the price in the token. Just adding the discount on the checkout page doesn't suffice.
Testing After the integration is completed, it will be tested in three steps:
- Functional testing (done by merchant)
- Key validation (done by merchant with Google-provided token)
- Full end-to-end test (done by Google)
Functional testing The easiest way to test during and after development is to generate a temporary key pair. This gives you full control over the tokens. A valid key pair can be generated with this command:
openssl ecparam -genkey -name prime256v1 -noout -out privkey.pem openssl ec -in privkey.pem -pubout -out pubkey.pem
Tokens can be generated with jwt.io or similar tools using ES256 as an algorithm.
Key validation In order to validate that production keys are correctly configured, signed tokens are available in Merchant Center during onboarding (sample URLs).
Step 5 of 6: Google review
Step 6 of 6: Set up completion and kickoff
Launch schedule
Ramp-up
After your review is complete, the ramp-up process starts according to the schedule below.
Ramp-up schedule:
- First stage: Optimised sale prices shown to 10% of customers.
- Second stage: Optimised sale prices shown to 90% of customers.
You can check your ramp-up percentage in Merchant Center at any time by navigating to the Automated discounts tab under 'Marketing'.
Performance reporting
You can check your performance at any time by navigating to the 'Automated discounts' tab under 'Marketing'. Your set of performance metrics, including incremental clicks, conversions and gross profit will appear on your scorecards for the selected time period. Metrics are updated daily. Learn more About automated discounts in Merchant Center.
Need help?
If you have a question that this page can't answer or you're uncertain about how to proceed, please contact us for support.