From 91ce3a3b9fdbf5cbb03fd8cfbe6b4f14a1ec2f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20December?= Date: Wed, 19 Feb 2025 13:16:15 +0100 Subject: [PATCH] ceeIdSystem documentation update --- .../modules/userid-submodules/ceeIdSystem.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/dev-docs/modules/userid-submodules/ceeIdSystem.md b/dev-docs/modules/userid-submodules/ceeIdSystem.md index 3ab6277289..2e2194a1c7 100644 --- a/dev-docs/modules/userid-submodules/ceeIdSystem.md +++ b/dev-docs/modules/userid-submodules/ceeIdSystem.md @@ -29,12 +29,14 @@ gulp build --modules=ceeIdSystem | storage.expires | Optional | Int | Time when storage should expire it is recommended to use this options otherwise storage last only during session | `7` | | storage.refreshInSeconds | Optional | Int | Time when storage value and expiration date will get refreshed in seconds | `360` | | params | Required | Object | Container of all module params. | | -| params.tokenName | Required | String | Your custom name of token to read | `'myExampleTokenName'` | -| params.value | Optional | String | Optional param if you want to pass token value directly through setConfig | `'someTokenValue'` | +| params.publisherId | Required | String | Required param which defines your publisher ID to send in query | `'123'` | +| params.type | Required | String | Required param which defines type of encoding used on user email. Use 'email' if HEM was encoded by base64 or use 'hex' if it was encoded by hex | `'hex'` | +| params.value | Required | String | Required param where you pass HEM value | `'exampleHEMValue'` | +| params.cookieName | Optional | String | Your custom name of token to read it is only used if second way of integration is chosen. | `'myExampleCookieName'` | ## CEEID Examples -You can configure this submodule in your `userSync.userIds[]` configuration. Publishers manage ceeIds themselves can store ceeIds in local storage or 1st party cookies. You can use your custom name of token to read +You can configure this submodule in your `userSync.userIds[]` configuration. We have two implementation methods depending on the publisher's needs. The first method we suggest for publishers is to provide appropriate data that will allow you to query the endpoint to retrieve the ceeId token. To query the endpoint correctly, you will need the publisher's ID in the params.publisheId field. In addition, the HEM type, i.e. how the user's email was encoded, we consider two methods: base64 encoding and hex encoding. The value of HEM should be passed in the params.value field. ```javascript pbjs.setConfig({ @@ -48,14 +50,16 @@ pbjs.setConfig({ refreshInSeconds: 360 }, params: { - tokenName: 'name' // Your custom name of token to read + publisherId: '123', // Publisher ID + type: 'email', // use 'email' if HEM was encoded by base64 or use 'hex' if it was encoded by hex + value: 'exampleHEMValue', // HEM value } }] } }); ``` -Or pass value directly thorugh params.value. Note that tokenName is not required then. This param shouldn't be set if token value will be taken by tokenName +The second way is to use a token from a cookie or local storage previously prepared by the publisher. The only thing needed in this approach is to enter the name of the cookie/local storage that the module should use in the params.cookieName field. ```javascript pbjs.setConfig({ @@ -69,7 +73,7 @@ pbjs.setConfig({ refreshInSeconds: 360 }, params: { - value: 'tokenValue' + cookieName: 'name' // Your custom name of token to read from cookies or local storage } }] }