Configuration Page of Unomi
Segment Selection in a paragraph

Description

This module integrates your Drupal 8 website with Apache Unomi™: The Open Source Customer Data Platform

Apache Unomi™ (pronounced "You know me") is a Java Open Source customer data platform, a Java server designed to manage customers, leads and visitors data and help personalize customers experiences while also offering features to respect visitor privacy rules (such as GDPR)

This module connects your site to the API of Unomi. It allows a pluggable authentication strategy to support local Unomi's or hosted Unomi services like Dropsolid Platform.

Installation

* Install the Drupal 8 module via Composer:

composer require drupal/unomi

* Go to /admin/config/services/unomi and follow instructions to enter
your credentials
* Currently it supports paragraphs, custom blocks and even Layout Builder (with a core patch), if you have that installed it will show a dropdown of all your Unomi segments. Selecting one will listen for a specific variation and render the page with those paragraphs shown or not shown for the segment that was detected by Unomi.

Updating

Version 3.x (4.x for D10) includes a breaking change in the module and updating from 2 to 3 is currently not supported (or from 5 to 4). If you do want to do this, you will have to uninstall the unomi_segment_section field that the 2.x branch installed for content block types and migrate any data within that field to block visibility conditions (requires this patch: #2916876: Add visibility control conditions to blocks within Layout Builder)

If you are running any 2.x version, updating to the latest 5.x version will make your module Drupal 10 compatible.

If you are running a 3.x version, updating to "4.0.0-beta2" will make your module Drupal 10 compatible. We've removed the 3.x and 4.x branch from the "supported" list until this patch: #2916876: Add visibility control conditions to blocks within Layout Builder makes it in. Until then, keep using 2.x for Drupal 8/9 support and 5.x for Drupal 10 support if you're not already using these versions.

Common Requirements

Requirements are:

If you do not want to or cannot install your own Unomi server, there are a number of web Unomi hosts which are compatible with the Unomi module.

Quickstart with Dropsolid?

  • Set up an account with Dropsolid Platform and request a hosted Unomi
  • Install the Dropsolid Personalisation module
  • Create your segments in the Dropsolid Platform interface
  • Become super efficient by letting the AI detect patterns in your traffic to segment with.

Usage

To interact with the Unomi API in your custom module, use the
unomi_api service, and call the `getClient()` method on it:

/** @var \Drupal\unomi\UnomiApiInterface $unomi_service */
$unomiService = \Drupal::service('unomi_api');
/** @var \Dropsolid\UnomiSdkPhp\Unomi $unomiClient */
$unomiClient = $unomi_service->getClient();

Please note that you should preferably use dependency injection to load the
service, instead of `\Drupal::service()`.

Now that you have access to the unomi client, you can interact with the
Unomi data objects, e.g. get a list of segments:

/** @var \Dropsolid\UnomiSdkPhp\Repository\SegmentRepository $segmentRepository */
$segments_repository = $unomi_client->segments();
$segments = $segments_repository->listContacts();
Supporting organizations: 
Funded the architecture and main creation of the module and ecosystem

Project information

Releases