personalisation with recombee part 2 … · personalisation with recombee part 2 murray woodman,...

27
PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht

Upload: others

Post on 24-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

PERSONALISATION WITH RECOMBEE

PART 2Murray Woodman, Morpht

Page 2: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

CONTENT MANAGEMENT

IS A SOLVED PROBLEM

Page 3: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Drupal’s strengths

● Content modelling

● Content editing

● PHP templating

● JSON API

● Integrations

Page 4: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

BUT HOW DO WE PERSONALISE?

Page 5: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Drupal’s strengths

● Content modelling

● Content editing

● PHP templating

● JSON API

● Integrations

and weaknesses

● Personalisation for anon

● Scalability for anon

● Client side templating

Page 6: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Challenges

● Scalable recommendation engine: Recombee

● Editor friendly: Recombee module (blocks)

● Integration: Search API Recombee module

● Client side template: JSON Template module

Page 7: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

RECOMBEE

Page 8: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

● User based behaviour● Track users - client ID

Collaborative filtering

Page 9: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

● Property based similarity● Push content metadata

to Recombee index

Content based

Page 10: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Using Recombee client side

Track a user interaction:

var client = new recombee.ApiClient('name-of-your-db', 'db-public-token');

client.send(new recombee.AddDetailView('user-9318', 'item-108'));

Page 11: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Using Recombee client side

Get some recommendations:

var callback = function (err, res) {

if (err) {

console.log(err);

// use fallback ...

return;

}

console.log(res.recomms);

}

// Get 5 recommendations for user-13434

client.send(new recombee.RecommendItemsToUser('user-13434', 5), callback);

Page 12: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

{ "recommId": "e8bdec4c-6357-47bf-be4f-8bed5f739db2", "recomms": [ { "id": "beta-node-371", "values": { "url": "https://beta.site-showcase.com/article/wordpress-hosts-australia", "site": "beta", "image": null, "authors": [], "summary": "WordPress hosts in Australia.", "products": ["product:wordpress"], "title": "WordPress hosts in Australia", "type": "article", "audiences": [], "topics": ["topic:hosting"] } }, ... ]}

Page 13: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Using Recombee server side

<?php

use Recombee\RecommApi\Client;

use Recombee\RecommApi\Requests as Reqs;

$client = new Client("myDb", private_token);

// Push up data to Recombee item index

$client->send(new SetItemValues($item_id, $values, $optional_values));

?>

Page 14: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Recombee module

https://www.drupal.org/project/recombee

● Basic configuration settings● Public Scenario block● Tracker block

Page 15: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

DEMO

Page 16: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Recombee backend

● Database

● KPIs

● Items

● Users

● Scenarios

Page 17: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Alphabet

● User recommendations

● Item recommendations

● Public Scenario block (templating)

● Tracker block

Page 18: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

BEHIND THE SCENES

Page 19: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Search API Recombee

https://www.drupal.org/project/search_api_recombee

● Recombee backend for the Search API module.● Index content into Recombee.● No support for search or facets.● Federation supported.

Page 20: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

JSON Template

https://www.drupal.org/project/json_template

● A plugin system for managing client side templates.● JSON Template: The template applied to the JSON● JSON Transformer: The engine which transforms.● Ships with Handlebars transformer● Themers define template in module or theme● Editors and site builders choose template

Page 21: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

JSON Template Configrecombee_basic_list: title: 'Recombee: Basic list' description: 'Simple Handlebars template for Recombee.' file: handlebars/recombee-basic-list.html.hbs transformer: handlebars available_for: - recombee

recombee_image_cards_thirds: title: 'Recombee: Image cards - thirds' description: 'Simple Handlebars template for Recombee.' file: handlebars/recombee-image-cards-thirds.html.hbs transformer: handlebars available_for: - recombee

Page 22: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

JSON Template Example<div class="roam-recombee list-layout list-layout--4-4-4" > <div class="erd-list--stack-detail list"> {{#each recomms}} <div class="list__item"> <div class="au-card au-body au-card--shadow au-card--clickable stack stack--detail"> <div class="stack__image"> <img src="{{values.image}}"/> </div> <div class="stack__content"> <h3 class="stack__title"> <a href="{{values.url}}">{{values.title}}</a> </h3> <div class="stack__summary"> {{values.summary}} </div> </div> </div> </div> {{/each}} </div></div>

Page 23: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

CONCLUSION

Page 24: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Orchestrating many parts

● Planning and design Discovery, IA, UX, Ontology, Content

● Scenarios Recombee backend

● Tracking Recombee

● Indexing Search API Recombee

● Querying Recombee

● Transforming JSON Template

Page 25: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

It’s worth it

● Surfacing relevant content

● Uncovering content which may have been hidden

● Keeping the user engaged

● Lower bounces, longer time on the site

Page 26: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

QUESTIONS

Page 27: PERSONALISATION WITH RECOMBEE PART 2 … · PERSONALISATION WITH RECOMBEE PART 2 Murray Woodman, Morpht. CONTENT MANAGEMENT IS A SOLVED PROBLEM. Drupal’s strengths Content modelling

Thanks!Murray WoodmanMorpht

https://www.morpht.com/https://twitter.com/murraywhttps://www.drupal.org/u/murrayw