AdClickManager

interface AdClickManager

Public interface for the Ad Click feature which helps to measure ad conversions only when they are required

Functions

Link copied to clipboard
abstract fun clearAll()

Removes any data related to ad management that is kept in memory.

Link copied to clipboard
abstract fun clearAllExpiredAsync()

Removes any data related to ad management that is kept in memory. This is used asynchronously.

Link copied to clipboard
abstract fun clearTabId(tabId: String)

Removes any data kept in memory for the specified tab. It takes as parameters: mandatory tabId - The id of the active tab.

Link copied to clipboard
abstract fun detectAdClick(url: String?, isMainFrame: Boolean)

Detects and registers the eTLD+1 if an ad link was clicked. It takes as parameters: optional url - The requested url, null if no url was requested. mandatory isMainFrame - True if the request is for mainframe, false otherwise.

Link copied to clipboard
abstract fun detectAdDomain(url: String)

Detects and saves in memory the ad eTLD+1 domain from the url. It takes as parameters: mandatory url - The requested url.

Link copied to clipboard
abstract fun isExemption(documentUrl: String, url: String): Boolean

Detects if there is an existing exemption based on the document url and the url requested. It takes as parameters: mandatory documentUrl - The initially requested url, potentially leading to the advertiser page. mandatory url - The requested url, potentially a tracker used for ad attribution.

Link copied to clipboard
abstract fun setActiveTabId(tabId: String, url: String? = null, sourceTabId: String? = null, sourceTabUrl: String? = null)

Sets the active tab. It takes as parameters: mandatory tabId - The id of the current visible tab. optional url - The url loaded in the current tab, null if no url was loaded (empty tab). optional sourceTabId - The id of the tab from which the current tab was opened, null if a new tab option was used. optional sourceTabUrl - The url loaded in the tab from which the current tab was opened, null if a new tab option was used.