Api clients
/
JavaScript
/
V3
/
Methods
Mar. 31, 2022
Add Strategy | JavaScript API Client V3 (Deprecated)
This version of the JavaScript API client has been deprecated in favor of the latest version of the JavaScript API client.
Required API Key: any key with the
editSettings
ACL
Method signature
client.setPersonalizationStrategy(object strategy, callback)
About this method# A
Set a personalization strategy for your application
Examples# A
Edit
Copy
Copy
1
2
3
4
5
6
7
8
9
10
$client->setPersonalizationStrategy([
'eventsScoring' => [
'Add to cart' => ['score' => 50, 'type' => 'conversion'],
'Purchase' => ['score' => 100, 'type' => 'conversion']
],
'facetsScoring' => [
'brand' => ['score' => 100],
'categories' => ['score' => 10]
]
]);
Parameters# A
strategy
# |
type: object
Required
A strategy object. { "eventScoring": eventsScoring, "facetsScoring": facetsScoring } |
strategy #
Response# A
No response.
Did you find this page helpful?