Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix perso event names #2554

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions code_samples/personalization/response-body.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"recommendationItems": [
{
"relevance": 23,
"itemType": 1,
"itemId": 100175717,
"origin": {
"itemIds" : [10, 11],
"itemType" : 1,
"source" : "REQUEST"
},
"category" : "Men/Shirts",
"links" : {
"clickRecommended" : "//event.perso.ibexa.co/clickrecommended/johndoe/1/100175717?scenario=also_clicked&modelId=37",
"rendered" : "//event.perso.ibexa.co/rendered/johndoe/1/100175717"
}
}
]
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

22 changes: 4 additions & 18 deletions docs/personalization/api_reference/tracking_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,24 +355,10 @@ The first one is executed when a recommendation is shown to the user.
The second is called when a recommendation is clicked or otherwise accepted.
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).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not "clickRecommended" has in the example below?

Suggested change
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).
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).

It's probably its label name instead of its property name. Could be "Click recommended" in this case, a bit like "Clicked recommended" from its summary https://github.com/ibexa/personalization/blob/v4.6.14/src/lib/Value/Performance/Summary/Event.php#L19

Or all-caps "CLICKRECOMMENDED" like in https://doc.ibexa.co/projects/userguide/en/master/personalization/event_types/


Example of a recommendation response:
Sample of a recommendation response:

``` json
"recommendationItems": [
{
"relevance": 23,
"itemType": 1,
"itemId": 100175717,
"origin": {
"itemIds" : [10, 11],
"itemType" : 1,
"source" : "REQUEST"
},
"category" : "Men/Shirts",
"links" : {
"clickRecommended" : "//event.perso.ibexa.co/clickrecommended/johndoe/1/100175717?scenario=also_clicked&modelId=37",
"rendered" : "//event.perso.ibexa.co/rendered/johndoe/1/100175717"
},
[[= include_file('code_samples/personalization/response-body.json', 1, 16) =]]
```

| Field name | Description |
Expand All @@ -387,7 +373,7 @@ See [Recommendation API](recommendation_api.md) for more details.
A trigger message includes requests for a Triggeropened and Clicktriggered event.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use the properties of the trigger message below, triggerOpenedLink and clickTriggered?

The first is executed once, when the end user opens a trigger message (for example, embedded into a newsletter).
The second is called each time the user follows a link to see the recommended item.
Both requests provide the `triggername` parameter, which passes a unique alphanumerical identifier of the trigger that initiated the message.
Both requests provide the `triggerName` parameter, which passes a unique alphanumerical identifier of the trigger that initiated the message.

Example of a trigger message:

Comment on lines 378 to 379
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is again a JSON sample without consideration for parse errors.
I didn't find a test or other reference for this one.

Expand Down Expand Up @@ -444,7 +430,7 @@ The request parameters are:
|`scenario`|Name of the scenario, where recommendations originated from. This parameter is required.|URL-encoded alphanumeric|

The scenario parameter identifies the originating scenario to gain detailed statistics about the scenario that motivated the user to click on a recommendation.
This information comes with the recommendation from the recommendation controller. 
This information comes with the recommendation from the recommendation controller.

The event is used for providing statistics about how often users accepted the recommendations of the configured recommendation scenario or considered them as valuable.

Expand Down
Loading