Publishing an Ad Campaign via API
Describes how to create campaigns and handle approval requests by API
Introduction
This tutorial explains how to implement, via API, the guide introduced in A2 Getting Started: Basic Usage. In this guide, you will learn how to define ad placements and configure image banner advertisements.
An access token is required to follow the examples below. If you have not yet generated one, please refer to the following article: Getting api access token.
A budget is required to register an advertising campaign. Before proceeding, make sure to allocate a budget to the administrator account.
Create Placement
Add an placementwhere the ads will be served. In this example, we will create a placement with the following conditions:
ext.display.enabled=1
: Allows campaign with display creatives to run on this placement.display.{w, h}
: Sets the placement size to 300 px (width) by 250 px (height).ext.responsive=resize
: Dynamically adjusts the size of the creative to fit the placement.ext.approval_method=admin
: Requires administrator approval before ads can be served on this placement.
Create Campaign
An advertising campaign is an advertising activity unit that enables you to run specific ads according to your goals and measure their performance.
We will create a campaign aimed at maximizing impressions (impression, maximize_volume) within a given budget over a specified period.
If campaign creation fails, please check the error message for more details.
Create Creative
We will register the advertising creative that will be shown on the placement when the campaign is served. Campaign creatives can include images, videos, or native ads, among others.
Note: The types of creatives allowed may differ depending on the placement.
Request Publish
Once the campaign and creatives are registered, you can request ad serving on the placement where you wish to run the campaign. At least one creative must be active and must match the format of the targeted placement.
Create a new allocation to submit the publishing request.
Approval and Rejection of Publishing Requests
The requested placement for ad serving requires approval. The creative or links used in the campaign may not comply with the placement’s settings or internal operating guidelines. If, based on the review, the campaign is approved or rejected, you can update its status using the Campaign Information Update API. You can also communicate the reason for rejection by setting last_comment field.
Status Code
code | description |
---|---|
pending | Initial state |
requested | publish requested |
published | published |
rejected | Rejected |
canceled | canceled |
finished | finished |
Campaign Launch and Performance Measurement
Once your campaign is approved, the ad will start showing immediately. Campaign metrics are collected and managed for each ad served. This data can help to be more effective campaign strategy.
Performance Analysis
You can assess a campaign’s performance using APIs that provide data for any desired time interval, such as daily or hourly.