Conversions API Gateway untuk Multiple Accounts Control Plane API: Referensi

Mendapatkan Metrik Peristiwa Akun berdasarkan Bingkai Waktu

Dapatkan metrik peristiwa spesifik akun di Pixel dan level peristiwa, asalkan admin memiliki akses untuk mengelola akun.

Skema

POST https://{capig_domain}/capig/graphql/ 
_________________________________________________________________________________________________________________
      
query HomeViewQuery($tenantId: ID!, $pixelIds: [String!], $timeWindow: Int) {
  tenantQueries(tenantId: $tenantId) {
    eventMetrics(pixelIds: $pixelIds, timeWindowMin: $timeWindow) {
      activity {
        name
        receivedCount
        publishedCount
        lastUpdated
      }
      incoming {
        eventNamesCount
        eventsCount
      }
      outgoing {
        eventNamesCount
        eventsCount
        publishSuccessRate
      }
    }
  }
}
_________________________________________________________________________________________________________
tenantId: ID!
_______________________________________________________________________________________________________
pixelIds: [String!]
_______________________________________________________________________________________________________      
timeWindow: Int
     

Kolom

KolomDeskripsi

tenantId
ID

Wajib

Pengidentifikasi unik akun

pixelIds
String

Opsional

Daftar ID Pixel yang memerlukan pengambilan metrik peristiwa

timeWindow
Int

Opsional

Jendela waktu dalam hitungan menit (nilai default adalah 60 menit)


Pengembalian

EventMetricsSnapshot

KolomDeskripsi

id
ID

Pengidentifikasi untuk EventMetricsSnapshot -- selalu EventTrafficSummary:incoming

incoming
EventTrafficSummary

Data ringkasan peristiwa masuk

outgoing
ConversionsApiPublishSummary

Data peristiwa keluar

activity
EventActivity

Daftar aktivitas peristiwa

domainActivity
DomainActivity

Daftar aktivitas domain


Kode Kesalahan

KodeDeskripsi

401

Tidak diotorisasi untuk melihat metrik peristiwa

500

Kesalahan server internal


Contoh Permintaan

Kueri

query HomeViewQuery($tenantId: ID!, $pixelIds: [String!], $timeWindow: Int) {
 tenantQueries(tenantId: $tenantId) {
   eventMetrics(pixelIds: $pixelIds, timeWindowMin: $timeWindow) {
     activity {
       name
       receivedCount
       publishedCount
       lastUpdated
     }
     incoming {
       eventNamesCount
       eventsCount
     }
     outgoing {
       eventNamesCount
       eventsCount
       publishSuccessRate
     }
   }
 }
}
     

Variabel

{
 "tenantId": "IaoreXfj",
 "pixelIds": ["18904456377094531"]
}
     

Contoh Tanggapan

{
   "data": {
       "tenantQueries": {
           "eventMetrics": {
               "activity": [
                   {
                       "name": "Purchase_PN_Mar22_Events",
                       "receivedCount": 4,
                       "publishedCount": 0,
                       "lastUpdated": "1678753252000"
                   }
               ],
               "incoming": {
                   "eventNamesCount": 1,
                   "eventsCount": 4
               },
               "outgoing": {
                   "eventNamesCount": 0,
                   "eventsCount": 0,
                   "publishSuccessRate": 0.0
               }
           }
       }
   }
}