HomeDocs
Skip to main content

Native Ad Component

Introduction​

Native ad component.

Attribute Description​

Attribute NameTypeRequiredDefaultDescriptionMinimum Version
app-idstringYesTotal application ID for the mini program (obtained from hisavana platform configuration)2.2.0
code-seat-idstringYesCode seat ID for the mini program (obtained from hisavana platform configuration)2.2.0
code-seat-typestringYes1Native ad component, set as "1"; filling any other value may lead to ad request failure2.8.0
bindloadEventHandleNoCallback for successful ad loading.2.2.0
binderrorEventHandleNoCallback for failed ad loading.2.2.0
bindcloseEventHandleNoCallback for ad closing.2.2.0

Ad Type Description​

ValueTypeDescription
1stringNative ad component
2stringBanner ad
3stringInterstitial ad
4stringSplash ad
5stringRewarded Video ad

Example​

<!-- pages/index/index.dlt -->
<view>
<ad
code-seat-id="xxx"
app-id="xxx"
code-seat-type="1"
bind:binderror="handleAdError"
>
</ad>
</view>
// pages/index/index.js
Page({
handleAdError() {
console.log("ad error");
},
});
Privacy agreementDeveloper agreementcontact us: developer_private.mi@dlightek.com © 2024 MiniApp. All Rights Reserved.