SDK DocumentationRecipesAnnouncementsSupport Forum
AndroidiOSAnnouncementsSupport Forum
SDK Documentation

Advanced Options

iOS Web - Advanced Options

While reading the documentation, take a look at our Sample App.

Introduction

In this section, we look at more advanced options for working with the Taboola SDK.

Opening Audience Exchange (AE) Items in App

If your widget or feed feature AE items and you wish to open these items within the app instead of an external web view, please see the following steps below.

1: Add the extra property 'allowAudienceExchangeClickOverride' to Taboola's global properties:

Taboola.setGlobalExtraProperties(["allowAudienceExchangeClickOverride":"true"])

2: Override the 'didClickPlacementName' delegate to implement your desired behavior:

func webView(_ webView: WKWebView!, didClickPlacementName placementName: String!, itemId: String!, clickUrl: String!, isOrganic organic: Bool, customData: [String:Any]) -> Bool {
     
     // You can identify Audience Exchange items by checking the customData dictionary
     // Note that you will also need to pass in an Extra Property flag called allowAudienceExchangeClickOverride with the value of true
     if let isAudienceExchange = customData["isAudienceExchange"] as? Bool {
         if isAudienceExchange == true {
             // Handle Audience Exchange items
             return false
         }
     }
     return true
 }