Explaining Scores

Segment scores can change at runtime based on the current normalization settings. You can log the actual scores used in each request for analysis and debugging.

Enable Segment Score Explanation Logging

To log segment score explanations, set the explanation logger to INFO level. Update your log4j2.xml file as shown below:

<Logger name="com.onehippo.cms7.targeting.explanation.Explanation" level="info" additivity="false"> <AppenderRef ref="site"/> </Logger>

By default, these log entries are written to the CMS log file. To direct the output to a different log file, adjust the appender-ref value as needed.

Logged Data per Request

For each site request, the log will include all global segments and component-specific configurations used in the current channel. The log provides the following information for each variant:

  • Normalized score (used to select the best matching configuration per component)
  • Raw score (the score calculated by the engine before normalization)
  • Whether the variant is used in any component configuration on the current page or channel
  • Whether the variant is a global segment or a component-specific configuration

Example Log Output

+ http://localhost:8080/site/news + Prospective reseller | - normalized score: 0.0 | - raw score: 0.0 | - on current page: true | - on current channel: true | - is global persona: true + Returning visitor ( normalization : 0.49900049999999996 ) | - normalized score: 2.004006008010012 | - raw score: 1.0 | - on current page: false | - on current channel: true | - is global persona: false + Monday - normalized score: 0.0 - raw score: 0.0 - on current page: false - on current channel: true - is global persona: false

This output lists each segment or configuration, along with its normalized and raw scores, usage on the current page and channel, and whether it is a global persona. Use this information to verify scoring behavior and troubleshoot targeting configuration.

Share Feedback
Page: /build/enterprise-plugins/targeting-relevance/explaining-scores
Section: Build
Category *