> For the complete documentation index, see [llms.txt](https://ios-docs.adster.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ios-docs.adster.tech/ad-types/banner-ad.md).

# Banner Ad

To receive Banner Ads, you need to conform to the `MediationAdDelegate` protocol. This protocol will notify you when the ad is successfully loaded or failed to load.

**Implementation:**

```swift
extension BannerAdManager: MediationAdDelegate {
    func onBannerAdLoaded(bannerAd: AdsFramework.MediationBannerAd) {
        guard let bannerview = bannerAd.view else {
            print("Banner Ad request failed with reason banner ad null")
            return
        }
        addBannerViewToView(bannerview)
        bannerAd.eventDelegate = self
    }
    
    func onAdFailedToLoad(error: AdsFramework.AdError) {
        print("Banner Ad request failed with reason \(error.description)")
    }
    
    func onAdRevenuePaid(revenue: Double, adUnitId: String, network: String, currency: String, precisionType: AdsFramework.PrecisionType) {
        print("Revenue: \(revenue) \(currency), adUnitId: \(adUnitId), network: \(network), precision: \(precisionType)")
        
    }
}
```

**Tracking Events:**

To track click and impression events for Banner Ads, conform to `MediationBannerAdEventDelegate`:

```swift
extension BannerAdManager: MediationBannerAdEventDelegate {
    func recordBannerClick() {
        print("Banner clicked")
    }
    
    func recordBannerImpression() {
        print("Banner impression recorded")
    }
}
```
