Product feeds for Meta, Google, Pinterest and TikTok

Put your store in Meta's catalogue for Facebook and Instagram ads, Google Merchant Center for Shopping ads, and Pinterest's and TikTok's catalogues with a product feed each, send Meta, Pinterest and TikTok the events that match their rows, and send Meta and Google your changes within minutes, so catalogue ads, retargeting and return on ad spend work.

Updated · 14 min read

Admin → Store → Feeds makes product feeds for Meta's catalogue, Google Merchant Center, Pinterest and TikTok: every product on sale, one row per size and colour, at a private address the platform fetches on a schedule. You paste the address in; there's nothing to connect and no keys to add. With a platform's keys on the server, the same page connects Meta's pixel and Conversions API, Pinterest's Conversions API and TikTok's Events API, which send what shoppers do with the same ids as the feed. That match is what lets each platform show the right product in an ad, retarget the people who looked at it and count the sales it brought. Meta's and Google's feeds can also send each change straight away instead of waiting for the next fetch.

Product feeds for Meta

Make a feed

Press New feed, pick where it goes (Meta, Google Merchant Center, Pinterest or TikTok), give it a name and press Make feed. It's built at once and opens on its own page, with:

  • Addresses: one for each file the platform reads (XML and CSV for Meta, XML and TSV for Google, CSV for Pinterest and TikTok), and that platform's steps for pasting it in. Anyone with the address can read the feed, so keep it private: only admins see it, and viewers see it masked. New address makes a new one and stops the old one at once; paste the new one into the platform, or its next fetch fails.
  • Preview: the first 25 rows exactly as the platform reads them, in its own column names.
  • Products: every product's place in the feed. In has its rows. Held back is a product the platform would refuse, with why. Left out is a draft, or a product a rule leaves out.
  • Fetches: each time something read the address, with the name it gave.

The feed builds again within a couple of minutes of any change to a product, a price, stock, a category or the feed itself, so it's always current when the platform fetches it. You can have up to 20 feeds, for one platform or several.

Paste it into the platform

Each feed's page shows these steps under its addresses.

Meta: in Commerce Manager, open your catalogue, then Data sources → Data feed → Scheduled feed. Paste the XML address (or the CSV) and choose hourly, so prices and stock stay fresh.

Google Merchant Center: open Settings → Data sources → Product sources, then Add product source → Add products from a file. Paste the XML address (or the TSV) as the file's link, choose a daily fetch under Edit schedule and leave the login empty. Set your shipping costs in Merchant Center's shipping settings: the feed doesn't carry them.

Pinterest: in Pinterest Business, open Manage business → Catalogs and product groups → Add data source → Provide URL link. Paste the CSV address as the Feed URL and choose CSV, your country or region, language and currency. Pinterest fetches it once every 24 hours, at the time you pick.

TikTok: in TikTok Ads Manager, open Assets → Catalog and your catalogue, then Manage → Products → Add Products → Data Feed Schedule. Paste the CSV address as the file URL, choose how often TikTok fetches it, then Import.

What goes in

Each variant is a row, and its id is its SKU, or its own id when it has none (TikTok calls it sku_id). Variants of a product share an item_group_id, so the platform shows them as one product with options. A row carries the title, description, price (and the sale price when the variant has a was-price), availability, condition, link, image, more images, brand, Google category, product type, colour, size, material and pattern, and the variant's GTIN and MPN when you've set them.

