Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Price History

Content Egg saves a product's price each time it changes. The Price History block turns those prices into a chart, a verdict on today's price, and the lowest and highest price. Price alerts use the same prices.

The Price History block on a comparison post

Turn On Price History

  1. Go to Content Egg > Settings > Price alerts.

  2. Set Price History to the number of days to keep. The default is 365, the most is 1875. 0 turns price history off.

Content Egg → Settings → Price alerts

A point is saved when a price changes. The chart appears once a product has a price saved on an earlier day. The verdict needs 30 days of history and more than one price. Content Egg > Price History appears in the menu while price history is on.

Add the Block to a Post

  • Block editor: add the Price History block (in the Content Egg group), or a CE Products block with the Price history template.

  • Shortcode:

The block shows every product of the post. Choose products with the block settings, or with products="id1,id2" in the shortcode.

These shortcode parameters change the block:

  • period opens a tab first: 30, 90, 180 or 365 days. The default is 180.

  • hide removes parts: verdict, stores (the shop lines), facts (the highest, lowest and current price) and best (the best price line). Example: hide=verdict,stores. With hide=best the chart starts on the shop lines. It has no effect when there is one offer, or when the shop lines are hidden, because the chart would be left without a line.

  • stores_limit sets how many shops are listed under the chart before "+N more". The default is 5.

On a module template, use [content-egg module=Awin template=price_tracker_alert]: it shows the product with the alert form and its price history.

What Visitors See

  • A verdict. "The price is low right now", "typical" or "high", with the percentage and a bar that marks today's price. The typical range is the middle half of the prices of the last 90 days, each price counted for the days it held. Days out of stock do not count.

  • Period tabs. 30 days, 90 days, 6 months and 1 year. Visitors switch without a page reload. A tab appears when there is history for it.

  • The best price over time. One line shows the lowest price among the shops on each day. Under the chart, a visitor can switch on a line for each shop, and switch the best price line off. The chart is never empty: switching off the last line brings the other kind back.

Shop lines, switched on under the chart
  • Out of stock. When a product was not available, the line stops and the period is shaded. The Current Price then says "Out of stock".

A product that is out of stock
  • Highest, lowest and current price for the period the visitor picked, with the shop and the date. The current price links to the shop.

The date format follows Settings > General in WordPress. To change a text or translate it, go to Content Egg > Frontend > Frontend Texts.

Use the Block in the Editor

The block has settings in the editor sidebar:

  • Variant: Compact shows only the verdict and the chart.

  • Opens on: the first period tab.

  • Parts: switch the verdict, the shop lines, the best price line and the highest, lowest and current price on or off.

  • Shops listed before "more": how many shops show under the chart.

  • Products: choose the products. With none chosen, the block shows every product of the post.

The Price History block in the block editor

The chart itself is drawn on the published page. The editor shows a placeholder.

Fix Wrong Prices

Shops and feeds sometimes return a wrong price for one update, for example $1 instead of $299. Content Egg hides such a point itself when the price jumps far and returns to the old level on the next update. The hidden point no longer shows on a chart, in the lowest price, or in price alerts.

To look at the points of a product, go to Content Egg > Price History, search for the product and open it. You can also click Price history under a product in Content Egg > All Products.

Content Egg → Price History

For each point you can:

  • Hide it. It is ignored until you restore it.

  • Restore a hidden point. Content Egg will not hide it again.

  • Delete it.

Clear history deletes all points of the product. Export CSV downloads them.

How Prices Are Saved

  • A point is saved when the price or the stock status changes. Several changes in one day are all kept; the chart uses the last one of the day.

  • Points older than the days you set are deleted once a day. The price in force when that period starts is kept, so a product that has not changed its price for a year still shows a line.

  • Cleanup runs in the background through WP-Cron. If DISABLE_WP_CRON is set in wp-config.php, make sure a server cron job calls wp-cron.php.

Amazon has its own rules about showing price history. Check the terms of your Amazon program before you show it for Amazon products.

Last updated