WeChat mini game ad summary data integration plan
Note that data generated by third-party data integration counts toward the cluster's data consumption
Summary
Interface overview
| Interface | Type | Granularity | Attribution | Cost | Revenue | Impressions | Clicks | Conversions |
|---|---|---|---|---|---|---|---|---|
| Mini game ad summary data | API | Aggregated metrics | ✅ | ✅ | ✅ |
The WeChat ad analytics data API provides a variety of data reports. The AE system supports mini program/mini game ad summary data, so you can get impression, click, and revenue data for each ad unit
Integration process
- Develop an API for getting the WeChat Access Token
- Log in to the AE backend, go to the Third-party Integration module, add a WeChat ad analytics data API plan, and complete the related configuration
- 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:
| Parameter | Description |
|---|---|
| access_token | The obtained credential |
| expires_in | Credential validity period, in seconds |
2. Plan configuration
Next, log in to the AE backend, create an integration plan for WeChat mini game ad summary 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
We recommend pulling no more than 90 days at a time, which is the maximum time span of a single request to the WeChat API. The hint on the configuration page, "The time range can be up to the past 365 days", refers to the range of historical data that can be pulled. The two mean different things.
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
| Module | Name | Description |
|---|---|---|
| sink_event | event_name | Event 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_adpos_general
- Metric fields are ingested as numeric types, and the other fields are ingested as strings
| Parameter | Description |
|---|---|
| slot_id | Ad unit type ID |
| ad_slot | Ad unit type name |
| date | Data date |
| req_succ_count | Successful ad requests |
| exposure_count | Impressions |
| exposure_rate | Exposure rate |
| click_count | Clicks |
| click_rate | Overall click-through rate |
| income | Revenue (in cents) |
| ecpm | Revenue per thousand ad impressions (in cents) |
2.6 Standardized fields
The following event properties are standardized:
| Original field | Standardized field | Description |
|---|---|---|
| ad_slot | te_ads_object.placement | Ad unit type name |
| exposure_count | te_ads_object.impressions | Impressions |
| click_count | te_ads_object.clicks | Clicks |
| income (divided by 100) | te_ads_object.revenue | Revenue (in CNY) |
| CNY (fixed value) | te_ads_object.currency | Currency of the revenue |

