Skip to content

Commit eea66ea

Browse files
ceeIdSystem documentation update (prebid#5896)
Co-authored-by: wojciech-bialy-wpm <[email protected]> Co-authored-by: Wojciech Biały <[email protected]>
1 parent 8d58f27 commit eea66ea

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

dev-docs/modules/userid-submodules/ceeIdSystem.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ gulp build --modules=ceeIdSystem
2929
| storage.expires | Optional | Int | Time when storage should expire it is recommended to use this options otherwise storage last only during session | `7` |
3030
| storage.refreshInSeconds | Optional | Int | Time when storage value and expiration date will get refreshed in seconds | `360` |
3131
| params | Required | Object | Container of all module params. | |
32-
| params.tokenName | Required | String | Your custom name of token to read | `'myExampleTokenName'` |
33-
| params.value | Optional | String | Optional param if you want to pass token value directly through setConfig | `'someTokenValue'` |
32+
| params.publisherId | Required | String | Required param which defines your publisher ID to send in query | `'123'` |
33+
| 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'` |
34+
| params.value | Required | String | Required param where you pass HEM value | `'exampleHEMValue'` |
35+
| params.cookieName | Optional | String | Your custom name of token to read it is only used if second way of integration is chosen. | `'myExampleCookieName'` |
3436

3537
## CEEID Examples
3638

37-
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
39+
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.
3840

3941
```javascript
4042
pbjs.setConfig({
@@ -48,14 +50,16 @@ pbjs.setConfig({
4850
refreshInSeconds: 360
4951
},
5052
params: {
51-
tokenName: 'name' // Your custom name of token to read
53+
publisherId: '123', // Publisher ID
54+
type: 'email', // use 'email' if HEM was encoded by base64 or use 'hex' if it was encoded by hex
55+
value: 'exampleHEMValue', // HEM value
5256
}
5357
}]
5458
}
5559
});
5660
```
5761

58-
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
62+
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.
5963

6064
```javascript
6165
pbjs.setConfig({
@@ -69,7 +73,7 @@ pbjs.setConfig({
6973
refreshInSeconds: 360
7074
},
7175
params: {
72-
value: 'tokenValue'
76+
cookieName: 'name' // Your custom name of token to read from cookies or local storage
7377
}
7478
}]
7579
}

0 commit comments

Comments
 (0)