Skip to main content

OverwolfApi

Electron APIs / app / OverwolfApi

The Overwolf APIs, exposed on Electron's app object as app.overwolf.

Properties

PropertyModifierTypeDescription
muidreadonlystringA unique identifier for the user machine.
packagespublicOverwolfPackageManagerThe Overwolf Package Manager instance
phasePercentreadonlynumberClient persistence phasing percent
uidreadonlystringThe ow-electron uid (Overwolf App Id).
utmParamsreadonlyanyOverwolf installer provided UTM params

Methods

disableAdsFPD()

disableAdsFPD(): void;

Opt out from using first party data (email address) for ad targeting

Returns

void


disableAdsOptimization()

disableAdsOptimization(): void;

Disable Ads optimization

Returns

void


disableAnonymousAnalytics()

disableAnonymousAnalytics(): void;

Disable sending any anonymous analytics, this should be called before app.ready

Returns

void


generateUserEmailHashes()

generateUserEmailHashes(email: string): EmailHashes;

Generate a hashed email, to allow for better ad performance, this should be called after app.ready NOTE: the email is not stored! only the hashed email.

Parameters

ParameterType
emailstring

Returns

EmailHashes


isCMPRequired()

isCMPRequired(): Promise<boolean>;

Returns true if the current user should be able to update their cmp configurations (i.e. openCMPWindow).

Note that this is an async function and should be called with await. The function will never throw an exception - the default value is true.

Returns

Promise<boolean>


openAdPrivacySettingsWindow()

openAdPrivacySettingsWindow(options?: CMPWindowOptions): Promise<void>;

Opens the Ads settings configuration window.

Parameters

ParameterType
options?CMPWindowOptions

Returns

Promise<void>


openCMPWindow()

openCMPWindow(options?: CMPWindowOptions): Promise<void>;

Opens the CMP configuration window - should only be called when isCMPRequired returns true.

Parameters

ParameterType
options?CMPWindowOptions

Returns

Promise<void>


setExternalPaymentUserId()

setExternalPaymentUserId(options: ExternalPaymentUserIdOptions): Promise<void>;

Associates the current user's id at an external payment provider (e.g. Tebex) with this machine. Call this once on every app launch, after app.ready. Rejects if userId is missing. providerName defaults to 'tebex'. Rejects with 'ow-electron is not ready yet!' if called before app.ready. A failed analytics report does not reject.

Parameters

ParameterType
optionsExternalPaymentUserIdOptions

Returns

Promise<void>


setUserEmailHashes()

setUserEmailHashes(emailHashes?: EmailHashes): void;

Set the user email hashes (see generateUserEmailHashes), this should be called after app.ready See https://www.chromium.org/developers/design-documents/accessibility for more details how to normalize email before creating hash

Parameters

ParameterType
emailHashes?EmailHashes

Returns

void