Closed haoAddsearch closed 1 year ago
We are using personalizationToken here, but in technical design Nuclino, we are using the term userToken
In the README.md personalizationToken
and userToken
are used interchangeably, we should settle with one. The industry standard is userToken
(used by Algolia and some others)
Tested with 4 different scenarios:
Case 1: enable personalization tracking & customer uses their own personalization token
client.enablePersonalizationTracking(true, 20);
client.setPersonalizationToken(window.personalizationToken);
Case 2: enable personalization tracking , end-users allow usage of AddSearch's cookie
client.enablePersonalizationTracking(true);
Case 3: enable personalization tracking , end-users disallow usage of AddSearch's cookie
client.enablePersonalizationTracking(true, 20);
client.enableAddSearchCookie(false);
Case 4: enable personalization tracking , disable AddSearch's cookie , enable it again after 60s (this scenario showcases when customer uses a cookie consent popup, by default, customer should disable AddSearch Cookie, and enable it only when end-users give consent)
client.enablePersonalizationTracking(true, 20); client.enableAddSearchCookie(false);
window.setTimeout(function() { client.enableAddSearchCookie(true); }, 4E4);