Skip to content

Commit 285a6a1

Browse files
authored
Update README.md with GAM Secure Signals how-to (#167)
1 parent 278e8e8 commit 285a6a1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ JavaScript SDK for integrating with an [Optable Data Connectivity Node (DCN)](ht
2020
- [Targeting key values](#targeting-key-values)
2121
- [Targeting key values from local cache](#targeting-key-values-from-local-cache)
2222
- [Witnessing ad events](#witnessing-ad-events)
23+
- [Passing Secure Signals to GAM](#gam-secure-signals)
2324
- [Integrating Prebid](#integrating-prebid)
2425
- [Seller Defined Audiences](#seller-defined-audiences)
2526
- [Custom key values](#custom-key-values)
@@ -418,6 +419,32 @@ Note that you can call `installGPTEventListeners()` as many times as you like on
418419

419420
A working example of both targeting and event witnessing is available in the demo pages.
420421

422+
### GAM Secure Signals
423+
424+
The Optable Web SDK provides a method `installGPTSecureSignals` to pass user-defined signals to Google Ad Manager (GAM) [Secure Signals](https://support.google.com/admanager/answer/10488752). The method supports an array of objects, each representing a unique signal to pass to GAM, for example:
425+
426+
```html
427+
<!-- Optable SDK async load: -->
428+
<script async src="https://cdn.optable.co/web-sdk/latest/sdk.js"></script>
429+
<script>
430+
const mySecureSignals = [];
431+
mySecureSignals.push({
432+
// Name of the provider
433+
provider: "uidapi.com",
434+
// ID to use in the Secure Signal
435+
value: "uid2_token_goes_here",
436+
});
437+
window.optable = window.optable || { cmd: [] };
438+
optable.cmd.push(function () {
439+
optable.instance.installGPTSecureSignals(mySecureSignals);
440+
});
441+
</script>
442+
```
443+
444+
Please refer to the list of approved Secure Signal [providers](https://support.google.com/admanager/answer/14750072). Please refer to the provider's integration documentation for the exact provider name and value to pass as a signal.
445+
446+
You can verify the signal was correctly passed to GAM by searching for its value cached in `localStorage` under the key `_GESPSK-<provider_name>`.
447+
421448
## Integrating Prebid
422449

423450
The Optable Web SDK can fetch targeting data from a DCN and prepare an audience taxonomy object similar to the one described in [the prebid.js first party data documentation](https://docs.prebid.org/features/firstPartyData.html#segments-and-taxonomy). The `prebidORTB2FromCache()` function returns the object from the targeting data stored by `targeting()` API calls in `LocalStorage`.

0 commit comments

Comments
 (0)