Skip to content

Commit c553a15

Browse files
committed
Move recommendationItems JSON to included file
1 parent e087fc5 commit c553a15

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"recommendationItems": [
3+
{
4+
"relevance": 23,
5+
"itemType": 1,
6+
"itemId": 100175717,
7+
"origin": {
8+
"itemIds" : [10, 11],
9+
"itemType" : 1,
10+
"source" : "REQUEST"
11+
},
12+
"category" : "Men/Shirts",
13+
"links" : {
14+
"clickRecommended" : "//event.perso.ibexa.co/clickrecommended/johndoe/1/100175717?scenario=also_clicked&modelId=37",
15+
"rendered" : "//event.perso.ibexa.co/rendered/johndoe/1/100175717"
16+
}
17+
}
18+
]
19+
}

docs/personalization/api_reference/tracking_api.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -355,28 +355,10 @@ The first one is executed when a recommendation is shown to the user.
355355
The second is called when a recommendation is clicked or otherwise accepted.
356356
Sending Rendered events causes as many requests as recommendations to be displayed, a Clickrecommended event is usually sent only once (when a user clicks on a specific recommendation item).
357357

358-
Example of a recommendation response:
358+
Sample of a recommendation response:
359359

360360
``` json
361-
{
362-
"recommendationItems": [
363-
{
364-
"relevance": 23,
365-
"itemType": 1,
366-
"itemId": 100175717,
367-
"origin": {
368-
"itemIds" : [10, 11],
369-
"itemType" : 1,
370-
"source" : "REQUEST"
371-
},
372-
"category" : "Men/Shirts",
373-
"links" : {
374-
"clickRecommended" : "//event.perso.ibexa.co/clickrecommended/johndoe/1/100175717?scenario=also_clicked&modelId=37",
375-
"rendered" : "//event.perso.ibexa.co/rendered/johndoe/1/100175717"
376-
}
377-
}
378-
]
379-
}
361+
[[= include_file('code_samples/personalization/response-body.json', 1, 16) =]]
380362
```
381363

382364
| Field name | Description |

0 commit comments

Comments
 (0)