Canvas-Daten-Zusammenfassung Analytics exportieren
/canvas/data_summary
Verwenden Sie diesen Endpunkt, um Rollups von Zeitreihendaten für ein Canvas zu exportieren und so eine prägnante Zusammenfassung der Canvas-Ergebnisse zu erhalten.
Voraussetzungen
Um diesen Endpunkt zu verwenden, benötigen Sie einen API-Schlüssel mit der Berechtigung canvas.data_summary.
Rate-Limit
Wir wenden auf diesen Endpunkt das standardmäßige Braze-Rate-Limit von 250.000 Anfragen pro Stunde an, wie in API-Rate-Limits dokumentiert.
Anfrageparameter
| Parameter | Erforderlich | Datentyp | Beschreibung |
|---|---|---|---|
canvas_id |
Erforderlich | String | Siehe Canvas-API-Bezeichner. |
ending_at |
Erforderlich | Datetime (ISO-8601-String) |
Enddatum für den Datenexport. Standardmäßig wird der Zeitpunkt der Anfrage verwendet. |
starting_at |
Optional* | Datetime (ISO-8601-String) |
Startdatum für den Datenexport. * Entweder length oder starting_at ist erforderlich. |
length |
Optional* | String | Maximale Anzahl von Tagen vor ending_at, die in die zurückgegebene Reihe aufgenommen werden. Muss zwischen 1 und 14 (einschließlich) liegen. * Entweder length oder starting_at ist erforderlich. |
include_variant_breakdown |
Optional | Boolescher Wert | Ob Variantenstatistiken einbezogen werden sollen (Standardwert ist false). |
include_step_breakdown |
Optional | Boolescher Wert | Ob Schrittstatistiken einbezogen werden sollen (Standardwert ist false). |
include_deleted_step_data |
Optional | Boolescher Wert | Ob Schrittstatistiken für gelöschte Schritte einbezogen werden sollen (Standardwert ist false). |

Canvas-Analytics werden täglich in der für Ihr Unternehmen in Braze konfigurierten Zeitzone aggregiert (dieselbe Zeitzone, die das Dashboard verwendet). Die API normalisiert starting_at und ending_at auf Mitternacht in dieser Zeitzone. Stellen Sie sicher, dass Ihre Zeitstempel mit der Zeitzone Ihres Unternehmens übereinstimmen, damit Ihre Statistiken mit dem Dashboard übereinstimmen. Wenn die Zeitzone Ihres Unternehmens beispielsweise UTC+2 ist, sollte der Zeitstempel 0:00 Uhr UTC+2 sein.
Beispielanfrage
1
2
curl --location -g --request GET 'https://rest.iad-01.braze.com/canvas/data_summary?canvas_id={{canvas_id}}&ending_at=2018-05-30T23:59:59-05:00&starting_at=2018-05-28T23:59:59-05:00&length=5&include_variant_breakdown=true&include_step_breakdown=true&include_deleted_step_data=true' \
--header 'Authorization: Bearer YOUR-REST-API-KEY'
Antwort
Konversions-Event-Felder
Die Antwort enthält ein Paar von Konversionsfeldern für jedes im Canvas konfigurierte Konversions-Event. Das primäre Konversions-Event verwendet conversions und conversions_by_entry_time. Jedes weitere Event verwendet denselben Basisnamen mit einem numerischen Suffix, das bei 1 für das zweite Event beginnt und für jedes weitere Event um eins erhöht wird.
| Reihenfolge der Konversions-Events im Canvas | Konversionsfeld | Feld nach Eintrittszeit |
|---|---|---|
| Primär | conversions |
conversions_by_entry_time |
| Zweites | conversions1 |
conversions1_by_entry_time |
| Drittes | conversions2 |
conversions2_by_entry_time |
| Viertes | conversions3 |
conversions3_by_entry_time |
Fünfte und spätere Events folgen demselben Muster (zum Beispiel conversions4 und conversions4_by_entry_time). Diese Felder erscheinen in total_stats und, wenn Sie Aufschlüsselungen anfordern, in variant_stats und step_stats unter denselben Namen.

