Skip to main content

WeChat mini game ad breakdown data integration plan

Last updated 10/03/2026
tip

Note that data generated by third-party data integration counts toward the cluster's data consumption

Summary​

Interface overview​

InterfaceTypeGranularityAttributionCostRevenueImpressionsClicksConversions
Mini game ad breakdown dataAPIAggregated metrics✅✅✅

The WeChat ad analytics data API provides a variety of data reports. The AE system supports mini program/mini game ad breakdown data, so you can get impression, click, and revenue data for each ad unit

Integration process​

  1. Develop an API for getting the WeChat Access Token
  2. Log in to the AE backend, go to the Third-party Integration module, add a WeChat Mini game ad breakdown data integration plan, and complete the related configuration
  3. Check whether the AE system receives the data successfully, and build reports

1. Develop an API for getting the Access Token​

Getting the Access Token from the WeChat platform repeatedly invalidates the previously obtained Access Token. To prevent data pulls from refreshing the Access Token, you need to provide a central control server that gets and refreshes the Access Token in one place, and provide ThinkingAI with an API for getting the Access Token.

The API's Response parameters are the same as those of the official WeChat API:

{
'access_token': '**************',
'expires_in': 7200
}

The parameters are as follows:

ParameterDescription
access_tokenThe obtained credential
expires_inCredential validity period, in seconds

2. Plan configuration​

Next, log in to the AE backend, create an integration plan for WeChat mini game ad breakdown data, and complete the configuration

2.1 Configure authorization information​

First, click the Configure authorization information button in the authorization information section. In the authorization information pop-up, enter the Access Token API that you developed. Make sure that the API is reachable and check the format of the data it returns

2.2 Sync Schedule​

In the Sync Schedule module, you can set the policy for the AE system to pull WeChat ad monetization data on a schedule. You can choose to pull data for a period of time at a specific time every day. Because pulled data also counts toward the data volume, avoid pulling data for overly long periods on a schedule

note

We recommend pulling no more than 90 days at a time. The hint on the configuration page, "The time range can be up to the past 365 days", refers to the historical range that can be pulled, while 90 days is the maximum span of a single request.

2.3 Receive Settings​

You can control whether the data is written as events. If you turn this off, the data is not written to the event table, so do not turn off this setting.

2.4 Configuration​

Finally, you can control the details of data pulling in the integration configuration module, such as the event name after the data is ingested.

The configuration is a JSON, and you can adjust its content as needed

ModuleNameDescription
sink_eventevent_nameEvent name after ingestion; customizable

2.5 Ingestion rules​

  • Because WeChat ad monetization data is returned as aggregated data, we use a fixed value as its user identifier. You can think of all the data as attached to one virtual user
  • The date field in the data, that is, the date of the data, is set as the #event_time of the aggregated data
  • The event name is weixin_publisher_adunit_general
  • Metric fields are ingested as numeric types, and the other fields are ingested as strings
ParameterDescription
dateData date
ad_unit_idAd placement ID
ad_unit_nameAd placement name
ad_slotAd unit type name
req_succ_countSuccessful ad requests
exposure_countImpressions
exposure_rateExposure rate
click_countClicks
click_rateClick-through rate
incomeRevenue (in cents)
ecpmRevenue per thousand ad impressions (in cents)

2.6 Standardized fields​

The following event properties are standardized:

Original fieldStandardized fieldDescription
ad_unit_idte_ads_object.ad_group_idAd placement ID
ad_unit_namete_ads_object.ad_group_nameAd placement name
ad_slotte_ads_object.placementAd unit type name
exposure_countte_ads_object.impressionsImpressions
click_countte_ads_object.clicksClicks
income (divided by 100)te_ads_object.revenueRevenue (in CNY)
CNY (fixed value)te_ads_object.currencyCurrency of the revenue
Was this page helpful?