UserIDs
UserIDs class manages user advertising tokens based on email addresses.
Constructors
new UserIDs(): UserIDs
Returns
UserIDs
Methods
addUserToken(
email: string,
encoding: UserDataEncoding,
): Promise<void>
async
Create an advertising token for the current user, based on their email address.
You should obtain consent to use email address for personalized ad matching first, before using this.
Parameters
email(string) — email address or hashed email addressencoding(UserDataEncoding, default: "UserDataEncoding.Plain") — prefered encodings are either "PLAIN" or "SHA-256"
Returns
Promise<void>
Example
CODE
window.nitroAds.addUserToken('[email protected]', 'PLAIN');