Set Targeting Params

Targeting params allow a developer to set arbitrary key/value pairs. These key/value pairs are sent to Sourcepoint servers where they can be used to take a decision within the scenario builder.

To set a targeting param, call .setTargetingParam(key: string, value: string) in the ConsentLibBuilder instance.

ConsentLib.newBuilder(22, "", 7639,"122058", this)
// other setters
.setTargetingParam("language", "fr")
.setTargetingParam("foo", "bar")

In the above example, the SDK passes 2 key/value pairs to Sourcepoint servers:

  • Pair 1: "language" : "fr"

  • Pair 2: "foo" : bar"

These 2 pairs can then be leveraged in your organization's scenario builder workflow.