Content Ranking
Rank your content items based on visitor intent. Intenxio returns scores only — you control rendering.
Basic Ranking
const ranked = await Intenxio.rank({
items: [
{ id: '1', category: 'technology', tags: ['phones'] },
{ id: '2', category: 'technology', tags: ['tv-displays'] },
{ id: '3', category: 'travel', tags: ['luxury'] }
]
});
// [
// { id: '1', score: 95 },
// { id: '3', score: 80 },
// { id: '2', score: 70 }
// ]
Rendering
ranked.forEach(item => {
const el = document.getElementById('item-' + item.id);
el.style.order = -item.score; // CSS flexbox ordering
});