广告管理

上次更新时间:2024年12月11日

概览

Reporting API可用于管理您的广告内容并查看事件和广告的配置详情。

**开始之前:**您必须按照此处 的步骤使用该API进行身份验证。

1. 管理您的应用

添加您的应用

这是您将通过Offerwall变现的应用。您也可以在控制面板中添加应用,具体操作步骤请参考此处

**注意:**您的应用无需在 App Store 或 Google Play 商店上线即可完成此步骤(storeUrl 参数为可选)。

参考:createPublisherApp mutation

mutation createPublisherAppWithStoreUrl {
  createPublisherApp(input: {
    name: "App Created With Store URL",
    platform: ANDROID,
    storeUrl: "https://play.google.com/store/apps/details?id=com.tapjoy.tapout&gl=us",
    orientation: PORTRAIT
  }) {
    app {
      id
      name
      timezone
      realWorldCurrency
    }
  }
}

mutation createPublisherAppWithoutStoreUrl {
  createPublisherApp(input: {
    name: "App Created WithOUT Store URL",
    platform: ANDROID,
    orientation: PORTRAIT,
    currency: KRW,
    timezone: TOKYO_SEOUL
  }) {
    app {
      id
      name
	  timezone
      realWorldCurrency
    }
  }
}

查找应用和展示位置信息

查看应用的展示位置信息,例如展示位置 ID、内容和描述。

参考:Publisher#apps 字段,PublisherApp 类型

Query
Result
query {
  publisher{
    apps(first: 50){
      edges{
        node{
          id
          name
          placements{
            id
            name
            mediationName
          }
        }
      }
      pageInfo {
        endCursor
        hasNextPage
      }
    }
  }
}

查找特定应用ID的Placement信息

参考:Publisher#placements 字段,Placement 类型

Query
Result
query {
  publisher{
    placements(appId: "00000000-0000-0000-0000-000000000000"){
      id
      name
      mediationName
    }
  }
}

2. 管理您的展示位置和广告内容

展示位置是应用中用于展示积分墙的特定区域。广告内容定义了在特定展示位置上展示的广告。

创建展示位置和广告内容

您也可以在控制面板中创建展示位置和广告内容,请按照此处 的说明操作。

参考:createPlacementsAndContents mutation

mutation createPlacementAndContent {
  createPlacementsAndContents(input: {entries: [
    {
      appId: "<PASTE_YOUR_APP_ID_HERE>",
      placementName: "Placement from API"
    }
  ]}) {
    placements {
      id
      name
      description
      contents {
        id
        name
        type
        isSkippable
      }
    }
  }
}

查找广告内容配置

查看广告内容ID、类型以及任何已配置A/B测试的状态等信息。

参考:Placement#contents 字段,ContentCard 类型

Query
Result
query {
  publisher {
    placements (appId:"00000000-0000-0000-0000-000000000000") {
      id
      name
      contents {
        id
        name
      }
    }
  }
}

3. 管理您的虚拟货币

使用Tapjoy进行变现需要设置虚拟货币。您需要提供应用ID、货币名称、兑换比率和期限。 有关虚拟货币的更多详情,请参阅此处

创建虚拟货币

要在API中执行此操作,您需要提供应用 ID、货币名称、汇率和期限。您也可以在控制面板中创建虚拟货币,请按照此处 的说明操作。

参考:createCurrency mutation

mutation createCurrency {
  createCurrency(input: {
    appId: "<PASTE_YOUR_APP_ID_HERE>",
    name: "New Virtual Currency",
    exchangeRate: 100,
    maturity: MEDIUM
  }) {
    currency {
      id
      name
      exchangeRate
      initialBalance
      maturity
    }
  }
}

更新虚拟货币

虚拟货币也可以使用以下操作进行更新。 参考:updateCurrency mutation

mutation updateCurrency {
  updateCurrency(input: {
    id: "<CURRENCY_ID>",
    maturity: HIGH,
    name: "Shell Bells",
    initialBalance: 100
  }) {
    currency {
      id
      name
      exchangeRate
      initialBalance
      maturity
      callbackUrl
    }
  }
}