Skip to content

Commit 432244e

Browse files
docs: Enhance documentation for hashAttributes and selectPlacements methods with relevant links and parameter details
1 parent d4ebac0 commit 432244e

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/Rokt-Kit.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ var constructor = function () {
3232

3333
/**
3434
* Passes attributes to the Rokt Web SDK for server-side hashing
35+
* @see https://docs.rokt.com/developers/integration-guides/web/library/integration-launcher#hash-attributes
3536
* @param {Object} attributes - The attributes to be hashed
3637
* @returns {Promise<Object|null>} A Promise resolving to the
3738
* hashed attributes from the launcher, or `null` if the kit is not initialized
@@ -95,12 +96,15 @@ var constructor = function () {
9596
}
9697
}
9798

99+
/**
100+
* Selects placements for Rokt Web SDK with merged attributes, filters, and experimentation options
101+
* @see https://docs.rokt.com/developers/integration-guides/web/library/select-placements-options/
102+
* @param {Object} options - The options object for selecting placements containing:
103+
* - identifier {string}: The placement identifier
104+
* - attributes {Object}: Optional attributes to merge with existing attributes
105+
* @returns {Promise<void>} A Promise resolving to the Rokt launcher's selectPlacements method with processed attributes
106+
*/
98107
function selectPlacements(options) {
99-
// https://docs.rokt.com/developers/integration-guides/web/library/select-placements-options/
100-
// options should contain:
101-
// - identifier
102-
// - attributes
103-
104108
var attributes = (options && options.attributes) || {};
105109
var placementAttributes = mergeObjects(self.userAttributes, attributes);
106110

0 commit comments

Comments
 (0)