PyzeAd

@interface PyzeAd : PyzeCustomEvent

PyzeAd

Subclass of PyzeCustomEvent. This class can be used for posting events related to ads in your apps.

  • Post the event to server once the ad request has successfully been sent to the server.

    Since

    v1.0.0

    Declaration

    Objective-C

    + (void)postAdRequested:(nullable NSString *)adNetwork
              fromAppScreen:(nonnull NSString *)appScreen
                 withAdSize:(nonnull NSString *)size
                     adType:(nonnull NSString *)type
             withAttributes:(nullable NSDictionary *)attributes;

    Swift

    class func postRequested(_ adNetwork: String?, fromAppScreen appScreen: String, withAdSize size: String, adType type: String, withAttributes attributes: [AnyHashable : Any]? = nil)

    Parameters

    adNetwork

    The ad network the app referring to.

    appScreen

    ViewController name where ad would be shown.

    size

    Size of the ad.

    type

    Type of ad for example Interstitial, Banner Ads, DFP ads etc.,

    attributes

    Additional custom attributes app would like to share with server.

  • Post the event to server once the ad data received from the provider.

    Since

    v1.0.0

    Declaration

    Objective-C

    + (void)postAdReceived:(nullable NSString *)adNetwork
             fromAppScreen:(nonnull NSString *)appScreen
            withResultCode:(nullable NSString *)resultCode
                 isSuccess:(BOOL)success
            withAttributes:(nullable NSDictionary *)attributes;

    Swift

    class func postReceived(_ adNetwork: String?, fromAppScreen appScreen: String, withResultCode resultCode: String?, isSuccess success: Bool, withAttributes attributes: [AnyHashable : Any]? = nil)

    Parameters

    adNetwork

    The ad network the app referring to.

    appScreen

    ViewController name where ad would be shown.

    resultCode

    Result code received, if any.

    success

    Success or failed to load the ad.

    attributes

    Additional custom attributes app would like to share with server.

  • Post the event to server when user taps on ad.

    Since

    v1.0.0

    Declaration

    Objective-C

    + (void)postAdClicked:(nullable NSString *)adNetwork
            fromAppScreen:(nonnull NSString *)appScreen
                   adCode:(nonnull NSString *)adCode
                isSuccess:(BOOL)success
            withErrorCode:(nullable NSString *)errorCode
           withAttributes:(nullable NSDictionary *)attributes;

    Swift

    class func postClicked(_ adNetwork: String?, fromAppScreen appScreen: String, adCode: String, isSuccess success: Bool, withErrorCode errorCode: String?, withAttributes attributes: [AnyHashable : Any]? = nil)

    Parameters

    adNetwork

    The ad network the app referring to.

    appScreen

    ViewController name where ad would be shown.

    adCode

    Ad code received from the server, if any.

    success

    Success or failed to load the ad.

    errorCode

    Pass the errorCode if ad click operation fails.

    attributes

    Additional custom attributes app would like to share with server.