Configuring Unomi features
This chapter covers the configuration of main features of Apache Unomi.
4.1 Changing the default configuration
Before doing other modifications, please ensure that you set your own cluster name (section 3.2).
If you want to change the default configuration, you can perform any modification you want in the <cxs-install-dir>/etc directory.
Apache Unomi configuration is kept in the <cxs-install-dir>/etc/org.apache.unomi.cluster.cfg file. It defines the addresses and ports where it can be found:
group=default contextserver.publicAddress=https://localhost:9443 contextserver.internalAddress=http://127.0.0.1:8181
4.2 Installing the MaxMind GeoIPLite2 IP lookup database
Apache Unomi requires an IP database to resolve IP addresses to user location. The GeoLite2 database can be downloaded at MaxMind from the following location:
Simply download the GeoLite2-City.mmdb file and copy it into the <cxs-install-dir>/etc directory.
4.3 Installing Geonames database
Apache Unomi includes a geocoding service based on the geonames database (http://www.geonames.org/). It can be used to create conditions based on countries or cities. In order to use it, you need to install the Geonames database. Get the "allCountries.zip" database from here:
Download it and put it in the
<cxs-install-dir>/etc directory, without unzipping it.
<cxs-install-dir>/etc/org.apache.unomi.geonames.cfg file (this file will be created after the first start of Apache Unomi) and set request.geonamesDatabase.forceImport to true. The data import should start right away. Otherwise, import should start at the next startup. Import runs in background, but can take about 15 minutes.
At the end, you should have about 4 million entries in the "geonames" ElasticSearch index.
4.4 Marketing Factory & Remote Publication
Jahia Marketing Factory is fully compatible with a remote publishing architecture. Though a precise method must be applied. Here are the steps: - Start ElasticSearch - Start Apache Unomi - Start DX: both contribution / remote server in "development mode" (jahia.properties) On the contribution server:
- Create the desired site (eg. ACME SPORT)
- Install and enable the MF-modules
- Configure MF in site settings On the remote server:
- Create a new site with the same template set
- Install MF-modules
ATTENTION: do NOT activate MF-modules for this site
- Then set up the remote publication on the contribution node and execute (check logs / should be good) - Stop both DX-server - Set contribution node to "operationMode=production" (jahia.properties) - Set remote server has to be set to "operatingMode=distantPublicationServer" (jahia.properties) - Restart - Open remote site in a new private window and browse the page - Back in site settings / MF (contribution node) check that the profile was created - OK.
4.5 Email action configuration
In Marketing Factory Rules, an action is available to send email. The emails will be sent using an SMTP server that needs to be configured in the following Apache Unomi file :
mail.server.hostname=<smtp server host name> mail.server.port=<smtp server port> mail.server.username=<smtp server username> mail.server.password=<smtp server password> mail.server.sslOnConnect=<use ssl>
In the email template, you can use the following pattern to display any profile property value in the email that will be sent: $profile.properties.("propertyId")$