Campaign Management

Last updated: 12/11/2024

Overview

The Reporting API can be used to manage your campaigns and review the configuration details of your events and ad sets.

Before you begin: You must authenticate with the API, following the steps here.

1. Manage Your Ad Sets

Review the details of your ad set configuration, such as bid amounts, targeting data, and campaign status.

References: Advertiser#adSets field, AdSet type

Query
Result
query {
  advertiser {
    adSets(first: 50) {
      edges {
        node {
          id
          bidding {
            amount
          }
          campaign {
            objective
          }
        }
      }
      pageInfo {
        endCursor
        hasNextPage
      }
    }
  }
}

Change the Bid of an Ad Set

Note: The bid amount returned is represented in micros (1/1,000,000th of a US dollar). For more information, see the Money scalar type documentation.

References: AdSetBiddingUpdateInput type

Mutation
Result
mutation {
  updateAdSetBidding(input: {
    id: "00000000-0000-0000-0000-000000000000",
    bidding: {amount: 1000000}
  }) {
    bidding {
      amount
    }
  }
}

2. Manage Your Multi-Reward Events

See event level information for your Multi-Reward offers, including bid amounts, event names, and event linearity.

Note: All events on an ad set will be returned, regardless of bid amount, status, or number of conversions.

References: MultiRewardEngagementEvent type

Query
Result
{
  adSet(id: "00000000-0000-0000-0000-000000000000") {
    multiRewardEngagementSettings {
      events {
        eventName
        eventValue
        amount
      }
    }
  }
}

Create and Delete Multi-Reward Events

Note: Creating and deleting MultiRewardEngagementEvents is done in a single mutation. You must provide an AdSet ID as well as a list of at least two MultiRewardEngagementEvents. To disable an event, add the disable: true attribute. eventName and eventValue are still required when disabling events to prevent accidental deletions.

References: AdSetBiddingUpdateInput type, MultiRewardEngagementEventInput type

Mutation
Result
mutation {
  updateAdSetBidding(
    input:{
      id: "00000000-0000-0000-0000-000000000000"
      bidding: {
        multiRewardEngagementEvents: [
          {
            eventName:"TUTORIAL_COMPLETE",
            eventValue: "",
            amount: 2200000
          },
          {
            eventName:"LEVEL_ONE",
            eventValue: "",
            amount: 12200000
          },
          {
            eventName:"LEVEL_TWO",
            eventValue: "",
            disable: true
          }
        ]
      }
    }
  ) {
    bidding {
      multiRewardEngagementEvents {
        eventName
        eventValue
        amount
      }
    }
  }
}

3. Manage Your App Specific Configuration

See event level information for Multi-Reward offers with publisher app specific bidding enabled. This will return event information such as bid amounts, event names, and event linearity, separated out by publisher app.

Note: Any non-publisher-app-specific event configurations will be listed under the null app.

References: MultiRewardEngagementEvent type, AppReference type

Query
Result
{
  adSet(id: "00000000-0000-0000-0000-000000000000") {
    multiRewardEngagementSettings {
      app {
        bundleId
      }
      events {
        eventName
        eventValue
        amount
      }
    }
  }
}

Create and Delete Per-App Event Configurations

Note: Just like MultiRewardEngagementEvents, creating and deleting AppBiddingGroups is done in a single mutation. You must provide at least one publisher AppReference ID as well as a list of at least two MultiRewardEngagementEvents. The amount for these events will be used in place of the top-level configured values when a conversion happens inside the given publisher AppReference.

To disable an event or per-app-bid group, add disable: true to the object. Disabling a per-app-bid group automatically disables its' children events. eventName and eventValue are required when disabling events to prevent accidental deletions.

References: AdSetBiddingUpdateInput type, AppBiddingGroupInput type, MultiRewardEngagementEventInput type, AppReference type

Mutation
Result
mutation {
  updateAdSetBidding(
    input:{
      id: "00000000-0000-0000-0000-000000000000"
      bidding: {
        perAppBidGroups: [{
          pubAppId:"<example_publisher_app_id>"
          multiRewardEngagementEvents: [
            {
              eventName:"TUTORIAL_COMPLETE",
              eventValue: "",
              amount: 5500000
            },
            {
              eventName:"LEVEL_ONE",
              eventValue: "",
              disable: true,
            }  
          ]
        },
        {
          pubAppId:"<example_publisher_app_id_2>",
          disable: true
        }],
        multiRewardEngagementEvents: [
          {
            eventName:"TUTORIAL_COMPLETE",
            eventValue: "",
            amount: 2200000
          },
          {
            eventName:"LEVEL_ONE",
            eventValue: "",
            amount: 12200000
          },
          {
            eventName:"LEVEL_TWO",
            eventValue: "",
            disable: true
          }
        ]
      }
    }
  ) {
    bidding {
      multiRewardEngagementEvents {
        eventName
        eventValue
        amount
      }
      perAppBidGroups {
          pubApp {
            id
            name
          }
        }
        multiRewardEngagementEvents {
          eventName
          eventValue
          amount
      }
    }
  }
}