Page tree
Skip to end of metadata
Go to start of metadata

Scoring helps to identify interest in certain products, product groups, services, or topics. The identified interest scores help you to display personalised experiences.



Scores models

  • Identify a customer's interest when they browse your site
  • Interest is captured in the form of interest points
  • Points are assigned to events:
    • Clicking links
    • Watching a video 
    • Page visits
  • Number of value points per events → amount of interest
  • Fine tuned by:
    • event
    • frequency
    • recency
  • Granular intent scoring based on user interactions

Use case: Contacts page interest

Lets learn the features of the module with an use case: trying to capture the interest of users in contacting the travel company

Defining a score model

Create a score model for company contact:

Assign 5 points each time contacts page is visited

Finally, save the score

Integrate score models into template dialog

Decorate page template dialog:

    - !include:/magnolia-recommender/dialogs/scoreModel.yaml

Assign a score model to contact page

Save page dialog.

Integrate score models into template script

Decorate prototype's header area to use a custom script

    templateScript: /scoring-demo/templates/pages/areas/htmlHeader.ftl

Create new htmlHeader script with score model templating function

[#-------------- ASSIGNMENTS --------------]
[#-- Page's model & definition, based on the rendering hierarchy and not the node hierarchy --]
[#assign site =!]
[#assign theme = sitefn.theme(site)!]
[#assign pageDef = ctx.pageDef!]

[#-- Cookie Consent --]
[#assign root = cmsfn.siteRoot(content)]
[#assign cookieConsentName = "cookieconsent_status"]
[#assign cookieNode = cmsfn.contentById("/modules/cookie-manager/config/cookies/cookieConsentDenied", "config")!]
[#if cookieNode?has_content]
    [#assign cookieConsentName =!"cookieconsent_status"]
[#assign complianceType = root.complianceType!]
[#assign showLink = root.readMoreLink! != 'none']
[#if showLink]
    [#assign linkType = root.readMoreLink!]
    [#if linkType == 'external']
        [#assign href = root.readMoreLinkexternal]
        [#assign href =]

[#-------------- RENDERING --------------]
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="description" content="${content.description!""}"/>
<meta name="keywords" content="${content.keywords!""}"/>
<meta name="author" content="Magnolia International Ltd."/>
<meta name="generator" content="Powered by Magnolia - Intuitive Opensource CMS"/>


<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

<link rel="icon" href="${ctx.contextPath}/.resources/${}/favicon.ico"/>

[#list theme.cssFiles as cssFile]
    [#if cssFile.conditionalComment?has_content]<!--[if ${cssFile.conditionalComment}]>[/#if]
<link rel="stylesheet" type="text/css" href="${}" media="${}"/>
    [#if cssFile.conditionalComment?has_content]<![endif]-->[/#if]

[#if pageDef.cssFiles??]
    [#list pageDef.cssFiles as cssFile]
<link rel="stylesheet" type="text/css" href="${}" media="${}"/>

[#if cmsfn.editMode]
<link rel="stylesheet" type="text/css"
      href="${ctx.contextPath}/.resources/travel-demo-theme/css/travels-magnolia-author.css" media="all"/>

[#-- jsFiles from the theme are here --]
[#list theme.jsFiles as jsFile]
<script src="${}"></script>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="//"></script>
<script>window.html5 || document.write('<script src="${ctx.contextPath}/.resources/travel-demo-theme/js/html5shiv.js"><\/script>')</script>
<script src=""></script>

[#-- Cookie Consent script --]
  window.addEventListener("load", function () {
      "palette": {
        "popup": {
          "background": "${root.bannerbackground!}",
          "text": "${root.bannertext!}",
          "link": "${root.bannerlink!}"
        "button": {
          "background": "${root.buttonbackground!}",
          "border": "${root.buttonborder!}",
          "text": "${root.buttontext!}"
        "highlight": {
          "background": "${root.highlightbackground!}",
          "border": "${root.highlightborder!}",
          "text": "${root.highlighttext!}"
      "content": {
        "header": "${root.header!}",
        "message": "${root.message!}",
        "dismiss": "${root.dismiss!}",
        "link": "${!}",
        "allow": "${root.allow!}",
        "deny": "${root.deny!}",
        [#if showLink]"href": "${href!}"[/#if]
      "cookie": {
        "name": "${cookieConsentName}"
      "type": "${root.complianceType!}",
      "theme": "${root.layout!}",
      "position": "${root.position!}",
      "showLink": ${showLink?c!false}

Include recommeder.js in travel's theme

    addFingerPrint: true
    link: /.resources/magnolia-recommender/webresources/js/recommender.js

Check the html code of contact page

Personalising any component based on scoring

Create a personalised component that will be rendered only if the user has enough scoring. Lets add a teaser component as the first of travel's home page. The teaser will target the contact page:

Create a variant of the component and choose the following audience: (Magnolia user journey scoring / Company-contact / 30)

Hide the original component

Publish the travel home page and you will see the new personalised component only when the contact page has been visited at least 3 times (smile)

  • Why 3 times?
  • What happens with score model base value, 5 points?

  • No labels