In total_stats, variant_stats und step_stats gibt conversions die Anzahl für das primäre Konversions-Event des Canvas an. Wenn Sie zusätzliche Konversions-Events konfigurieren, kann die Payload auch conversions1, conversions2 und höher indizierte Felder für das zweite, dritte und weitere Events enthalten. Dies ähnelt der multivariaten Antwort für den Endpunkt /campaigns/data_series. Sofern vorhanden, ordnen Felder, die auf _by_entry_time enden, diese Conversions der Canvas-Eintrittszeit zu.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"data": {
"name": (string) the Canvas name,
"total_stats": {
"revenue": (float) the number of dollars of revenue (USD),
"entries": (int) the number of entries,
"conversions": (int) the number of conversions for the primary conversion event,
"conversions_by_entry_time": (int) the number of conversions for the primary conversion event by entry time,
"conversions1": (optional, int) the number of conversions for the second conversion event,
"conversions1_by_entry_time": (optional, int) the number of conversions for the second conversion event by entry time,
"conversions2": (optional, int) the number of conversions for the third conversion event,
"conversions2_by_entry_time": (optional, int) the number of conversions for the third conversion event by entry time,
"conversions3": (optional, int) the number of conversions for the fourth conversion event,
"conversions3_by_entry_time": (optional, int) the number of conversions for the fourth conversion event by entry time
},
"variant_stats": (optional) {
"00000000-0000-0000-0000-0000000000000": (string) the API identifier for the variant {
"name": (string) the name of the variant,
"revenue": (float) the number of dollars of revenue (USD),
"conversions": (int) the number of conversions for the primary conversion event,
"conversions_by_entry_time": (optional, int) the number of conversions for the primary conversion event by entry time,
"conversions1": (optional, int) the number of conversions for the second conversion event,
"conversions1_by_entry_time": (optional, int) the number of conversions for the second conversion event by entry time,
"conversions2": (optional, int) the number of conversions for the third conversion event,
"conversions2_by_entry_time": (optional, int) the number of conversions for the third conversion event by entry time,
"conversions3": (optional, int) the number of conversions for the fourth conversion event,
"conversions3_by_entry_time": (optional, int) the number of conversions for the fourth conversion event by entry time,
"entries": (int) the number of entries
},
... (more variants)
},
"step_stats": (optional) {
"00000000-0000-0000-0000-0000000000000": (string) the API identifier for the step {
"name": (string) the name of the step,
"revenue": (float) the number of dollars of revenue (USD),
"conversions": (int) the number of conversions for the primary conversion event,
"conversions_by_entry_time": (int) the number of conversions for the primary conversion event by entry time,
"conversions1": (optional, int) the number of conversions for the second conversion event,
"conversions1_by_entry_time": (optional, int) the number of conversions for the second conversion event by entry time,
"conversions2": (optional, int) the number of conversions for the third conversion event,
"conversions2_by_entry_time": (optional, int) the number of conversions for the third conversion event by entry time,
"conversions3": (optional, int) the number of conversions for the fourth conversion event,
"conversions3_by_entry_time": (optional, int) the number of conversions for the fourth conversion event by entry time,
"messages": {
"android_push": (name of channel) [
{
"sent": (int) the number of sends,
"opens": (int) the number of opens,
"influenced_opens": (int) the total number of opens (includes both direct opens and influenced opens),
"bounces": (int) the number of bounces
... (more stats for channel)
}
],
... (more channels)
}
},
... (more steps)
}
},
"message": (required, string) the status of the export, returns 'success' on successful completion
}

In der API-Antwort gibt das Feld influenced_opens die Gesamtzahl der Öffnungen an (sowohl direkte als auch beeinflusste Öffnungen zusammen). Im Braze-Dashboard bezieht sich „beeinflusste Öffnungen“ ausschließlich auf beeinflusste Öffnungen, wobei direkte Öffnungen ausgeschlossen sind. Dies ist auf eine veraltete Namenskonvention in der API zurückzuführen.