horizon_interest

Description

Returns the user’s interest level in a particular tag according to Personalization Engine.
 float horizon_interest( string tag )
Returns a floating-point number representing the level of interest that the current user has in the tag, where 1is the same level of interest as the average user on your site,2is twice as interested as the average user, and so on. If you pass multiple tags separated by commas, the function will return the highest interest of any of the tags passed.

Example

{if horizon_interest('olympics,swimming') >= 2} 
<p>You might be interested in our coverage of the Olympics swimming team.</p> 
{/if}

Use Interest Data to Choose a Hero Image

Use Case: You have content for both men and women, but you don’t collect this user variable. Thankfully, you tag your content with “men” and “women.” Based on users’ interest level, this will decide which hero banner should get shown.

Zephyr:

{if horizon_interest('women') > 5}
  <img src="women">
{else if horizon_interest('men') > 5}
<img src="men">
{else}
<img src="puppies">
{/if}

Explanation: This script uses the horizon_interest() function to see if a user is interested in women’s products based on a “women” interest tag. If so, a hero image showcasing women’s products is display. If they aren’t interested in women’s products, the script then checks to see if the user is interested in men’s content, using the “men” interest tag. Similarly, if the user is, a men’s hero image is displayed. If they’re interested in neither, a default image is shown. This is especially useful if you tag your content with gender tags and are not collecting gender as custom field.

Contact us

Top