Incentive video is a full-screen video advertisement. Users can get rewards after watching the complete video. After the video advertisement is played, the end page will be displayed to guide the user to follow-up actions. The current form of rewarded video ads is: Endcard page is displayed after the video is played, interactive page is displayed after the video is played, or interactive ads appear directly.
Supported ad sizes: Full screen horizontal screen (aspect ratio 16:9), full screen vertical screen (aspect ratio 9:16)
**Template rendering incentive video: **Open by default
SDK rendering rewarded video: has been recycled, no longer available for creation
-The developer selects the video playback direction according to the display scene: horizontal or vertical
-The reward name and reward quantity can be set according to the needs of your own project, for example: the reward name is gold coins, the reward quantity: 1000
-Reward distribution settings:
-When choosing not to require server judgment, developers can issue rewards based on the client's nativeExpressRewardedVideoAdServerRewardDidSucceed callback.
-When choosing to require server judgment, the developer needs to develop the interface according to the following requirements and fill in the callback URL on the platform.
Server callback means that when the user reaches the reward conditions after watching the incentive video, the CSJ server will send a verification request to the developer server. After receiving the request, the developer server will determine whether to reward the user and return it to the CSJ server true/ false, the client will give the nativeExpressRewardedVideoAdServerRewardDidSucceed callback in the end, and the developer will issue the rewards according to the callback, or issue the rewards through the server interface verification result.
Refer to this document for reward distribution logic: Link
The server-to-server callback allows you to determine whether to provide rewards to users who watch the ad. When the user has successfully watched the advertisement, a verification request will be sent to the verification interface that you configured in the CSJ platform, and the developer will determine whether the user will be rewarded for this viewing.
Key Note: The CSJ server only transmits the verification request transparently, and does not add verification logic in the intermediate process. In order to protect the interests of developers and user experience, developers can add their own verification logic in the verification process.
The CSJ server will request the callback link of the third-party service by GET method, and splicing the following parameters to return:
Field name | Field definition | Field type | Remarks |
sign | Signature | string | Signature |
user_id | tagid | string | Call SDK to pass through |
trans_id | Transaction id | string | The unique transaction ID that completed the watch |
reward_amount | reward amount | int | media platform configuration |
reward_name | reward name | string | media platform configuration |
extra | Extra | string | Call the SDK to pass in and pass it through, or empty if not needed |
appSecurityKey: The key transId you get from the newly created reward video code bit on the CSJ media platform: transaction id: sign = sha256(appSecurityKey:transId)
Python example:
Return json data, the fields are as follows:
Field name | Field definition | Field type | Remarks |
isValid | Verification result | BOOL | Judgment result, whether to issue reward |
Examples of callback URL format are as follows:
The server callback mode is not necessary. The server mode only adds a third-party server verification and judgment, and the specific rewards are issued by the client.
The template rewarded video uses the BUNativeExpressRewardedVideoAd object to call the loadAdData method to request an advertisement, and the BUNativeExpressRewardedVideoAd object to call showAdFromRootViewController: to display the advertisement, and to obtain the advertisement and display by setting the BUNativeExpressRewardedVideoAdDelegate agent , Click, close and other callbacks.
You need to pass in the ad slot object when requesting an ad, and the ad slot ID must be passed in when the ad slot object is created
Field name | Field definition | Field type | Remarks |
SlotID | Ad Slot | NSString | Code Slot ID |
userId | tag_id | NSString | tag_id |
Field name | Field definition | Field type | Remarks |
rewardName | Reward Name | NSString | Set according to project requirements |
rewardAmount | Reward Amount | NSInteger | Set according to project needs |
extra | Transmission parameters | NSString | Should be the string after json serialization |
Use BUNativeExpressRewardedVideoAd to create an object, use BUNativeExpressRewardedVideoAd to call loadAdDat to request ads
Callback Method | Notes |
nativeExpressRewardedVideoAd:didFailWithError | The returned error code (error) indicates the reason why the ad failed to load. Please refer to the link for details of all error codes. Link |
nativeExpressRewardedVideoAdViewRenderFail:error | Rendering failed, the rendering failed due to network or hardware reasons, you can change the mobile phone or network environment to test. It is recommended to upgrade to the latest version of the CSJ platform |
nativeExpressRewardedVideoAdDidLoad | Creative material loaded successfully |
nativeExpressRewardedVideoAdDidDownLoadVideo | Video download completed |
Callback Method | Notes |
nativeExpressRewardedVideoAdDidLoad: | Callback entry to prove that the advertising material has been successfully loaded |
nativeExpressRewardedVideoAd: didFailWithError: | This callback method can locate the error code corresponding to the specific failure reason, and just print the error. Please see the link for details of all error codes. Link |
nativeExpressRewardedVideoAdCallback:withType: | This callback can know the type of advertisement of the template rewarded video |
nativeExpressRewardedVideoAdDidDownLoadVideo | It is recommended to display ads in this callback method to ensure smooth playback and smooth display, and a better user experience. |
nativeExpressRewardedVideoAdViewRenderSuccess: | Rendering success callback. SDK version after 3100, callback will not occur until the ad is displayed |
nativeExpressRewardedVideoAdViewRenderFail: | Rendering failure, network or hardware reasons cause rendering failure, you can replace the mobile phone or network environment test. It is recommended to upgrade to the latest version of the CSJ platform |
nativeExpressRewardedVideoAdWillVisible: | Template rewarded video ads will be displayed soon |
nativeExpressRewardedVideoAdDidVisible: | The template rewarded video ad has been displayed |
nativeExpressRewardedVideoAdWillClose: | Template rewarded video ads will be closed soon |
nativeExpressRewardedVideoAdDidClose: | This callback is triggered when the user closes the ad. Note: Any closing operation of the ad must be triggered by the user; |
nativeExpressRewardedVideoAdDidClick: | Click callback method |
nativeExpressRewardedVideoAdDidClickSkip: | Skip callback method |
nativeExpressRewardedVideoAdDidPlayFinish: | This callback method can be triggered when the normal playback of the video is completed. This callback method will not be entered when the advertisement playback is abnormal; |
nativeExpressRewardedVideoAdServerRewardDidSucceed: | Asynchronously requested server verification success callback. Developers need to issue rewards in this callback. Now includes two verification methods: 1. C2C does not requires server verification 2. S2S require server authentication. nativeExpressRewardedVideoAdServerRewardDidFail: The server verification failed callback for asynchronous request. You can print error in this callback method to locate the specific reason for the failure, or locate the specific reason by capturing the packet. The capture address: https://domain name or ip address/api/ad/union/sdk/get_ads/ Provide the returned data Confirm) Go to [Message Feedback]-[Technical Questions Entry (Technical Questions only support this entry for the time being)] to give feedback, and the relevant students will handle it for you |
nativeExpressRewardedVideoAdDidCloseOtherController:interactionType: This callback is called when the ad jumps to another controller and the controller is closed. InteractionType: | This parameter can be distinguished from the opened appstore/webpage/video ad details page |
nativeExpressRewardedVideoAdServerRewardDidSucceed callback description:
To sum up: nativeExpressRewardedVideoAdServerRewardDidSucceed callback is only a result of the video playback status or the result returned by the developer, and does not represent advertising business indicators such as whether the playback is billed or not.
By setting the BUNativeExpressRewardedVideoAdDelegate agent, get the callback of the click, close, and play completion of the advertisement. For other delegate methods, please refer to BUDExpressRewardedVideoViewController class #pragma mark-BUNativeExpressRewardedVideoAdDelegate
Rewarded video advertisements need to allow users to actively choose to watch and give users a choice. Users cannot be forced to watch rewarded video advertisements. After the advertisement is played, the user needs to be rewarded accordingly.
Call the showAdFromRootViewController:
method to display rewarded video ads, where the currently displayed page needs to be passed in. Be sure to set the rootViewController
, which is the viewController
needed to display ads and jump landing pages
After receiving the nativeExpressRewardedVideoAdDidDownLoadVideo callback, the user is allowed to watch the advertisement, which can ensure smooth playback and smooth display, and a better user experience.
The ads of the same request can only be counted for one impression at most, and repeated impressions will be filtered by the system. Therefore, it is recommended that developers set the original ad object to nil in the nativeExpressRewardedVideoAdDidClose callback after the user has watched the ad to ensure that the ad object is the new request object
For detailed access, please refer to the BUDExpressRewardedVideoViewController class in the Demo. For the advertisement loading request part, please refer to the loadRewardVideoAdWithSlotID method, and for the advertisement display part, please refer to the showRewardVideoAd method.
The SDK renders rewarded videos using the BURewardedVideoAd object to call the loadAdData method to request advertisements, and the BURewardedVideoAd object to call showAdFromRootViewController: to display advertisements, and to obtain the advertisements by setting the BURewardedVideoAdDelegate agent. Display, click, close and other callbacks.
You need to pass in the ad slot object when requesting an ad, and the ad slot ID must be passed in when the ad slot object is created
Every time you need to generate a new BURewardedVideoAd object, call the loadAdData method to request the latest rewarded video, please do not reuse the local cached rewarded video for multiple display
Field name | Field definition | Field type | Remarks |
SlotID | Ad Slot | NSString | Code Slot ID |
userId | tag_id | NSString | tag_id |
Field name | Field definition | Field type | Remarks |
rewardName | Reward Name | NSString | Set according to project requirements |
rewardAmount | Reward Amount | NSInteger | Set according to project needs |
extra | Pass-through parameter | NSString | should be a string after json serialization, only a single json object format is supported, and json objects cannot be nested |
Use BURewardedVideoAd to create an object, use BURewardedVideoAd to call loadAdData to request ads
Callback Method | Notes |
rewardedVideoAd:didFailWithError: | The returned error code (error) indicates the reason why the ad failed to load. Please refer to the link for details of all error codes. Link |
rewardedVideoAdDidLoad: | Successfully loaded creative materials |
rewardedVideoAdVideoDidLoad: | Video download completed |
Callback Method | Notes |
rewardedVideoAdDidLoad: | Material loading success callback |
rewardedVideoAd: didFailWithError: | Load failed callback |
rewardedVideoAdVideoDidLoad: | Video download success callback, it is recommended to display advertisements in this callback method to ensure smooth display of advertisements and better user experience. |
rewardedVideoAdWillVisible: | When the ad is about to be displayed, it will enter this callback method |
rewardedVideoAdDidVisible: | When the ad has been displayed, it will enter this callback method |
rewardedVideoAdWillClose: | When the ad is about to be closed, it will enter this callback method |
rewardedVideoAdDidClose: | Close callback, when the advertisement is closed, the related logic can be carried out in this callback |
Handle the rewardedVideoAdDidClick: | When the ad is clicked, it will enter this callback method |
rewardedVideoAdDidPlayFinish:didFailWithError: | This callback will be entered when the ad playback is completed or an error occurs, just print the error. Please see the link for details of all error codes. Link |
rewardedVideoAdServerRewardDidSucceed: verify: | Asynchronous request server verification success callback |
rewardedVideoAdServerRewardDidFail: | Asynchronously requested server verification failure callback |
rewardedVideoAdServerRewardDidFail: error: | Asynchronous request server verification failure callback, this callback method can print the failure reason, that is, print error. Please see the link for details of all error codes. Link |
rewardedVideoAdDidClickSkip: | Click to skip the callback (this function needs to be applied separately, cpm is negatively affected) |
rewardedVideoAdCallback: withType: | This callback can know the ad type of the rewarded video |
By setting the BURewardedVideoAdDelegate agent, get the callback of the click, close, and play completion of the advertisement. For other proxy methods, please refer to BUDRewardedVideoAdViewController class#pragma mark-BURewardedVideoAdDelegate
Rewarded video advertisements need to allow users to actively choose to watch and give users a choice. Users cannot be forced to watch rewarded video advertisements. After the advertisement is played, the user needs to be rewarded accordingly.
Call the showAdFromRootViewController: method to display rewarded video ads, where the currently displayed page needs to be passed in. Be sure to set the rootViewController
, which is the viewController
needed to display ads and jump landing pages
Allow users to watch the advertisement after receiving the callback of rewardedVideoAdVideoDidLoad
, which can ensure smooth playback and smooth display, and a better user experience.
The ads of the same request can only be counted for one impression at most, and repeated impressions will be filtered by the system. Therefore, it is recommended that developers set the original ad object to nil in the rewardedVideoAdDidClose callback after the user has watched the ad to ensure that the ad object is the new request object
For detailed access, please refer to the BUDRewardedVideoAdViewController class in Demo, the advertisement loading request part can refer to the loadRewardVideoAdWithSlotID: method, and the advertisement display part can refer to the showRewardVideoAd method.
Online Customer Service24/7 Online Customer Service BotManual customer service, weekdays 10~ 12 o'clock/14~ 19 o'clock