Documentation
Feedback
Guides
Storefront Development

Storefront Development
Storefront development

Configuring product price meta tag formatting on PDP

FastStore lets you control how the product:price:amount meta tag is formatted on Product Detail Pages (PDPs). Use the minPriceAmountFractionDigits setting in discovery.config.js to define the minimum number of decimal places displayed in this meta tag. This is useful to ensure consistency between:
  • The Open Graph meta tag (product:price:amount).
  • The structured data included in the PDP HTML (ProductJsonLd schema).
  • External integrations such as Google Merchant Center.

Step 1: Review recommendations

Before applying this setting, make sure you actually need to enforce a fixed number of decimal places in your SEO metadata. This configuration directly affects how the product:price:amount meta tag is rendered, and its value must be consistent with the product price used in the schema on the PDP (<script type="application/ld+json">). If the number of decimal places differs between the meta tag and the structured data, platforms such as Google Merchant Center may flag a price mismatch issue. To avoid this, choose a value that aligns with your store's currency format and pricing strategy.
For example:
  • ✅ Schema price: 3.20 → Meta tag: 3.20
  • ❌ Schema price: 3.20 → Meta tag: 3.2

Step 2: Update discovery.config.js

  1. Open your FastStore project and locate the discovery.config.js file.
  2. In the seo section, add minPriceAmountFractionDigits with the number of decimal places you want to enforce.

    _10
    seo: {
    _10
    // ...
    _10
    pdp: {
    _10
    titleTemplate: '%s | FastStore PDP',
    _10
    descriptionTemplate: '%s products on FastStore Product Detail Page',
    _10
    minPriceAmountFractionDigits: 2,
    _10
    },
    _10
    },

  3. Deploy the change above.

Step 3: Validate the result

  1. Open a PDP in your store.
  2. Open your browser's DevTools (or use View Page Source).
  3. Confirm that the <meta property="product:price:amount"> value uses the configured number of decimal places. For example:

    _10
    <meta property="product:price:amount" content="3.20" />

  4. On the same page, search for application/ld+json and check the product offers.price value in the PDP schema.
  5. Confirm that product:price:amount and schema offers.price use the same formatting and precision (for example, 3.20, not 3.2).
Validate more than one PDP after deployment to confirm consistent formatting between the meta tag and schema values.
Contributors
2
Photo of the contributor
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
2
Photo of the contributor
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page