Help Center/Details/

MoPub Custom Event for CSJ

Please set MoPub in your app first.

Setup CSJ Platform

Create a CSJ account

Create an application and placements in CSJ Platform

  • Click Apps -> + Add App to create an app for mediation.


    create-app-home-2.png


  • You will get an app with its app ID.


    appid2.png

Create Ad Placement

  • Click Ad Placements -> + Add Ad Placement to create the placement for mediation.


    create-placement-2.png

  • Select the ad's type for your app and finish the create.


    adtype.png


  • You will get a placement with its placement ID.


    placementid2.png

Add CSJ to MoPub's mediation

Create Order

  • Click Order -> Create Order to create a new order. If you already have an existing order, please move to the next step.

create-order.png

Create Line Item

  • Click New Line Item to create a line item.


    create-line-item.png

  • Select Network Line Item to the field Type & Priority and select Custom SDK Network to the field Network


    line-item-setup.png

  • Add adapter's class name to Custom Event Class Name.

    • Class Name: the adapter class's name , for example,CSJRewardedVideoCustomEvent
  • Add {"app_id":"your app id", "ad_placement_id":"your placement id"} to Custom Event Class Data.

    • Custom Event Class Data: Add {"app_id":"your app id", "ad_placement_id":"your placement id"} to Custom Event Class Data , for example,{"app_id":"5000546", "ad_placement_id":"946411987"}


      class-name-and-parameter.png


      Note: Please make sure to use JSON to set Custom Event Class Data. Or you need to customize adapter yourself.

  • Embed your MoPub Ad Placement to the line item.


    embed-ad-unit.png

Class name for different ad formats

  • Reward Video Ads:CSJRewardedVideoCustomEvent
  • Interstitial Video Ads:CSJInterstitialCustomEvent
  • Banner Ads:CSJBannerCustomEvent
  • Native Ads:CSJNativeCustomEvent

Import and initialize CSJ SDK and Adapter

Add the information as follows in Podfile, and using pod install to intergrate.

//Import CSJ SDK
pod 'Ads-CN'
//Import CSJ-MoPub Custom Event Adapter
pod "CSJ-mopub-adapter"
Did the content solve your problem?
Contact us