This article covers a Bloomreach Experience Manager version 13. There's an updated version available that covers our most recent release.

Add the Relevance Module to a Project

This Bloomreach Experience Manager feature requires a standard or premium license. Please contact Bloomreach for more information.



Add the Relevance Module to a Bloomreach Experience Manager implementation project.


The Relevance Module is an optional Bloomreach Experience Manager module. This page explains how to add the Relevance Module to a project and configure its data stores in a local Cargo-based development environment. After the steps explained below, the CMS application will contain an additional perspective called Audiences.

Installation through Essentials

The installation of the Relevance Module is supported through Essentials. If you start developing a new project, ensure that you check Make use of Enterprise features, navigate to the Library tab in Essentials, locate the Relevance feature and click Install feature. Essentials then applies most of the steps documented for manual installation below to your project.


Rebuild and restart your project.

Finally, configure the Google API key in order to get a working visitor location map in the Relevance module's Audiences tab.

The Essentials Relevance feature includes bootstrap data to add the relevance system user to the webmaster group. However, due to the way configuration management works, this only works when bootstrapping a new repository and is ignored for existing repositories. Therefore, use one of the following two workarounds:

  • For new projects generated using the archetype only, delete the local storage folder before restarting your project after adding the Relevance feature.
  • In all other cases, including each redeployment in an existing environment after adding the Relevance feature, perform the manual step Add Relevance System User to Webmaster Group.

Manual Installation Instructions

Start with a Bloomreach Experience Manager project created from the Maven archetype, as explained in Set up a Bloomreach Experience Manager Project. Make sure the top-level pom.xml has the hippo-cms7-enterprise-release as parent.

Add Dependency to Top-level POM

To the top-level pom.xml, add 


Note the above dependency must not be inside <dependencyManagement>.

To the profile, add hippo-addon-targeting-shared-api as shared lib:

              <!-- snip --/>
                <!-- snip --/>

Add the Elasticsearch Maven Plugin to the Cargo Run Profile

In your local Cargo-based development environment, use the Elasticsearch Maven Plugin to add an Elasticsearch instance to store visits data.

In your project's top-level pom.xml, locate the profile. Make the following changes the the profile:

Add the following properties to the profile's <properties> element:


Directly after the profile's <plugins> opening element, add the following plugin configuration:


This will start up a local Elasticsearch instance when running mvn -P The visits data store is configured to use this local Elasticsearch instance by default.

Add Dependency to CMS Webapp POM



Add Dependency to Site Webapp POM



Configure an H2 Database JNDI Data Source

In your local Cargo-based development environment, configure a JNDI data source to store requests, visitors and statistics data in the embedded H2 SQL Database.

Add the following JNDI data source configuration to conf/context.xml:

<Resource name="jdbc/targetingDS" auth="Container" type="javax.sql.DataSource"
          maxTotal="100" maxIdle="10" initialSize="10" maxWaitMillis="10000"
          testWhileIdle="true" testOnBorrow="false" validationQuery="SELECT 1"
          timeBetweenEvictionRunsMillis="10000" minEvictableIdleTimeMillis="60000"
          username="sa" password=""

The requests, visitors and statistics data stores are configured to use the jdbc/targetingDS data source by default.

Configure a JNDI Environment Variable for Elasticsearch Properties

In your local Cargo-based development environment, add a JNDI environment variable that contains configuration properties for connecting to Elasticsearch. Add the following JNDI environment variable to conf/context.xml:

<Environment name="elasticsearch/targetingDS" type="java.lang.String"
             value="{'indexName':'visits', 'locations':['http://localhost:9200/']}" />

The visits data store will use these properties to instantiate a client for connecting to the Elasticsearch webapp that you added previously.

Add Logger to log4j2-dev.xml and log4j2-dist.xml

Add the following logger to conf/log4j2-dev.xml and conf/log4j2-dist.xml:

    <Logger name="com.onehippo.cms7.targeting" level="warn"/>

Include the Targeting API in Shared Lib for Distribution

to myproject/src/main/assembly/shared-lib-component.xml, add:


Rebuild and Restart

Stop the application (if it was running), and rebuild and (re)start it as explained in the Getting Started Trail.

Verify that the Elasticsearch webapp is running correctly by browsing to the following URL:


You should see something like this:

health status index          pri rep docs.count docs.deleted store.size 
green  open   visits           1   0          0            0       159b           159b

Add Relevance System User to Webmasters Group

Using the Console, browse to the node /hippo:configuration/hippo:groups/webmaster.

Add the value hippo-relevance to the multi-valued String property hipposys:members. For example:

  hipposys:members: [hippo-relevance, editor]
For existing projects already deployed in one or more environments prior to adding the Relevance Module, this step must be repeated in each environment when redeploying after adding the Relevance Module.

Configure Google API Key

To enable the map widget in the on the Realtime tab of the Audiences perspective, configure your Google API key.

Using the Console, browse to the node /hippo:configuration/hippo:frontend/cms/hippo-targeting/experience-optimizer-perspective.

Add a String property google.api.key and set its value to your Google API key:

  google.api.key = YOUR_API_KEY

Optional: Add the Collectors Bundle

The Relevance Module contains several collectors that are not bootstrapped by default. To make it easier to add these collectors to a project a Collectors Bundle has been created. The bundle is available as a jar file and contains commonly used collectors, characteristics, and UI plugins. See Add the Collectors Bundle to a Project for more information and instructions.


This product includes GeoLite2 data created by MaxMind, available from
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?