Rows the platform would refuse stay out of the feed until they're fixed, so one bad product never stops the rest. A product is held back when it has:

  • no image, or an image address that isn't a web address (only the address is checked, not the picture behind it: the platform's own check reports a picture it can't load);
  • no price, or a price of zero;
  • no description;
  • no brand (the site's name is used when the product has none; Pinterest takes a row without one);
  • a variant with the same SKU as another, which the platform would keep only one of.

A title longer than the platform takes (200 characters for Meta, 150 for Google, 500 for Pinterest) is cut and sent, with a note to shorten the template. Sold-out variants go in as out of stock, which the platforms stop advertising. Drafts never go in. An archived product, or a variant you've switched off, goes in as archived for Meta and discontinued for TikTok, and drops out of Google's and Pinterest's feeds; the product's place under Products names the variants left out.

Google is stricter. It also holds back a brand it refuses ("N/A", "Generic", "No brand" or "Does not exist", which includes your site's name when that's the brand filling in) and clothing without a gender, an age group and a colour (set gender and age group in Feed details, and colour as a Colour option), and warns about a barcode whose check digit is wrong. TikTok warns when a product's image isn't a JPG or PNG, which its help asks for.

Digital products stay out unless you opt each one in under Feed details and switch on Digital products in the feed's rules: catalogue ads are for things that ship, and may refuse them. They never go to Google, whose Shopping ads don't allow digital products; the switch is off on a Google feed. Pinterest and TikTok don't say whether their catalogues take them, so their feeds warn you to check the platform's diagnostics after the first fetch.

Rules, templates and labels

  • Rules choose what goes in: categories (a category takes the ones under it), tags, a lowest and highest price, and only what's in stock.
  • Title and Description templates write each row from placeholders: {product}, {colour}, {size}, {material}, {pattern}, {brand}, {category}, {description}, and any option's name, such as {fit}. A placeholder that's empty drops out with the comma or dash before it, so {product}, {colour}, {size} reads "Linen tee, Bone, M", or "Linen tee, M" for a product with no colours.
  • Custom labels fill the five custom label columns, which you can group products by in product sets, campaigns and reporting. Each can be the same text on every row, the product's top category, a tag by its prefix (season: turns season:summer into "summer"), a price band ("Under £20", "£20 to £50", "£50 and over") or "bestseller" on your top sellers by units in paid orders over the last 30 days (or the days you pick).

Save and build saves the feed and rebuilds it; the preview and the products list change at once.

Feed details

Feed details on a product (from the Products list) sets what the platforms ask for that the product page doesn't show: brand, condition, gender, age group, its Google product category, its own title and description templates, and each variant's barcode (GTIN, 8, 12, 13 or 14 digits) and part number (MPN). Every feed uses them. Google wants a GTIN wherever the product has one.

The Google categories card sets a Google product category on each category, by its number or name from Google's list. Products take their category's (or its parent's) unless they have their own.

Send changes to Meta

This is for Meta feeds (Google's is below; Pinterest and TikTok fetch the address on their schedule). A feed that sends changes keeps its platform until you switch sending off, since what it sent stays in Meta's catalogue. Meta fetches the address on its own schedule, at most hourly: set the scheduled feed to fetch hourly so price and stock changes reach it the same hour. Switch on Send changes to Meta and price and stock changes reach the catalogue within a few minutes as well, through Meta's batch API: only the rows that changed are sent, and rows that leave the feed are archived in the catalogue, not deleted, so they keep their history and come back as they were. One feed at a time sends changes, and a new feed never does until you switch it on.

The card shows how the last send went, once Meta has worked through it: how many changes it took, and any rows it refused, with its reason. Sending stops and waits for you when:

  • Meta refused the changes: the card shows what Meta said. Fix it and press Send again.
  • A send would archive a large part of the catalogue at once (more than a fifth of the rows Meta shows, and at least ten): the card says how many, in case a rule or a bulk change left out more than you meant. Fix the feed and it sends on its own, or, if it's right, press Archive and send.

When Meta is busy, the card says when it tries again. Meanwhile the address keeps working, so Meta's scheduled fetch still gets the current feed.

If you move Send changes to another feed, the first feed's products stay in the catalogue as they were last sent; remove them in Commerce Manager if the new feed doesn't include them.

Send changes to Google

Merchant Center fetches a Google feed's address once a day. With Google's Merchant API connected (see Connect the other platforms below), switch on Send changes to Google on the Google feed and each changed row reaches Merchant Center within minutes, through a product source of its own; rows that leave the feed are removed. A large catalogue goes over a few minutes, 300 rows at a time. Once it has sent, remove the product source that fetches the address in Merchant Center: products from both with the same id, feed label and language overwrite each other. One Google feed at a time sends changes.

The card shows how the last send went, with any rows Google refused and why; a refused row isn't sent again until it changes. Sending stops and waits for you when Google refuses the service account (the card shows what Google said: fix it and press Send again) or a send would remove more than a fifth of the rows Google has, and at least ten (fix the feed, or press Remove and send).

The pixel and the Conversions API

With Meta connected, the site sends four events, each from the browser's pixel and from the server with the same event id, so Meta counts the pair once:

EventWhen
ViewContentA product page opens (the variant in the address, when there is one)
AddToCartAn item goes into the cart
InitiateCheckoutCheckout opens
PurchaseStripe confirms the order is paid, once per order

Their product ids are the feed's ids, with the prices and quantities the server works out from its own records, never what the browser says. Purchase is sent only when Stripe confirms the payment, never from the browser alone; the thank-you page's pixel sends the server's event once the order is paid.

Meta needs a visitor's yes. Set the cookie banner to ask for consent (opt-in): nothing goes to Meta for a visitor until they say yes, no pixel loads and the server sends nothing, Purchase included. With the banner off, or only showing a notice, nobody has said yes, so Meta stays off for everyone; the Events page says so. With the banner asking only where the law expects it, visitors it doesn't ask count as a yes. The pixel runs on your site, the cart and checkout, never in the app or the admin, and never for your own staff, someone acting as another account or a preview link. If a visitor takes back their yes, the ad platforms' cookies are deleted and the page reloads without the pixel. Server events go even when an ad blocker stops the pixel, which is what the Conversions API is for.

Pinterest and TikTok get the same four events from the server, with the same ids and the same consent, once their keys are set. There's no Pinterest or TikTok tag in the browser: after a visitor's yes, the click id their ad adds to the address is kept in a cookie of your own and sent with the events, so the platform can tell which ad brought the visitor. Limited Data Use applies to them too. If one refuses its token, sending to it pauses with every event kept, and the others carry on.

The server sends what Meta uses to match a visitor to an account: a hashed visitor id, their IP address and browser, Meta's click id and cookie, and for Purchase the buyer's email, phone and country, hashed. They're deleted once the event is sent or given up on. Events Meta can't take right now are tried again over the next 8 hours or so; the Events page shows any that failed and why. If Meta refuses the access token (it expired, or lost a permission), sending pauses with every event kept: the Events page says what Meta said. A new token on the server sends straight away; after fixing the token's permissions in Meta, press Try again now.

If your site has its own Content Security Policy in Headers and files, allow connect.facebook.net and www.facebook.com for the pixel.

Events

Events (from the Feeds page) shows whether the pixel, the Conversions API and catalogue updates are on, and the server settings each still needs, and warns when the cookie banner doesn't ask for consent, with a link to its settings. Below that:

  • Test event code: paste the code from Events Manager → Test events, and new events show there as they arrive. They still count as real events, so take it off when you're done.
  • Limited Data Use: asks Meta to limit how it uses events, by the visitor's location, for US state privacy laws such as California's. It's on until you switch it off.
  • Pinterest and TikTok: whether each one's server events are on, with their counts, or the settings they still need. Pinterest's Test mode checks each event without recording it; TikTok's test event code comes from its Events Manager → your pixel → Test events. Take both off when you're done.
  • Recent events: the last 50 across the platforms, with where each went and what happened to it.

Connect Meta

Feeds work without connecting anything: paste the address into the platform. The pixel, the server's events and sending changes need three settings on the server (see Deploy to Railway):

SettingWhere it comes fromTurns on
META_DATASET_IDEvents Manager → your dataset (pixel) → its idThe pixel
META_CAPI_ACCESS_TOKENEvents Manager → your dataset → Settings → Conversions API → Generate access tokenServer events, and with the catalogue id, sending changes
META_CATALOG_IDCommerce Manager → your catalogue → SettingsSending changes to the catalogue

Then, in Meta:

  1. Create a dataset (pixel) in Events Manager, and generate its Conversions API token.
  2. Create a catalogue in Commerce Manager, add the feed's address as a scheduled data feed, and connect the catalogue to the dataset under Catalogue → Events.
  3. Verify your domain in Business settings → Brand safety → Domains.
  4. Put a test event code on the Events page, view a product and add it to the cart on your site, and check both events arrive in Test events, marked as deduplicated.

Until they're set, the pixel and server events stay off and nothing is sent; the Feeds page says what's missing. The token never reaches the browser or the admin.

META_GRAPH_VERSION is the version of Meta's Graph API the server calls for server events, catalogue updates and ad spend. It's v27.0 until you set it, and the Events page shows the one in use. Set it only to call a different version; it takes the same form, v and two numbers, and a value in any other form stops the server from starting.

Connect the other platforms

Each is optional and works on its own:

SettingWhere it comes fromTurns on
PINTEREST_AD_ACCOUNT_ID, PINTEREST_CONVERSIONS_TOKENPinterest Ads Manager: the ad account's id is in its address; Conversions → Conversions API makes the tokenPinterest's server events
TIKTOK_PIXEL_CODE, TIKTOK_EVENTS_ACCESS_TOKENTikTok Events Manager → your pixel → SettingsTikTok's server events
GOOGLE_MERCHANT_ACCOUNT_ID, GOOGLE_MERCHANT_DATA_SOURCE_ID, GOOGLE_MERCHANT_SERVICE_ACCOUNT, GOOGLE_MERCHANT_FEED_LABEL, GOOGLE_MERCHANT_LANGUAGEMerchant Center and a Google Cloud service accountSending changes to Google

Google takes a one-time setup: enable the Merchant API in a Google Cloud project, give a service account access to Merchant Center, register the project with your Merchant Center account, and add a product source Using API. Deploy to Railway walks through it.

Return on ad spend

Admin → Analytics → Ads puts what you spent on Meta ads beside what Stripe actually took from the people those ads sent, and divides one by the other: return on ad spend, in total, each day, and for each campaign and ad. Meta's own reported purchases are shown beside it for comparison. Meta counts sales it models but can't see, so its number usually reads higher.

  • Spend is read from Meta every day from 04:00 UTC, the last 28 days each time because Meta revises them. Import now reads it at once. It's converted to your store's currency at each day's European Central Bank rate, and the tile shows what Meta billed too.
  • Revenue is paid store orders and plan invoices, less refunds and lost chargebacks, from visitors who arrived from a Meta ad up to 7 days before paying (or, for an order, whose browser carried Meta's click cookie from that time).
  • Campaign and ad: paste the URL parameters the page shows into each ad's Tracking section in Ads Manager, so each sale names its campaign and ad. Sales without them show as not matched to a campaign.

It needs two settings on the server:

SettingWhere it comes from
META_AD_ACCOUNT_IDAds Manager → the account menu → the ad account's id (with or without act_)
META_ADS_ACCESS_TOKENBusiness settings → System users → Generate token, with ads_read and the ad account assigned. Leave it unset to use the Conversions API token, if that one has ads_read.

Visits from Meta are counted from the day this was added, only for visitors analytics counts (with the cookie banner's consent), so the first week fills in as people come.

Agents

Connected agents can read a feed's health with feed_health, whether events are flowing with events_status, and return on ad spend with ad_returns. feed_health also counts feeds, rows and held-back products for each platform. With the writing tools switched on in Admin → Agent tools, create_feed makes a feed for a platform and update_feed_rules changes its platform, rules, templates and labels; switching on Send changes, and sending again after it stopped, stays with an admin. See Agents and the API.

Every change to a feed, a product's or category's feed details and each platform's event settings, and each send again, is in the audit log.

Something unclear or missing? Ask us and we'll answer, then fix the page.

Was this page helpful?

Built with Overlays