1. Include the Relevance Module in a project - BloomReach Experience - Open Source CMS

This article covers a Hippo CMS version 10. There's an updated version available that covers our most recent release.

14-11-2018

1. Include the Relevance Module in a project

This feature is only available in Hippo's Enterprise Edition.

Introduction

Start with a clean Hippo Enterprise project created from the Hippo archetype, as explained in Setting up a Hippo Enterprise project.

The following steps explain how to add the Relevance Module to this archetype project. After the steps explained below, the CMS should contain an additional perspective called the 'Audience perspective'.

1. Add Maven Dependencies

Add the following Maven dependencies:

cms/pom.xml:

<dependency>
  <groupId>com.onehippo.cms7</groupId>
  <artifactId>hippo-addon-targeting-dependencies-cms</artifactId>
  <type>pom</type>
</dependency>

site/pom.xml:

<dependency>
  <groupId>com.onehippo.cms7</groupId>
  <artifactId>hippo-addon-targeting-dependencies-site</artifactId>
  <type>pom</type>
</dependency>

2. Add Geo Location Database

The Relevance Module uses the geo location database of MaxMind to map IP addresses to cities and countries. This database comes in two flavors:

To use the free GeoLite City database for hippo targeting 2.26.01 or later, add the following dependency to your site's pom.xml:

site/pom.xml:

<dependency>
  <groupId>com.onehippo.cms7</groupId>
  <artifactId>hippo-maxmind-geolite2</artifactId>
  <version>20160405</version>
  <scope>runtime</scope>
</dependency>

3. Configure the Data Storage

If you are following this tutorial in a local development environment you can use the default data store configuration, which is the in-memory data store. Note that this is not a cluster-aware solution, so it is not possible to see all visitors to all site nodes. Another disadvantage is that when the session expires the visitor data are lost. Returning visitors cannot be identified nor their previously built-up data restored. 

Note that when using Experiments and/or Trends (not covered in this tutorial) the In-Memory stores cannot be used even in a local development environment. In this case you can use the Elasticsearch data store in local development.

If you are setting up a production environment you should not use the in-memory data store at all. You must configure the Couchbase data store for requests, visitors and statistics and the Elasticsearch data store for visits.

See Relevance Data Stores for more information.

4. Add New Loggers to log4j-dev.xml and log4j-prod.xml

By default all relevance logs are written to hippo-cms.log. However all relevance code except for the Visitor Analysis runs in the site webapp. Hence, make sure you add to conf/log4j-dev.xml and conf/log4j-prod.xml the following loggers:

<logger additivity="false" name="com.onehippo.cms7.targeting.frontend">
    <level value="warn"/>
    <appender-ref ref="cms"/>
    <appender-ref ref="console"/>
</logger>

<logger additivity="false" name="com.onehippo.cms7.targeting">
    <level value="warn"/>
    <appender-ref ref="site"/>
    <appender-ref ref="console"/>
</logger>

5. Rebuild and Restart

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

6. Add the News Feature

For the running example there should be at least one document type in the project.

Open the setup application:

http://localhost:8080/essentials/

and add the News feature from the library.

7. Rebuild and Restart

Stop the application, and rebuild and restart it once more.

Next

Add a Document Types Collector and Characteristic

 

This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com.
Did you find this page helpful?
How could this documentation serve you better?

See also...

On this page
    Did you find this page helpful?
    How could this documentation serve you better?