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

Update enable_personalization.md #2499

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all 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
65 changes: 29 additions & 36 deletions docs/personalization/enable_personalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,44 @@ Use the `Accept` header; you may need to add an `Authorization` header if authen
To check whether the `content` endpoint is working as expected, perform the following request:

```
GET http://<yourdomain>/api/ezp/v2/ibexa_personalization/v1/content/{contentId}
GET http://<yourdomain>/api/ibexa/v2/personalization/v1/content/id/{contentId}
Accept application/vnd.ez.api.Content+json
Authorization Basic xxxxxxxx
```

Additionally, check whether the `contenttypes` endpoint is working with the following request:
### Export item information

To get recommendations you must first export the item information to the Personalization server.

After you [define item types to be tracked and recommended](#set-up-item-type-tracking),
start the full export.

You do it with the `ibexa:personalization:run-export` command.

If your installation hosts only one SiteAccess, run the following command to export your data:

``` bash
php bin/console ibexa:personalization:run-export
--item-type-identifier-list=<item_type>,<item_type>
--languages=<language>,<language>
```
GET http://<yourdomain>/api/ezp/v2/ibexa_personalization/v1/contenttypes/38?page=1&page_size=10
Accept application/vnd.ez.api.Content+json
Authorization Basic xxxxxxxx

If your installation hosts multiple SiteAccesses with different customer IDs,
you must run the export separately for each of the `<site_access_name>`/`<customer_id>` pairs.

``` bash
php bin/console ibexa:personalization:run-export
--item-type-identifier-list=<item_type>,<item_type>
--siteaccess=<site_access_name>
--customer-id=<customer_id>
--license-key=<license_key>
--languages=<language>,<language>
```

The `content` endpoint returns one item and the `contenttypes` endpoint returns many.
The bundle exporter collects all content related to the `<site_access_name>`/`<customer_id>`
pair and store it in files within the public/var/export folder.

Export files have a similar structure:
``` json
{
"contentList": {
Expand Down Expand Up @@ -221,37 +244,7 @@ The `content` endpoint returns one item and the `contenttypes` endpoint returns
}
}
```
### Export item information

To get recommendations you must first export the item information to the Personalization server.

After you [define item types to be tracked and recommended](#set-up-item-type-tracking),
start the full export.

You do it with the `ibexa:personalization:run-export` command.

If your installation hosts only one SiteAccess, run the following command to export your data:

``` bash
php bin/console ibexa:personalization:run-export
--item-type-identifier-list=<item_type>,<item_type>
-—languages=<language>,<language>
```

If your installation hosts multiple SiteAccesses with different customer IDs,
you must run the export separately for each of the `<site_access_name>`/`<customer_id>` pairs.

``` bash
php bin/console ibexa:personalization:run-export
--item-type-identifier-list=<item_type>,<item_type>
--siteaccess=<site_access_name>
--customer-id=<customer_id>
--license-key=<license_key>
-—languages=<language>,<language>
```

The bundle exporter collects all content related to the `<site_access_name>`/`<customer_id>`
pair and stores it in files.
After finishing, the system sends a POST request to the endpoint and informs the
Personalization server to fetch new content.
An internal workflow is then triggered, so that the generated files are downloaded
Expand Down
Loading