1. Knowledge base
  2. Setup and integrations (OLD)

ProfitMetrics Product Feed

How to Create and Debug a Product Feed in Google Sheets


Section 1: Product Feed Specification

Section 2: Troubleshooting

Section 3: Making a Feed in Google Sheets


Section 1: Product Feed Specification

The ProfitMetrics product feed is based on RSS and is largely compatible with the Google Shopping XML feed, with some additional elements. Key specifications include:

  • Encoding: The product feed should be encoded as UTF-8.
  • Item Elements: The item elements should include specific information such as
    • link
    • title
    • g:id (unique product ID)
    • g:image_link (link to product image)
    • g:price (retail price), and more.
  • Currency Format: Various currency-related elements can be included, such as pm:price_currency and pm:price_buy_currency.

Things to Note:

  • Even though some fields are optional, it is strongly recommended to include as much information as possible for enhanced functionality.
  • Each product variant should have its own item, and each item is considered a real sellable product with a unique ID.
  • Products must only appear once in the feed; duplicates (field g:id) will result in importing failures.
  • Extra fields are ignored, maintaining backward compatibility with Google Shopping feeds.

Example Product Feed

<!-- Example Product Feed -->
<rss pm-type="gs-1.0" xmlns:g="http://base.google.com/ns/1.0" xmlns:pm="https://my.profitmetrics.io/ns/1.0">
  <channel>
    <item>
      <!-- Product Details -->
    </item>
    <!-- Additional Items -->
  </channel>
</rss>

Section 2: Troubleshooting

To ensure a successful product feed, please consider the following troubleshooting tips:

  • Check that the overall group is called <channel>.
  • Ensure products are labelled <item> and not <products> or <items>.
  • Match the ID in the feed with the ID received with orders (usually the internal product variant ID from the e-commerce platform).
  • Use pm:price_buy and pm:price_buy_currency for cost prices.
  • Required Fields:
    1. Create "id" and fill it with product IDs.
    2. Create "title" and fill it with product titles.
    3. Create "price" and fill it with product prices incl. VAT/Tax.
  • Recommended Fields:
    1. Create "pm:price_buy" and fill it with product costs (costs of goods sold) ex. VAT/Tax.
      1. Alternatively, this field can be named several other things:

        pm:price_buy
        g:cost_of_goods_sold
        pm:price_buy
        g:cost_of_goods_sold
        price_buy
        g:price_buy
        cost_of_goods_sold
        pm:cost_of_goods_sold
        cost_price 

    2. Create "pm:price_buy_currency

Confirm that the feed does not contain illegal characters (such as &, <, >).

Full Specs:

Element Description Required 
link Should to biggest extent possible match realworld links, to be able to match up pageviews in for example google analytics with products. Optional
title Product name Required
g:id Unique Product id. This should match what is transmitted to profitmetrics in orderspecs Required
g:image_link Link to product image. Should preferrably not be too high resolution. Bounds of about 500x500px is good. But there is no hard restrictions here. Optional

g:price

Retail price, including VAT  Required
g:google_product_category Google category from google product category taxonomy Optional
g:brand Brand of product Optional
pm:price_currency Currency of the Retail price, 3 letter ISO 4217 format Optional
pm:price_buy Cost price of product EX Vat. 
This can also be any one of the names listed above
Optional
pm:price_buy_currency Currency for cost price of product (3 letter ISO 4217 format) Optional
pm:num_stock Number of items in stock Optional
pm:category A category the product is part of. This element can be placed multiple times. Place the most important category first. Optional
pm:sku product SKU (different to ID) Optional

Section 3: Making a Feed in Google Sheets

Part 1: Create a Sheets Document

  1. Go to Google Sheets.
  2. Create a new sheet and label columns for item, id, title, price, pm:price_buy, pm:price_buy_currency.
  3. Fill in the product details.

Part 2: Export an XML File

  1. In Google Sheets, go to Extensions > Add-ons > Get Add-ons.
  2. Search for "Export sheet data" and install "Export Sheet Data" by Chris Ingerson.
  3. Export the sheet data as XML with specified settings.

Part 3: Make the XML-File Shareable

  1. Go to Google Drive and locate the XML file.
  2. Share the file with anyone with the link.
  3. Copy the link and use it in ProfitMetrics for feed configuration:
    1. Go to [Google Drive](https://drive.google.com) and find the XML file.
    2. Click the three dots to the right of the file and select "Share."
    3. Under General Access, select "Anyone with the link."
    4. Copy the link and click "Done."
    5. Paste the link into a text document and extract the file ID (e.g., 1Zqk45htWSg4CBueyLhYQvlGKy0qvSS1G).
    6. Copy the ID and paste it into the template URL below.
    7. Copy the URL and paste it into ProfitMetrics > Products > Product Feed.
    8. Click "Save Feed Configuration" and "Import Feed Now."

    URL Template:

https://drive.google.com/uc?export=download&id=INSERT_ID_HERE&confirm=t