Skip to content

Commit 6980f70

Browse files
committed
IBX-89740 Improved personalization details.
1 parent 7da580c commit 6980f70

File tree

4 files changed

+31
-25
lines changed

4 files changed

+31
-25
lines changed

docs/personalization/enable_personalization.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ PERSONALIZATION_LICENSE_KEY=67890-1234-5678-90123-4567
2323
PERSONALIZATION_HOST_URI=https://server_uri
2424
```
2525

26-
!!! note "Configuring user credentials for different customers"
26+
!!! note "Configuring user credentials for multisite setup and different personalization customers"
2727

2828
If your installation [hosts multiple sites]([[= user_doc =]]/personalization/use_cases/#multiple-website-hosting) with different
2929
customer IDs, for example, to provide separate recommendations for different
@@ -140,6 +140,9 @@ ibexa:
140140
content:
141141
use_remote_id: true
142142
```
143+
!!! note "Support for alphanumeric content identifier"
144+
145+
Contact `[email protected]` with your organization's requirements to have the alphanumeric content identifier enabled.
143146

144147
#### Enable tracking
145148

@@ -437,8 +440,8 @@ if the content Fields were previously exported by the export script.
437440
"itemType": 38,
438441
"relevance": 3,
439442
"links": {
440-
"clickRecommended": "//event.test.perso.ibexa.co/api/723/clickrecommended/someuser/38/71?scenario=popular&modelid=4199&categorypath=&requestuuid=d75e7cf0-e4ca-11e7-a94d-0a64dbbea736",
441-
"rendered": "//event.test.perso.ibexa.co/api/723/rendered/someuser/38/71?scenario=popular&modelid=4199&categorypath=&requestuuid=d75e7cf0-e4ca-11e7-a94d-0a64dbbea736"
443+
"clickRecommended": "//event.perso.ibexa.co/api/723/clickrecommended/someuser/38/71?scenario=popular&modelid=4199&categorypath=&requestuuid=d75e7cf0-e4ca-11e7-a94d-0a64dbbea736",
444+
"rendered": "//event.perso.ibexa.co/api/723/rendered/someuser/38/71?scenario=popular&modelid=4199&categorypath=&requestuuid=d75e7cf0-e4ca-11e7-a94d-0a64dbbea736"
442445
},
443446
"attributes": [
444447
{
@@ -472,8 +475,8 @@ if the content Fields were previously exported by the export script.
472475
"itemType": 38,
473476
"relevance": 1,
474477
"links": {
475-
"clickRecommended": "//event.test.perso.ibexa.co/api/723/clickrecommended/someuser/38/75?scenario=popular&modelid=4199&categorypath=&requestuuid=d75e7cf0-e4ca-11e7-a94d-0a64dbbea736",
476-
"rendered": "//event.test.perso.ibexa.co/api/723/rendered/someuser/38/75?scenario=popular&modelid=4199&categorypath=&requestuuid=d75e7cf0-e4ca-11e7-a94d-0a64dbbea736"
478+
"clickRecommended": "//event.perso.ibexa.co/api/723/clickrecommended/someuser/38/75?scenario=popular&modelid=4199&categorypath=&requestuuid=d75e7cf0-e4ca-11e7-a94d-0a64dbbea736",
479+
"rendered": "//event.perso.ibexa.co/api/723/rendered/someuser/38/75?scenario=popular&modelid=4199&categorypath=&requestuuid=d75e7cf0-e4ca-11e7-a94d-0a64dbbea736"
477480
},
478481
"attributes": [
479482
{

docs/personalization/integrate_recommendation_service.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The easiest way of embedding the tracking URL is placing a one pixel image on ev
2222
like in the case of analytical tools or visitor counters.
2323
A code that includes an image looks like this:
2424

25-
`<img href="https://event.perso.ibexa.co/ebl/00000/click/<user_ID>/<content_type_ID>/<content_ID>" width="1" height="1">`
25+
`<img href="https://event.perso.ibexa.co/api/00000/click/<user_ID>/<content_type_ID>/<content_ID>" width="1" height="1">`
2626

2727
where:
2828

@@ -39,19 +39,21 @@ PHP:
3939

4040
``` php
4141
$mandator_id = '00000';
42+
$content_type_id = '1';
4243
$product_id = '123';
4344
$server = '//event.perso.ibexa.co';
44-
$tracking = $server.'/ebl/'.$mandator_id.'/click/'.urlencode(session_id()).'/1/'.$product_id;
45+
$tracking = $server.'/api/'.$mandator_id.'/click/'.urlencode(user_id()).$content_type_id.$product_id;
4546
echo "<img href='$tracking' width='1' height='1'>";
4647
```
4748

4849
JavaScript:
4950

5051
``` js
5152
var mandator_id = '00000';
53+
var content_type_id = '1';
5254
var product_id = '123';
5355
var server = '//event.perso.ibexa.co';
54-
var url = server + '/api/' + mandator_id + '/click/' + getSessionId() + '/1/' + product_id;
56+
var url = server + '/api/' + mandator_id + '/click/' + getUserId() + content_type_id + product_id;
5557
var ycimg=new Image(1,1);
5658
ycimg.src=url;
5759
```
@@ -61,7 +63,7 @@ A similar tracking image can be placed on a confirmation page that ends the paym
6163
``` php
6264
$server = '//event.perso.ibexa.co';
6365
foreach ($just_bought_products as $product_id) {
64-
$tracking = $server.'/ebl/'.$mandator_id.'/buy/'.urlencode(session_id()).'/1/'.$product_id;
66+
$tracking = $server.'/api/'.$mandator_id.'/buy/'.urlencode(user_id()).$content_type_id.$product_id;
6567
echo "<img href='$tracking' width='1' height='1'>\n";
6668
}
6769
```
@@ -128,7 +130,7 @@ $mandator_id = '00000';
128130
$license_key = '67890-1234-5678-90123-4567';
129131
$server = "https://reco.perso.ibexa.co";
130132
$scenario = "category_page";
131-
$url = $server.'/ebl/00000/'.urlencode(session_id()).'/'.urlencode($scenario).'.json';
133+
$url = $server.'/api/v2/00000/'.urlencode(user_id()).'/'.urlencode($scenario).'.json';
132134

133135
$curl = curl_init();
134136
$request = array(

docs/personalization/tracking_integration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ where the event must be sent [pixel tracking](integrate_recommendation_service.m
1111
For example, with HTML: 
1212

1313
``` html
14-
<img href="https://event.perso.ibexa.co/ebl/00000/click/johndoe/1/100?categorypath=/a/ab/abc" width="1" height="1">
14+
<img href="https://event.perso.ibexa.co/api/00000/click/johndoe/1/100?categorypath=/a/ab/abc" width="1" height="1">
1515
```
1616

1717
or with JavaScript:
1818

1919
``` js
2020
<script type="text/javascript">
2121
var img = new Image(1,1);
22-
img.src = "https://event.perso.ibexa.co/ebl/00000/click/johndoe/1/100?categorypath=/a/ab/abc";
22+
img.src = "https://event.perso.ibexa.co/api/00000/click/johndoe/1/100?categorypath=/a/ab/abc";
2323
</script>
2424
```
2525

docs/personalization/tracking_with_ibexa-tracker.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ JavaScript in your site.
99
The approach is very generic and evaluate it if it meets your
1010
**requirements and security policy**.
1111

12-
If you want the `userid` to be generated automatically, leave out the user
13-
params in the `_ycq.push` calls.
12+
If you want the `userid` to be generated automatically, set user
13+
params as empty `''` in the `_ycq.push` calls.
1414
If a predefined cookie already exists, it is used.
1515
Otherwise a new one is created.
1616

@@ -22,8 +22,9 @@ It activates the tracking by inserting <https://cdn.perso.ibexa.co/ibexa-track
2222
into the page.
2323

2424
To use this mechanism on your pages, copy the code snippet below, and replace
25-
`<YOUR_MANDATOR_ID>` with the customer ID, `<PAGE_ID>` with the page/item identifier 
26-
and `<USER_ID>` with the one generated by your user identifier.
25+
`<YOUR_MANDATOR_ID>` with the customer ID, `<CONTENT_TYPE_ID>` with the content type identifier ,
26+
`<CONTENT_ID>` with the content identifier . `<USER_ID>`  could be empty string or replaced with
27+
one generated by your user identifier.
2728
All identifiers can be any form of string.
2829
Paste this snippet into your website template page so that it appears before
2930
the closing `</head>` tag.
@@ -32,7 +33,7 @@ the closing `</head>` tag.
3233
<script type="text/javascript">
3334
var _ycq = _ycq || [];
3435
_ycq.push(['_setMandator', '<YOUR_MANDATOR_ID>']);
35-
_ycq.push(['_trackEvent', '1', 'click', '<PAGE_ID>', '<USER_ID>']);
36+
_ycq.push(['_trackEvent', '<CONTENT_TYPE_ID>', 'click', '<CONTENT_ID>', '<USER_ID>']);
3637

3738
(function() {
3839
var yc = document.createElement('script');
@@ -85,17 +86,17 @@ Here is an example of typical usage of the method:
8586
``` js
8687
var _ycq = _ycq || [];
8788
_ycq.push(['_setMandator', '<YOUR_MANDATOR_ID>']);
88-
_ycq.push(['_trackEvent', '1', 'click', 'https://mydoc.pdf', 'user1234']);
89+
_ycq.push(['_trackEvent', '1', 'click', '10', '']);
8990
```
9091

9192
## Tracker object names
9293

93-
| Object | Description | Example |
94-
| --------------- | ------------- | ----- |
95-
| `_setMandator ` | - Executed with one additional parameter: `MandatorId` | `_ycq.push (['_setMandator' , '<YOUR_MANDATOR_ID>']);` |
96-
| `_trackEvent` | - Executed with four additional parameters: `ItemType`, `EventType`, `ItemId`, `UserId`.<br /> - `EventType` can be any of the [described types]([[= user_doc =]]/personalization/event_types/) | capturing an event: `_ycq.push(['_trackEvent', '1', 'buy', 'https://mydoc.pdf', 'user1234x']);` |
97-
| `_trackTimedEvent` | - Executed with five additional parameters: `ItemType``EventType``ItemId`, `Timeout`, `UserId`.<br /> - `EventType` can be any of the [described types]([[= user_doc =]]/personalization/event_types/).<br /> - `Timeout` can be any integer greater than than 0 representing time in ms | consume event sent after 20s: `_ycq.push(['_trackTimedEvent', '1', 'consume', 'https://mydoc.pdf', '20000', 'user1234x']);` |
98-
| `_login` | - Executed with two additional parameters: anonymous userId, pseudonymous userId.<br /> - It is to be triggered when a user logs in and the tracking identity is changed.<br /> |-|
94+
| Object | Description | Example |
95+
| --------------- | ------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
96+
| `_setMandator ` | - Executed with one additional parameter: `MandatorId` | `_ycq.push (['_setMandator' , '<YOUR_MANDATOR_ID>']);` |
97+
| `_trackEvent` | - Executed with four additional parameters: `ItemType`, `EventType`, `ItemId`, `UserId`.<br /> - `EventType` can be any of the [described types]([[= user_doc =]]/personalization/event_types/) | capturing an event: `_ycq.push(['_trackEvent', '1', 'buy', '10', '']);` |
98+
| `_trackTimedEvent` | - Executed with five additional parameters: `ItemType``EventType``ItemId`, `Timeout`, `UserId`.<br /> - `EventType` can be any of the [described types]([[= user_doc =]]/personalization/event_types/).<br /> - `Timeout` can be any integer greater than than 0 representing time in ms | consume event sent after 20s: `_ycq.push(['_trackTimedEvent', '1', 'consume', '10', '20000', '']);` |
99+
| `_login` | - Executed with two additional parameters: anonymous userId, pseudonymous userId.<br /> - It is to be triggered when a user logs in and the tracking identity is changed.<br /> | - |
99100
| `ycreco=true` | - If you want to send a click recommended event you can append the following parameter to the recommended item URLs: | [https://mydomain.com/mypage.html?ycreco=true](https://mydomain.com/mypage.html?ycreco=true) or <br />[https://mydomain.com/mypage.html?myparameter=x&ycreco=true](https://mydomain.com/mypage.html?myparameter=x&ycreco=true) |
100101

101102
## Tracking with HTML event handlers
@@ -104,7 +105,7 @@ The asynchronous tracking syntax should also be used from within DOM event handl
104105
For example, the following button generates an event when it is clicked:
105106

106107
``` js
107-
<button onclick = "_ycq.push(['_trackEvent', '2', 'click', 'itemId1', 'user1234x'])"/><button>
108+
<button onclick = "_ycq.push(['_trackEvent', '2', 'click', 'itemId1', ''])"/><button>
108109
```
109110

110111
Even if this button is clicked before the browser has finished loading `ibexa-tracker.js`,

0 commit comments

Comments
 (0)