Menu

Meta Ads Advertising Integration Solution

Applicable to SA3.0.4 and above.

This feature is controlled by a separate license. Please contact your account manager if you require it.

If your app is running overseas ads to acquire new users and you want to obtain aggregated ad data (such as impressions, clicks, and sales) from overseas advertising platforms to the Sensors Data platform, you can use this function.

Function Overview

It supports integration with Meta Ads (Facebook Ads), enabling the retrieval of ad-level data, such as impressions, clicks, and sales, through its open API. The retrieved data is then stored in Sensors Analytics as events, allowing for analysis within the analytics model. It can also be correlated with user behavior data in subsequent stages of the process for further analysis.

interface
Data granularity
Data update frequency
Attribution
cost
exhibit
Click
Transformation
Insights API Aggregated data Tianliu  

Function Entry

Channel Tracking > Third-Party Data Integration > Advertising Ecosystem > Meta Ads

Access Instructions

Meta Ads Data Explanation

It supports retrieving ad data via the Meta Ads Ad Insight API; this is an Ad-level template. For API details, please refer to: Meta Ads API

It includes 4 built-in templates, covering commonly used advertising metrics and dimensions.

  • Ad Group Ad Template: Ad data at the Ad tier. The original content can be found in the official documentation . The metrics and dimensions obtainable through this template are as follows:
metrics
  • metrics.all_conversions
  • metrics.all_conversions_value
  • metrics.active_view_impressions
  • metrics.active_view_cpm
  • metrics.active_view_ctr
  • metrics.impressions
  • metrics.clicks
  • metrics.conversions
  • metrics.cost_micros
  • metrics.cost_per_all_conversions
  • metrics.cost_per_conversion
  • metrics.average_cost
  • metrics.average_cpc
  • metrics.average_cpe
  • metrics.average_cpm
  • metrics.average_cpv
  • metrics.ctr
  • metrics.value_per_all_conversions
  • metrics.value_per_all_conversions_by_conversion_date
  • metrics.value_per_conversion
  • metrics.value_per_conversions_by_conversion_date
group by
  • customer.id
  • customer.status
  • customer.time_zone
  • customer.currency_code
  • campaign.id
  • campaign.name
  • campaign.status
  • campaign.app_campaign_setting.app_id
  • campaign.advertising_channel_type
  • campaign.advertising_channel_sub_type
  • ad_group.id
  • ad_group.name
  • ad_group.status
  • ad_group.type
  • ad_group_ad.ad.id
  • ad_group_ad.ad.name
  • ad_group_ad.ad.type
  • ad_group_ad.status
  • segments.date
  • segments.ad_network_type
  • segments.slot

Preparation before access

You need to complete authorization and authentication with Meta Ads before you can obtain advertising data through the Meta Ads API. For details, please refer to the official documentation: Meta Ads API Official Documentation

step content illustrate
first step Create an application

Log in to the Meta for Developers backend and create an application.

  1. Enter the application name
  2. Select the use case that uses the Marketing API to measure ad performance data for subsequent retrieval of aggregated ad data from the Meta Ads account.
  3. In the app settings - advanced options, find the authorized advertising account and enter the advertising account ID you want to use for subsequent user acquisition and push notifications here.

Step 2 Add the application as a business asset

Log in to the Meta Business Suite backend, navigate to the Ads Management Tools platform, then click All Tools and find Business Settings.

  1. Add the application you created in step one in Account - Applications
  2. Locate the user - system user. If a system user already exists, select the existing system user from the designated personnel, select "Assign Assets," and add the application and advertising accounts as assets for that system user. Proceed to step four below.
  3. If there are no system users, proceed to step three below.

Step 3 Create system user
  1. Create a new system user under Users - System Users, and select the role as admin.
  2. In the upper right corner, select "Assign Assets" and add the advertising accounts from which you will subsequently pull data, as well as the application created in the first step, as assets.

Step 4 Create password

Generate system user passwords

  1. Select application
  2. Set an expiration date and set it to never.
  3. Select permissions, and check ads_management, ads_read, and business_management.

Step 5 Use password In the solution for integrating with Meta Ads, enter the password generated in step four in the Access Token field.

Configure Meta Ads access solution

The configuration mainly includes the following three parts:

1. Basic Information of the Plan

2. Authorization Configuration

    • The fields entered in this section are primarily used for authentication with Meta Ads and to specify the range of ad accounts to be retrieved. Please refer to the "Preparation Before Integration" section in the previous paragraph to obtain the relevant fields from the Meta Ads platform.
    • It supports fetching data from a maximum of 100 Meta Ads accounts. If a user has more than 100 Meta Ads accounts, multiple fetching plans can be created.
    • Before saving the solution, you need to complete the "connectivity test" to ensure that the Access Token entered here has the necessary permissions to access the Customer ID.
    • A connectivity test is required when modifying the Access Token and Customer ID. Failure to pass the test will be indicated by an Error Code.

3. Data retrieval configuration

Data backtracking

It supports "data backtracking" and allows users to select a time period of up to 180 days to retrieve advertising data within that period.

Data import instructions

The retrieved Meta Ads data is stored in the database as events. The original fields are standardized and stored as attributes starting with "sensors_ad".

The event will use a fixed value as its user identifier, which can be understood as a virtual user identifier.

Event name: meta_ads_ad_insight

The following lists some common raw data and their corresponding database attributes:

Original field Input fields
account_id sensors_ad_customer_id
account_name sensors_ad_customer_name
account_timezone sensors_ad_customer_timezone
account_currency sensors_ad_customer_currency
media _source sensors_ad_media_source
campaign_id sensors_ad_campaign_id
campaign_name sensors_ad_campaign_name
adset_id sensors_ad_ad_group_id
adset_name sensors_ad_ad_group_name
ad_id sensors_ad_ad_id
ad_name sensors_ad_ad_name
country sensors_ad_country
impressions sensors_ad_metrics_impressions
clicks sensors_ad_metrics_clicks
spend sensors_ad_metrics_cost
reach sensors_ad_metrics_reach

Analyze in the analytical model

After storing Meta Ads data as events in the database, you can select the corresponding event in event analysis to analyze metrics such as Meta Ads impressions, clicks, and spending.

Permissions

Administrators have the default privilege to configure Meta Ads schemes. They can also assign configuration and viewing permissions to regular users.

Previous
Google Ads advertising integration solution
Next
Third-party Data Integration
Last modified: 2026-06-15