Third-party consent manager
Ogury requires an explicit consent from the user to use their personal data. In addition to our Ogury Choice Manager, we can collect the consent automatically from third-party consent manager (see case A for more details). Additionally we provide APIs to transmit the consent from third-party consent manager to the Ogury SDK in case it is not compatible with the automatic way (see case B and case C for more details).

Requirements

You have a registered application on your Ogury dashboard. If not, you can refer to the getting started.

Case A: Your CMP is compatible with the IAB GDPR Consent Framework

The Ogury SDK will automatically synchronize the user's consent before each ad request.
The user's consent is read from the User defaults as specified in IAB GDPR Consent Framework and synchronized every time to user changes its choices. Your CMP must be initialized before doing any ad request in order for the consent to be retrieved.
Compatible third-party consent managers:

Case B: Your CMP generates TCFv2 consent string

If your consent notice is registered in the IAB CMP list and produces IAB-specified consent string, you can pass the consent programmatically to Ogury SDK.
Call the following method after the consent has been collected:
Swift
Objective-C
1
OguryChoiceManagerExternal.setConsentForTCFV2WithAssetKey("OGY-XXXXXXXXXXXX", iabString: "IAB_STRING", andNonIABVendorsAccepted: Array<NSNumber>())
Copied!
1
[OguryChoiceManagerExternal setConsentForTCFV2WithAssetKey:@"OGY-XXXXXXXXXXXX" iabString:@"IAB_STRING" andNonIABVendorsAccepted:[NSArray array]];
Copied!
The setConsentWithAssetKey method takes the following parameters:
The IAB-specified Consent String must be valid and be generated by a whitelisted CMP. Otherwise the call to the setConsentForTCFV2WithAssetKey method will be ignored.
If, at any point, user consent is changed, call this method again with updated values.

Integration example

You must initialize the Ogury SDK after passing the user consent through the setConsentForTCFV2WithAssetKey method. Otherwise we will serve non-personalized ads.
Swift
Objective-C
1
let configuration = OguryConfigurationBuilder(assetKey: "OGY-XXXXXXXXXXXX").build()
2
Ogury.start(with: configuration)
3
OguryChoiceManagerExternal.setConsentForTCFV2WithAssetKey("OGY-XXXXXXXXXXXX", iabString: "IAB_STRING", andNonIABVendorsAccepted: Array<NSNumber>())
Copied!
1
OguryConfigurationBuilder *configurationBuilder = [[OguryConfigurationBuilder alloc] initWithAssetKey:@"OGY-XXXXXXXXXXXX"];
2
[[Ogury startWithConfiguration:[configurationBuilder build]];
3
[OguryChoiceManagerExternal setConsentForTCFV2WithAssetKey:@"OGY-XXXXXXXXXXXX" iabString:@"IAB_STRING" andNonIABVendorsAccepted:[NSArray array]];
Copied!

Case C: Your CMP is not supported by any of the above cases.

This feature is submitted to a whitelist. Please contact your account manager before starting using this method.
We provide an alternative programmatic way to provide a true/false user's consent to the Ogury SDK in case of any of the previous methods did not work.
Before using this method, to be compliant with last GDPR requirements, you must include a link to Ogury's Privacy Policy in your own privacy policy.
Swift
Objective-C
1
OguryChoiceManagerExternal.setTransparencyAndConsentStatus(consentBoolean,
2
origin: consentManagerName,
3
assetKey: "ASSET_KEY")
Copied!
1
[OguryChoiceManagerExternal setTransparencyAndConsentStatus:consentBoolean
2
origin:consentManagerName
3
assetKey:@"ASSET_KEY"];
Copied!
The setTransparencyAndConsentStatus method take the following parameter:
  • a boolean indicating whether the user has consented or not.
  • the name of the consent manager provider collecting the consent. The value must formatted in snake case
    • If you are using a third-party solution, enter the name of this solution in SCREAMING_SNAKE_CASE (all capital letters, space replaced by an underscore).
    • If you are using an in-house solution, use "CUSTOM".
  • the Asset Key of your application. If you do not have one, please refer to the getting started section.
If, at any point, user consent is changed, call this method again with updated values.

Integration example

You must initialize the Ogury SDK after passing the user consent through the setTransparencyAndConsentStatus method. Otherwise we will serve non-personalized ads.
Swift
Objective-C
1
let configuration = OguryConfigurationBuilder(assetKey: "OGY-XXXXXXXXXXXX").build()
2
Ogury.start(with: configuration)
3
OguryChoiceManagerExternal.setTransparencyAndConsentStatus(consentBoolean,
4
origin: "CUSTOM",
5
assetKey: "OGY-XXXXXXXXXXXX")
Copied!
1
OguryConfigurationBuilder *configurationBuilder = [[OguryConfigurationBuilder alloc] initWithAssetKey:@"OGY-XXXXXXXXXXXX"];
2
[[Ogury startWithConfiguration:[configurationBuilder build]];
3
[OguryChoiceManagerExternal setTransparencyAndConsentStatus:consentBoolean
4
origin:@"CUSTOM"
5
assetKey:@"ASSET_KEY"];
Copied!

Finish your integration

You can go back to the getting started to finish your integration.