AATKit Ionic Integration
Release Notes
  • Start
    • Setup
    • Initialization
    • App Tracking Transparency
    • Google Mobile Ads SDK
    • Consent
      • Managed Consent
      • Vendor Consent
      • Simple Consent
  • Formats
    • Banner
    • Fullscreen (Interstitial)
    • Rewarded Video
  • Other
    • Reference
      • Functions
        • initialize
        • reconfigure
        • setLogLevel
        • configureDebugScreen
        • enableDebugScreen
        • disableDebugScreen
        • setIsChildDirected
        • showConsentDialogIfNeeded
        • showConsentDialogIfNeededOrRejected
        • editConsent
        • reloadConsent
        • createPlacement
        • createRewardedVideoPlacement
        • reloadPlacement
        • startPlacementAutoReload
        • stopPlacementAutoReload
        • showPlacement
        • addPlacementToView
        • removePlacementFromView
        • setPlacementAlignment
        • setPlacementAlignmentWithOffset
        • isTablet
        • maximumBannerSizeLandscape
        • maximumBannerSizePortrait
        • fittingBannerSizesPortrait
        • fittingBannerSizesLandscape
        • setCollapsibleBannerOptions
        • setMultiContentTargetingUrlsForPlacement
        • getAdInfo
        • enableCreativeHistory
        • setUserTargeting
      • Interfaces
        • AATKitDebugScreenConfiguration
        • AATKitAdNetworkOptions
        • AATKitConfiguration
        • AATKitConsent
        • AATKitCollapsibleBannerOptions
        • AATKitAdInfo
      • Events
        • onHaveAd
        • onNoAd
        • onPauseForAd
        • onResumeAfterAd
        • onUserEarnedIncentive
        • aatkitObtainedAdRules
        • managedConsentNeedsUserInterface
        • managedConsentCMPFinished
        • managedConsentCMPFailedToShow
        • managedConsentCMPFailedToLoad
Powered by GitBook
On this page
  • Introduction
  • Google CMP Usage
  • SourcePoint CMP Usage
  • SFBX/AppConsent
  1. Start
  2. Consent

Managed Consent

Handle consent using managed consent

PreviousConsentNextVendor Consent

Last updated 9 months ago

Introduction

AATKit’s Managed Consent is an easy way to facilitate compliant third-party (CMPs) by providing a unified API and wrappers. In order to make use of Managed Consent, AATKit Ionic plugin provides CMP implementations.

Google CMP Usage

Android requires appId to be added to AndroidManifest, like

<meta-data
          android:name="com.google.android.gms.ads.APPLICATION_ID"
          android:value="YOUR-APP-ID"/>

For iOS you need to set the GADApplicationIdentifier value to the Info.plist file, like:

<key>GADApplicationIdentifier</key>
<string>YOUR-APP-ID</string>

Set Google CMP consent type when initializing AATKit:

AATKitIonic.initialize({
  consent: {
    type: "cmpGoogle"
  }
});

...

document.addEventListener('managedConsentNeedsUserInterface', (data: any) => {
  // CMP is loaded and ready to be shown
  AATKitIonic.showConsentDialogIfNeeded();
});

document.addEventListener('managedConsentCMPFinished', (data: any) => {
  // The user finished his action with CMP with the state as the user chosen state
});

document.addEventListener('managedConsentCMPFailedToLoad', (data: any) => {
  // CMP failed to load with the error message.
  // Reload the CMP.
  AATKitIonic.reloadConsent();
});

document.addEventListener('managedConsentCMPFailedToShow', (data: any) => {
  // CMP failed to show with the error message
  console.log('managedConsentCMPFailedToShow error: ' + data.error);
});

SourcePoint CMP Usage

Pass all required SourcePoint values as configuration parameters when initializing AATKit.

AATKitIonic.initialize({
  consent: {
    type: "cmpSourcePoint",
    accountId: "your-account-id",
    propertyId: "your-property-id",
    propertyName: "your-property-name",
    pmId: "your-pm-id",
  }
});

...

document.addEventListener('managedConsentNeedsUserInterface', (data: any) => {
  // CMP is loaded and ready to be shown
  AATKitIonic.showConsentDialogIfNeeded();
});

document.addEventListener('managedConsentCMPFinished', (data: any) => {
  // The user finished his action with CMP with the state as the user chosen state
});

document.addEventListener('managedConsentCMPFailedToLoad', (data: any) => {
  // CMP failed to load with the error message.
  // Reload the CMP.
  AATKitIonic.reloadConsent();
});

document.addEventListener('managedConsentCMPFailedToShow', (data: any) => {
  // CMP failed to show with the error message
  console.log('managedConsentCMPFailedToShow error: ' + data.error);
});

SFBX/AppConsent

Make sure, your SFBX CMP has been set up at its backend dashboard. Our support recommends certain vendors to be included in your server-side setup in order to yield optimal revenues.

Pass API Key as configuration parameter when initializing AATKit.

AATKitIonic.initialize({
  consent: {
    type: "cmpAppConsent",
    appConsentAppKey: "xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxxxxx"
  }
});

...

document.addEventListener('managedConsentNeedsUserInterface', (data: any) => {
  // CMP is loaded and ready to be shown
  AATKitIonic.showConsentDialogIfNeeded();
});

document.addEventListener('managedConsentCMPFinished', (data: any) => {
  // The user finished his action with CMP with the state as the user chosen state
});

document.addEventListener('managedConsentCMPFailedToLoad', (data: any) => {
  // CMP failed to load with the error message.
  // Reload the CMP.
  AATKitIonic.reloadConsent();
});

document.addEventListener('managedConsentCMPFailedToShow', (data: any) => {
  // CMP failed to show with the error message
  console.log('managedConsentCMPFailedToShow error: ' + data.error);
});
IAB TCF
Consent Management Platforms