Advertising module
Purpose
Section titled “Purpose”From JSDoc on AffiseAdvertising (src/module/advertising/AffiseAdvertising.ts:7):
iOS only / Start Advertising module
iOS only. Advertising Module starting Manually.
The Android side of the module reads Google Advertising ID automatically via the corresponding native artifact.
Module constant
Section titled “Module constant”AffiseModules.ADVERTISING = "Advertising"(src/module/AffiseModules.ts:1-16)
TypeScript API
Section titled “TypeScript API”AffiseAdvertising (src/module/advertising/AffiseAdvertising.ts:7) implements AffiseModuleAdvertisingApi (src/module/advertising/AffiseModuleAdvertisingApi.ts:3):
Affise.module.advertising.startModule(): void// AffiseModuleAdvertisingApi.ts:3-9Affise.module.advertising.hasModule(): Promise<boolean>Installation
Section titled “Installation”Since 1.7.16 the module ships as its own npm package, affise-attribution-module-advertising (Android and iOS). Install it next to the core library:
npm install affise-attribution-libnpm install affise-attribution-module-advertisingThe package only pulls in the native dependency (com.affise:module-advertising / AffiseModule/Advertising at 1.7.16); its JS entry point is empty, so keep importing everything from affise-attribution-lib. Rebuild the native app (and run pod install on iOS) after installing.
Platform notes
Section titled “Platform notes”Affise.module.advertising.startModule()Add the iOS subspec to your Podfile:
pod 'AffiseModule/Advertising', '1.7.16'The Affise Advertising module uses the AppTrackingTransparency framework to read advertisingIdentifier.
Android
Section titled “Android”Install the Maven artifact:
implementation "com.affise:module-advertising:$affise_version"Automatic per README: “Advertising Identifier (google) tracking is supported automatically, no actions needed”.
Providers contributed
Section titled “Providers contributed”From src/parameters/ProviderType.ts:96-106:
GAID_ADIDGAID_ADID_MD5OAIDOAID_MD5ADIDALTSTR_ADIDFIREOS_ADIDCOLOROS_ADIDAD_PERSONALIZATION(since 1.7.9)ADVERTISER_TRACKING_ENABLED(since 1.7.9)APPLICATION_TRACKING_ENABLED(since 1.7.9)