Data feeds: using your own feeds in experiments

Connect a JSON or Google Merchant feed your website already publishes, choose which item each visitor sees, and use its fields in any variant.

3 min read


A data feed lets a variant show values from a feed your website already publishes: a reviews summary, stock levels, delivery dates, campaign copy or a Google Merchant product feed. Once a feed is set up, its fields can be used in any experiment on the website, just like data from the page.

Setting up a feed

Go to Dashboard → Websites → Settings → Data feeds. A website can have up to 10 feeds.

  1. 1Give the feed a name and enter its URL, then press Test. Test shows how many items it found, their fields, and a first value.
  2. 2Pick a refresh period: 5 minutes, 15 minutes, 1 hour (the default), 6 hours, 1 day or 1 week.
  3. 3Choose which item a visitor sees, under Show.
  4. 4Tick which fields pages may show. Nothing else in the feed ever reaches a visitor.

Formats: JSON (a list of records, or an object wrapping one) and Google Merchant XML (RSS or Atom).

Choosing which item a visitor sees

  • The first item, on every page.
  • The item that matches the visitor. Compare a feed field with any page value: the address or part of it, a URL parameter or campaign, the language, new or returning, the product, or any other data path. The comparison can be is the same as, contains (the most specific match wins) or is the same address as.
  • The item running now, using start and end date fields. A missing date is open-ended, and a plain date covers the whole day. Use it for timed promotions.
  • A random item, kept the same for the whole visit.

Using a feed in a variant

  • Feed fields appear in the data picker under Feed: <name>, as tokens such as {{feed.reviews.average}}.
  • Feed tokens work everywhere other tokens do, including pertento.data() in variant JavaScript. See Dynamic content: showing page data in a variant.
  • Give feed tokens a fallback, and the editor will remind you. Without one, the component keeps its space, invisible, until the value arrives. With one, the fallback shows straight away.

How it works

  • Pertento's servers fetch the feed, not your visitors. The feed is fetched once per refresh period, however much traffic the site gets, so visitors never wait on your server.
  • A visitor's page asks Pertento for only the one matching item, and only the ticked fields. The feed's address and the rest of its content are never exposed.
  • Feed values are requested after the page has painted, so they do not delay it.
  • Feeds refresh on the schedule you pick, so a value can be up to one refresh period old. Pick a shorter period for data that changes often, such as stock.

Security

Feed URLs are fetched with protection against reaching internal networks, and only web ports are allowed. Test is rate limited and needs permission to manage the website.

Current limits

  • One item per feed is shown on a page. Repeating lists, such as a product grid built from a feed, are not available yet.