Skip to main content

Mini Program Ads

WdAd

Usage Instructions

  • Used to display WeChat ads in Mini Programs, enabling recommended ads to gain impressions and clicks, thereby allowing Mini Programs to generate revenue.

  • Select the rewarded video ad component. After configuring the ad unit id, you can display rewarded video ads by calling the component method.

    Image 65e61107bf3c6338df06507cef8ac4ba

Component Usage Limits

  1. This component must be used in a real Mini Program environment to see the actual effect.

Properties

External properties received by the component

Property Name
Property Identifier
Type
Description
ad typeadTypestring

Different types of ads have different billing rules and display styles. Type Description

Default value: "banner"

ad unit idunitIdstring

Create in the traffic main module of the WeChat public platform (https://mp.weixin.qq.com/)

Ad topicadThemestring

Default value: "white"

Ad refresh intervaladIntervalsnumber

Ads will not automatically refresh when empty. The parameter value must be greater than 30.

Ad automatically refresh interval time in seconds

Grid countgridCountnumber

Ad grid count settings, parameter value selectable 5, 8

Default value: 5

Multi-instance modemultitonboolean
Disable share pagedisableFallbackSharePageboolean

Events

Events exposed by the component. You can listen to component events to trigger external actions

Event Name
Event Code
Event Output Parameters event.detail
Applicable Scenarios
Description
ad load successfullyloadMini Program

-

Ad loading failederrorMini Program

-

Ad closedcloseMini Program

-