Recommend from category

🚧

Categorizing items

We don't recommend creating too many channel/category for your inventory. For instance, if you have 10000 items and have 5000 categories with at least 1 item on each category, then asking for a recommendation only for a specific category may not return any results if the specific category has no user activity.

Sometimes you may want to restrict recommendation to a specific category that you've defined. For example, you might want to recommend news article for specific section and videos on some other pages. You can define a field called channel to specify the broad category of the item.

Elaborating from the mentioned example, sample query below will return items that are marked with specified channel value:

$p('register', {
	max: 50,  // Large number requested so you can see our full range of items
	widget: 'default-widget', // name of widget
	opts: {channel: "videos"}, // Return items that have value "videos" on channel.
	callback: function (resp) {
		console.log(JSON.stringify(resp, null, 2));
	}
});

$p('fetch’);

To setup the channel scraping for each web page, please refer to Inventory section of documentation.

🚧

Category recommendations require activation by LiftIgniter

In order to make sure that the rules are working as intended, the LiftIgniter team requires you to contact us at [email protected] to activate channel-based filters. We will activate the rule and run quality checks, and may have other suggestions on how to achieve your goals.