Multi Profile Consent

Roku

Multi Profile Support

Support for multi profiles has been added to OT SDK based on the profile ID/DSID. As part of this feature, all the information associated with a user will be stored on a profile level basis locally on the device. As a result, whenever a profile ID/DSID is set by an application, that particular profile will be loaded.

In order to use Multi Profile consent, you must first enable it in your Templates section.

  1. Navigate to Cookie Consent > Setup > Templates.
  2. Click on the name of the template you want to configure. The Template Details screen appears.
  3. Select the Details tab and enable the Mobile App Template setting.
  4. Go to the Banner tab and select the Mobile App option.
  5. Click the edit icon next to Multi Profile Consent.
  6. Enable the Multi Profile Consent setting.

📘

Number of Profiles Supported

The SDK only supports up to 6 profiles today.

Default Profile

There will always be a default profile configured by the OneTrust SDK. Whenever a profile ID/DSID is not set by the application, we will load this default profile. At any point, there will be only one such default profile maintained by OT SDK.

Retrieve Current Profile ID

This method allows you to retrieve the identifier of the current profile.

m.global.OTsdk.callFunc("getCurrentActiveProfile")
	//Returns a string 

Renaming or Overriding Profiles/Data Subject Identifier

By default, the OneTrust SDK logs a user's consent anonymously under a random GUID. The ID and consent is stored locally on the device as well as in the OneTrust database (if the consent logging toggle is enabled in your geolocation rules).

The following method can be used to rename a profile from one DSID/Profile ID to another.

m.global.OTsdk.callFunc("renameProfile", “oldProfileID”, “newProfileID”)
  • Ensure that the new DSID is unique and does not already exist.
  • Ensure that startSDK() has been called at least once.

📘

This method will only rename the profile ID stored locally on the device. The ID stored in the OneTrust Consent database will not update until the user interacts with the CMP again. If you want to have the ID stored in the consent database to be updated right away (without interaction from the user), the recommendation is to to call saveConsent() after renameProfile. This will commit the user's consent choices again and create a new receipt.

otPublishersHeadlessSDK.saveConsent(OTConsentInteractionType.PC_CONFIRM)

Switching Profiles

Profile switching will happen in the following scenarios:

  • Whenever startSDK() is called, we will be checking for identifier that will be passed as part of sdkParams. If this identifier is empty, we will be switching to/loading the default profile maintained by OT SDK.
  • Whenever switchProfile() is called, we will be checking to see if the data is available for switching to the new profile. If it is available, we will switch to the new profile.
  • If an empty identifier is passed, we will be loading the default profile maintained by OT SDK.
 m.global.OTsdk.eventlistener.observeField("onSwitchUserProfileCallback", "switchProfileCallback")
m.global.OTsdk.callFunc("switchUserProfile", “profileID”)
function switchProfileCallback(data)
 	data = data.getData()
	print  FormatJson(data)
end function
  • Ensure that startSDK() has been called at least once.

Deleting Profile

The following method can be used to delete a profile. If the profile being deleted is currently active, we switch the active profile to the default profile and then delete it.

  • If an empty identifier is passed, we will be deleting the default profile maintained by OT SDK.
m.global.OTsdk.eventlistener.observeField("onDeleteProfileCallback", " deleteProfileCallback")
 m.global.OTsdk.callFunc("deleteProfile", “profileID”)
function deleteProfileCallback (data)
 	data = data.getData()
	print  FormatJson(data)
end function
  • Ensure that startSDK() has been called at least once.