Returns the total number of times the user has visited a page with that tag or tags.


Determine Content to Show Based on Page Count

Use Case: You want to display top content from a merged feed, and you want user browsing activity to dictate which feed the top item should come from, where the “blog” site (Media feed) or the “storefront” site (Ecomm feed). As all Media pages are tagged with site-blog and Ecomm articles with “site-store”, the horizon_count() function can see which pages a user has visited more. If the user has a higher interest in blog content, lead with that. Otherwise, show store content.

Zephyr: In the Setup:

{mediaContent = personalize({
   "algorithm" : "interest",
   "size": 3,
   "content" : media.content

{ecommContent = personalize({
   "algorithm" : "interest",
   "size": 3,
   "content" : ecomm.content

In the Code:

{if horizon_count("site-blog") > horizon_count("site-store")}

Contact us