It is mandatory to pass the Google or Apple Advertising ID for Outbrain installations in mobile apps, according to Google and Apple guidelines and developer agreements.

Advertising ID Opt-out

In compliance with Google and Apple guidelines, if the user is opted out of ad tracking, please pass the value “null” (case sensitive) – see examples below. This should be tested before submitting your app to Outbrain QA.

 

Standard JS widget

The data-ob-user-id attribute should be added to the Outbrain div.

[code language=”html”]<div class="OUTBRAIN" data-src="http://DROP_PERMALINK_HERE" data-widget-id="DW_1"
data-ob-template="templateName" data-ob-user-id="GOOGLE_APPLE_ADVERTISING_ID"></div>[/code]

In case the user is opted-out:
[code language=”html”]<div class="OUTBRAIN" data-src="http://DROP_PERMALINK_HERE" data-widget-id="DW_1"
data-ob-template="templateName" data-ob-user-id="null"></div>[/code]
 

JS API

Pass this value to the userId in the request settings object.

object: {
     ...
      userId : "GOOGLE_APPLE_ADVERTISING_ID",
     ...
}

In case the user is opted-out:

object: {
     ...
      userId : "null",
     ...
}

 

EndPoint API

Pass this value to the api_user_id when constructing the request.

api_user_id=GOOGLE_APPLE_ADVERTISING_ID

In case the user is opted-out:

api_user_id=null
  • This is the actual String ‘null’ and not null value!


SDK

SDK 1.5 and later is fully compliant with Google and Apple Advertising ID requirements.