PyzeAd

PyzeAd : PyzeCuratedEvents

Methods in PyzeAd can be used for posting events related to ads in your apps.

PyzeAd Methods

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

    Since

    v1.0.0

    Sample

    var attributes = {};
    attributes["adNetwork"] = adNetworkValue;
    attributes["appScreen"] = appScreenValue;
    attributes["size"] =  sizeValue;
    attributes["type"] =  typeValue;
    var customAttributes = {};
    PyzeCuratedEvents.post("AdRequested", attributes, customAttributes);

    Parameters

    adNetwork

    The ad network the app is referring to.

    appScreen

    ViewController name where the ad would be shown.

    size

    Size of the ad.

    type

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

    customAttributes

    Additional custom attributes the app would like to share with server. Learn more about custom attributes.

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

    Since

    v1.0.0

    Sample

    var attributes = {};
    attributes["adNetwork"] = adNetworkValue;
    attributes["appScreen"] = appScreenValue;
    attributes["resultCode"] =  resultCodeValue;
    attributes["success"] =  successValue;
    var customAttributes = {};
    PyzeCuratedEvents.post("AdReceived", attributes, customAttributes);

    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.

    customAttributes

    Additional custom attributes the app would like to share with server. Learn more about custom attributes.

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

    Since

    v1.0.0

    Sample

    var attributes = {};
    attributes["adNetwork"] = adNetworkValue;
    attributes["appScreen"] = appScreenValue;
    attributes["adCode"] =  adCodeValue;
    attributes["success"] =  successValue;
    attributes["errorCode"] =  errorCodeValue;
    var customAttributes = {};
    PyzeCuratedEvents.post("AdClicked", attributes, customAttributes);

    Parameters

    adNetwork

    The ad network the app is referring to.

    appScreen

    ViewController name where the 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.

    customAttributes

    Additional custom attributes the app would like to share with server. Learn more about custom attributes.