Suppose I have a SmartTarget promotion which selects max 3 pieces of content based on a particular keyword (which is linked to more than 3 content items). Is it possible to randomize the results so that the promotion doesnt pick the same 3 items each time? Reading through the SmartTarget docs, the only "out of the box" implementation of randomness in SmartTarget seems to be via Experiments.

Related to this, is there a good way to implement weighting on promotions, to ensure that some content is shown very often, and some less?

Note my implementation of SmartTarget is non-standard in the sense that we accessing the API directly, rather than using taglib (we are building a REST service for promotional content), so post processing results could be an option to explore.

1 Answer 1


There is indeed no built-in randomness option, so you will need to do some post-processing. But seeing as you are already using the API, that should not be hard to do.

You could have the weight as a metadata field in the Components, which you then make sure that Fredhopper returns. If you configure the attribute to be returned for "Campaign items" and "Lister pages", within the System -> Navigation section of the Business Manager, you can then access it using the getAttribute() method in the SmartTarget API.

Then "all" you have to do is work out which weighted random algorithm you want to use and rendering the correct Component Presentation(s).

  • 1
    Good tip about configuring attributes - this was the missing piece of the puzzle
    – Will Price
    Jun 22, 2015 at 10:28
  • Timely question and answer, +1 to both. My SmartTarget dev (well, not Peter) was explaining how to avoid duplicate promotions that would show up in the same regions by using the API. Jun 22, 2015 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.