late-sdk 0.0.714 → 0.0.715

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7399f221b1d5acf2f70170084ea9f0e9925f047fa2c48bf8135321c2755c2262
4
- data.tar.gz: 80346e97094eae3105d3357f1971fe80afc40dfa395d8177f191503ebd02a2d0
3
+ metadata.gz: 5b1da97d182877ef9205f03e013ea863718df3480442903d47395fcbe11f6029
4
+ data.tar.gz: 99263fe1df8286f58d6df8aa77ebb2100e64160f26860eae98ba5d572c3716c4
5
5
  SHA512:
6
- metadata.gz: 325afc2f3145f6427034da3770029434ce739014f2331a248041429d541cff6e413db778f81d91312aa3a1c3c9372e68b8257a50b4c1acbba1bb3f0cbf6a12a7
7
- data.tar.gz: 48001f8f481e38763cfa244c927261aae6c8e6be42d8bf452e382bdf610b052c786563530cb35cd2c67da91a995f62b7fc1784d1b1b8e5d36dd055c8594f3ae1
6
+ metadata.gz: f854642f6281091dea0a7fd7c6fa37484da523808ef7f70a851e01064b73263c9c217a39087d67a783ff33bff0a6447a352cac94d1a5893994c8cda4b6825a2c
7
+ data.tar.gz: c356b8f1104b841de0041a423892ef5a8ca45e1f154ee1ad22ac5a8a06de11673e1f152cd3b542821fe2027d8894540e3b9c32e2ba37b1481333a8789b6bfa11
@@ -18,6 +18,13 @@
18
18
  | **action_values** | **Hash<String, Float>** | Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
19
19
  | **purchase_value** | **Float** | Convenience sum of purchase-type action values — picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only. | [optional] |
20
20
  | **roas** | **Float** | Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level. | [optional] |
21
+ | **cost_per_action** | **Hash<String, Float>** | Derived `spend / actions[type]` for every action type with a non-zero count, in ad-account native currency. Same keys as `actions`. Rounded to 4 decimals because cheap actions cost well under a cent. Recomputed from summed spend + counts at every rollup level. Empty object when spend is 0 or no actions are reported. | [optional] |
22
+ | **outbound_clicks** | **Integer** | Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0. | [optional] |
23
+ | **outbound_clicks_ctr** | **Float** | Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level. | [optional] |
24
+ | **inline_link_clicks** | **Integer** | In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only. | [optional] |
25
+ | **inline_link_click_ctr** | **Float** | Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level. | [optional] |
26
+ | **unique_clicks** | **Integer** | People who clicked at least once. NOT additive: summed across days/children it overcounts people who clicked on multiple days or ads, so treat rollups as an upper bound (same caveat as `reach`). Meta-only. | [optional] |
27
+ | **unique_ctr** | **Float** | Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`. | [optional] |
21
28
  | **video_play_actions** | **Integer** | Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`. | [optional] |
22
29
  | **video30_sec_watched_actions** | **Integer** | Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only). | [optional] |
23
30
  | **video_thruplay_watched_actions** | **Integer** | ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only). | [optional] |
@@ -53,6 +60,13 @@ instance = Zernio::AdDailyMetrics.new(
53
60
  action_values: {offsite_conversion.fb_pixel_purchase=2456.78, offsite_conversion.fb_pixel_add_to_cart=980.5},
54
61
  purchase_value: null,
55
62
  roas: null,
63
+ cost_per_action: {link_click=0.1052, offsite_conversion.fb_pixel_purchase=4.0114},
64
+ outbound_clicks: null,
65
+ outbound_clicks_ctr: null,
66
+ inline_link_clicks: null,
67
+ inline_link_click_ctr: null,
68
+ unique_clicks: null,
69
+ unique_ctr: null,
56
70
  video_play_actions: null,
57
71
  video30_sec_watched_actions: null,
58
72
  video_thruplay_watched_actions: null,
@@ -12,7 +12,7 @@
12
12
  | **saves** | **Integer** | Saves of the ad's post (`onsite_conversion.post_save`). | [optional] |
13
13
  | **page_likes** | **Integer** | New Page likes attributed to the ad (`like`). | [optional] |
14
14
  | **video_views** | **Integer** | 3-second video views (`video_view`). For completion-based counts use `videoThruplayWatchedActions`. | [optional] |
15
- | **link_clicks** | **Integer** | Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session `inline_link_clicks` reported by `GET /v1/ads/{adId}/analytics`. | [optional] |
15
+ | **link_clicks** | **Integer** | Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session count in the sibling `inlineLinkClicks` field. | [optional] |
16
16
 
17
17
  ## Example
18
18
 
data/docs/AdMetrics.md CHANGED
@@ -18,6 +18,13 @@
18
18
  | **action_values** | **Hash<String, Float>** | Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
19
19
  | **purchase_value** | **Float** | Convenience sum of purchase-type action values — picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only. | [optional] |
20
20
  | **roas** | **Float** | Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level. | [optional] |
21
+ | **cost_per_action** | **Hash<String, Float>** | Derived `spend / actions[type]` for every action type with a non-zero count, in ad-account native currency. Same keys as `actions`. Rounded to 4 decimals because cheap actions cost well under a cent. Recomputed from summed spend + counts at every rollup level. Empty object when spend is 0 or no actions are reported. | [optional] |
22
+ | **outbound_clicks** | **Integer** | Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0. | [optional] |
23
+ | **outbound_clicks_ctr** | **Float** | Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level. | [optional] |
24
+ | **inline_link_clicks** | **Integer** | In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only. | [optional] |
25
+ | **inline_link_click_ctr** | **Float** | Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level. | [optional] |
26
+ | **unique_clicks** | **Integer** | People who clicked at least once. NOT additive: summed across days/children it overcounts people who clicked on multiple days or ads, so treat rollups as an upper bound (same caveat as `reach`). Meta-only. | [optional] |
27
+ | **unique_ctr** | **Float** | Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`. | [optional] |
21
28
  | **video_play_actions** | **Integer** | Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`. | [optional] |
22
29
  | **video30_sec_watched_actions** | **Integer** | Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only). | [optional] |
23
30
  | **video_thruplay_watched_actions** | **Integer** | ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only). | [optional] |
@@ -52,6 +59,13 @@ instance = Zernio::AdMetrics.new(
52
59
  action_values: {offsite_conversion.fb_pixel_purchase=2456.78, offsite_conversion.fb_pixel_add_to_cart=980.5},
53
60
  purchase_value: null,
54
61
  roas: null,
62
+ cost_per_action: {link_click=0.1052, offsite_conversion.fb_pixel_purchase=4.0114},
63
+ outbound_clicks: null,
64
+ outbound_clicks_ctr: null,
65
+ inline_link_clicks: null,
66
+ inline_link_click_ctr: null,
67
+ unique_clicks: null,
68
+ unique_ctr: null,
55
69
  video_play_actions: null,
56
70
  video30_sec_watched_actions: null,
57
71
  video_thruplay_watched_actions: null,
@@ -18,6 +18,13 @@
18
18
  | **action_values** | **Hash<String, Float>** | Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
19
19
  | **purchase_value** | **Float** | Convenience sum of purchase-type action values — picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only. | [optional] |
20
20
  | **roas** | **Float** | Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level. | [optional] |
21
+ | **cost_per_action** | **Hash<String, Float>** | Derived `spend / actions[type]` for every action type with a non-zero count, in ad-account native currency. Same keys as `actions`. Rounded to 4 decimals because cheap actions cost well under a cent. Recomputed from summed spend + counts at every rollup level. Empty object when spend is 0 or no actions are reported. | [optional] |
22
+ | **outbound_clicks** | **Integer** | Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0. | [optional] |
23
+ | **outbound_clicks_ctr** | **Float** | Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level. | [optional] |
24
+ | **inline_link_clicks** | **Integer** | In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only. | [optional] |
25
+ | **inline_link_click_ctr** | **Float** | Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level. | [optional] |
26
+ | **unique_clicks** | **Integer** | People who clicked at least once. NOT additive: summed across days/children it overcounts people who clicked on multiple days or ads, so treat rollups as an upper bound (same caveat as `reach`). Meta-only. | [optional] |
27
+ | **unique_ctr** | **Float** | Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`. | [optional] |
21
28
  | **video_play_actions** | **Integer** | Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`. | [optional] |
22
29
  | **video30_sec_watched_actions** | **Integer** | Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only). | [optional] |
23
30
  | **video_thruplay_watched_actions** | **Integer** | ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only). | [optional] |
@@ -53,6 +60,13 @@ instance = Zernio::GetCampaignAnalytics200ResponseAnalyticsDailyInner.new(
53
60
  action_values: {offsite_conversion.fb_pixel_purchase=2456.78, offsite_conversion.fb_pixel_add_to_cart=980.5},
54
61
  purchase_value: null,
55
62
  roas: null,
63
+ cost_per_action: {link_click=0.1052, offsite_conversion.fb_pixel_purchase=4.0114},
64
+ outbound_clicks: null,
65
+ outbound_clicks_ctr: null,
66
+ inline_link_clicks: null,
67
+ inline_link_click_ctr: null,
68
+ unique_clicks: null,
69
+ unique_ctr: null,
56
70
  video_play_actions: null,
57
71
  video30_sec_watched_actions: null,
58
72
  video_thruplay_watched_actions: null,
@@ -54,6 +54,27 @@ module Zernio
54
54
  # Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
55
55
  attr_accessor :roas
56
56
 
57
+ # Derived `spend / actions[type]` for every action type with a non-zero count, in ad-account native currency. Same keys as `actions`. Rounded to 4 decimals because cheap actions cost well under a cent. Recomputed from summed spend + counts at every rollup level. Empty object when spend is 0 or no actions are reported.
58
+ attr_accessor :cost_per_action
59
+
60
+ # Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0.
61
+ attr_accessor :outbound_clicks
62
+
63
+ # Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level.
64
+ attr_accessor :outbound_clicks_ctr
65
+
66
+ # In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only.
67
+ attr_accessor :inline_link_clicks
68
+
69
+ # Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level.
70
+ attr_accessor :inline_link_click_ctr
71
+
72
+ # People who clicked at least once. NOT additive: summed across days/children it overcounts people who clicked on multiple days or ads, so treat rollups as an upper bound (same caveat as `reach`). Meta-only.
73
+ attr_accessor :unique_clicks
74
+
75
+ # Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`.
76
+ attr_accessor :unique_ctr
77
+
57
78
  # Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`.
58
79
  attr_accessor :video_play_actions
59
80
 
@@ -111,6 +132,13 @@ module Zernio
111
132
  :'action_values' => :'actionValues',
112
133
  :'purchase_value' => :'purchaseValue',
113
134
  :'roas' => :'roas',
135
+ :'cost_per_action' => :'costPerAction',
136
+ :'outbound_clicks' => :'outboundClicks',
137
+ :'outbound_clicks_ctr' => :'outboundClicksCtr',
138
+ :'inline_link_clicks' => :'inlineLinkClicks',
139
+ :'inline_link_click_ctr' => :'inlineLinkClickCtr',
140
+ :'unique_clicks' => :'uniqueClicks',
141
+ :'unique_ctr' => :'uniqueCtr',
114
142
  :'video_play_actions' => :'videoPlayActions',
115
143
  :'video30_sec_watched_actions' => :'video30SecWatchedActions',
116
144
  :'video_thruplay_watched_actions' => :'videoThruplayWatchedActions',
@@ -155,6 +183,13 @@ module Zernio
155
183
  :'action_values' => :'Hash<String, Float>',
156
184
  :'purchase_value' => :'Float',
157
185
  :'roas' => :'Float',
186
+ :'cost_per_action' => :'Hash<String, Float>',
187
+ :'outbound_clicks' => :'Integer',
188
+ :'outbound_clicks_ctr' => :'Float',
189
+ :'inline_link_clicks' => :'Integer',
190
+ :'inline_link_click_ctr' => :'Float',
191
+ :'unique_clicks' => :'Integer',
192
+ :'unique_ctr' => :'Float',
158
193
  :'video_play_actions' => :'Integer',
159
194
  :'video30_sec_watched_actions' => :'Integer',
160
195
  :'video_thruplay_watched_actions' => :'Integer',
@@ -261,6 +296,36 @@ module Zernio
261
296
  self.roas = attributes[:'roas']
262
297
  end
263
298
 
299
+ if attributes.key?(:'cost_per_action')
300
+ if (value = attributes[:'cost_per_action']).is_a?(Hash)
301
+ self.cost_per_action = value
302
+ end
303
+ end
304
+
305
+ if attributes.key?(:'outbound_clicks')
306
+ self.outbound_clicks = attributes[:'outbound_clicks']
307
+ end
308
+
309
+ if attributes.key?(:'outbound_clicks_ctr')
310
+ self.outbound_clicks_ctr = attributes[:'outbound_clicks_ctr']
311
+ end
312
+
313
+ if attributes.key?(:'inline_link_clicks')
314
+ self.inline_link_clicks = attributes[:'inline_link_clicks']
315
+ end
316
+
317
+ if attributes.key?(:'inline_link_click_ctr')
318
+ self.inline_link_click_ctr = attributes[:'inline_link_click_ctr']
319
+ end
320
+
321
+ if attributes.key?(:'unique_clicks')
322
+ self.unique_clicks = attributes[:'unique_clicks']
323
+ end
324
+
325
+ if attributes.key?(:'unique_ctr')
326
+ self.unique_ctr = attributes[:'unique_ctr']
327
+ end
328
+
264
329
  if attributes.key?(:'video_play_actions')
265
330
  self.video_play_actions = attributes[:'video_play_actions']
266
331
  end
@@ -352,6 +417,13 @@ module Zernio
352
417
  action_values == o.action_values &&
353
418
  purchase_value == o.purchase_value &&
354
419
  roas == o.roas &&
420
+ cost_per_action == o.cost_per_action &&
421
+ outbound_clicks == o.outbound_clicks &&
422
+ outbound_clicks_ctr == o.outbound_clicks_ctr &&
423
+ inline_link_clicks == o.inline_link_clicks &&
424
+ inline_link_click_ctr == o.inline_link_click_ctr &&
425
+ unique_clicks == o.unique_clicks &&
426
+ unique_ctr == o.unique_ctr &&
355
427
  video_play_actions == o.video_play_actions &&
356
428
  video30_sec_watched_actions == o.video30_sec_watched_actions &&
357
429
  video_thruplay_watched_actions == o.video_thruplay_watched_actions &&
@@ -377,7 +449,7 @@ module Zernio
377
449
  # Calculates hash code according to all attributes.
378
450
  # @return [Integer] Hash code
379
451
  def hash
380
- [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at, date].hash
452
+ [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, cost_per_action, outbound_clicks, outbound_clicks_ctr, inline_link_clicks, inline_link_click_ctr, unique_clicks, unique_ctr, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at, date].hash
381
453
  end
382
454
 
383
455
  # Builds the object from hash
@@ -40,7 +40,7 @@ module Zernio
40
40
  # 3-second video views (`video_view`). For completion-based counts use `videoThruplayWatchedActions`.
41
41
  attr_accessor :video_views
42
42
 
43
- # Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session `inline_link_clicks` reported by `GET /v1/ads/{adId}/analytics`.
43
+ # Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session count in the sibling `inlineLinkClicks` field.
44
44
  attr_accessor :link_clicks
45
45
 
46
46
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -53,6 +53,27 @@ module Zernio
53
53
  # Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
54
54
  attr_accessor :roas
55
55
 
56
+ # Derived `spend / actions[type]` for every action type with a non-zero count, in ad-account native currency. Same keys as `actions`. Rounded to 4 decimals because cheap actions cost well under a cent. Recomputed from summed spend + counts at every rollup level. Empty object when spend is 0 or no actions are reported.
57
+ attr_accessor :cost_per_action
58
+
59
+ # Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0.
60
+ attr_accessor :outbound_clicks
61
+
62
+ # Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level.
63
+ attr_accessor :outbound_clicks_ctr
64
+
65
+ # In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only.
66
+ attr_accessor :inline_link_clicks
67
+
68
+ # Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level.
69
+ attr_accessor :inline_link_click_ctr
70
+
71
+ # People who clicked at least once. NOT additive: summed across days/children it overcounts people who clicked on multiple days or ads, so treat rollups as an upper bound (same caveat as `reach`). Meta-only.
72
+ attr_accessor :unique_clicks
73
+
74
+ # Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`.
75
+ attr_accessor :unique_ctr
76
+
56
77
  # Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`.
57
78
  attr_accessor :video_play_actions
58
79
 
@@ -107,6 +128,13 @@ module Zernio
107
128
  :'action_values' => :'actionValues',
108
129
  :'purchase_value' => :'purchaseValue',
109
130
  :'roas' => :'roas',
131
+ :'cost_per_action' => :'costPerAction',
132
+ :'outbound_clicks' => :'outboundClicks',
133
+ :'outbound_clicks_ctr' => :'outboundClicksCtr',
134
+ :'inline_link_clicks' => :'inlineLinkClicks',
135
+ :'inline_link_click_ctr' => :'inlineLinkClickCtr',
136
+ :'unique_clicks' => :'uniqueClicks',
137
+ :'unique_ctr' => :'uniqueCtr',
110
138
  :'video_play_actions' => :'videoPlayActions',
111
139
  :'video30_sec_watched_actions' => :'video30SecWatchedActions',
112
140
  :'video_thruplay_watched_actions' => :'videoThruplayWatchedActions',
@@ -150,6 +178,13 @@ module Zernio
150
178
  :'action_values' => :'Hash<String, Float>',
151
179
  :'purchase_value' => :'Float',
152
180
  :'roas' => :'Float',
181
+ :'cost_per_action' => :'Hash<String, Float>',
182
+ :'outbound_clicks' => :'Integer',
183
+ :'outbound_clicks_ctr' => :'Float',
184
+ :'inline_link_clicks' => :'Integer',
185
+ :'inline_link_click_ctr' => :'Float',
186
+ :'unique_clicks' => :'Integer',
187
+ :'unique_ctr' => :'Float',
153
188
  :'video_play_actions' => :'Integer',
154
189
  :'video30_sec_watched_actions' => :'Integer',
155
190
  :'video_thruplay_watched_actions' => :'Integer',
@@ -248,6 +283,36 @@ module Zernio
248
283
  self.roas = attributes[:'roas']
249
284
  end
250
285
 
286
+ if attributes.key?(:'cost_per_action')
287
+ if (value = attributes[:'cost_per_action']).is_a?(Hash)
288
+ self.cost_per_action = value
289
+ end
290
+ end
291
+
292
+ if attributes.key?(:'outbound_clicks')
293
+ self.outbound_clicks = attributes[:'outbound_clicks']
294
+ end
295
+
296
+ if attributes.key?(:'outbound_clicks_ctr')
297
+ self.outbound_clicks_ctr = attributes[:'outbound_clicks_ctr']
298
+ end
299
+
300
+ if attributes.key?(:'inline_link_clicks')
301
+ self.inline_link_clicks = attributes[:'inline_link_clicks']
302
+ end
303
+
304
+ if attributes.key?(:'inline_link_click_ctr')
305
+ self.inline_link_click_ctr = attributes[:'inline_link_click_ctr']
306
+ end
307
+
308
+ if attributes.key?(:'unique_clicks')
309
+ self.unique_clicks = attributes[:'unique_clicks']
310
+ end
311
+
312
+ if attributes.key?(:'unique_ctr')
313
+ self.unique_ctr = attributes[:'unique_ctr']
314
+ end
315
+
251
316
  if attributes.key?(:'video_play_actions')
252
317
  self.video_play_actions = attributes[:'video_play_actions']
253
318
  end
@@ -335,6 +400,13 @@ module Zernio
335
400
  action_values == o.action_values &&
336
401
  purchase_value == o.purchase_value &&
337
402
  roas == o.roas &&
403
+ cost_per_action == o.cost_per_action &&
404
+ outbound_clicks == o.outbound_clicks &&
405
+ outbound_clicks_ctr == o.outbound_clicks_ctr &&
406
+ inline_link_clicks == o.inline_link_clicks &&
407
+ inline_link_click_ctr == o.inline_link_click_ctr &&
408
+ unique_clicks == o.unique_clicks &&
409
+ unique_ctr == o.unique_ctr &&
338
410
  video_play_actions == o.video_play_actions &&
339
411
  video30_sec_watched_actions == o.video30_sec_watched_actions &&
340
412
  video_thruplay_watched_actions == o.video_thruplay_watched_actions &&
@@ -359,7 +431,7 @@ module Zernio
359
431
  # Calculates hash code according to all attributes.
360
432
  # @return [Integer] Hash code
361
433
  def hash
362
- [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at].hash
434
+ [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, cost_per_action, outbound_clicks, outbound_clicks_ctr, inline_link_clicks, inline_link_click_ctr, unique_clicks, unique_ctr, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at].hash
363
435
  end
364
436
 
365
437
  # Builds the object from hash
@@ -53,6 +53,27 @@ module Zernio
53
53
  # Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
54
54
  attr_accessor :roas
55
55
 
56
+ # Derived `spend / actions[type]` for every action type with a non-zero count, in ad-account native currency. Same keys as `actions`. Rounded to 4 decimals because cheap actions cost well under a cent. Recomputed from summed spend + counts at every rollup level. Empty object when spend is 0 or no actions are reported.
57
+ attr_accessor :cost_per_action
58
+
59
+ # Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0.
60
+ attr_accessor :outbound_clicks
61
+
62
+ # Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level.
63
+ attr_accessor :outbound_clicks_ctr
64
+
65
+ # In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only.
66
+ attr_accessor :inline_link_clicks
67
+
68
+ # Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level.
69
+ attr_accessor :inline_link_click_ctr
70
+
71
+ # People who clicked at least once. NOT additive: summed across days/children it overcounts people who clicked on multiple days or ads, so treat rollups as an upper bound (same caveat as `reach`). Meta-only.
72
+ attr_accessor :unique_clicks
73
+
74
+ # Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`.
75
+ attr_accessor :unique_ctr
76
+
56
77
  # Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`.
57
78
  attr_accessor :video_play_actions
58
79
 
@@ -109,6 +130,13 @@ module Zernio
109
130
  :'action_values' => :'actionValues',
110
131
  :'purchase_value' => :'purchaseValue',
111
132
  :'roas' => :'roas',
133
+ :'cost_per_action' => :'costPerAction',
134
+ :'outbound_clicks' => :'outboundClicks',
135
+ :'outbound_clicks_ctr' => :'outboundClicksCtr',
136
+ :'inline_link_clicks' => :'inlineLinkClicks',
137
+ :'inline_link_click_ctr' => :'inlineLinkClickCtr',
138
+ :'unique_clicks' => :'uniqueClicks',
139
+ :'unique_ctr' => :'uniqueCtr',
112
140
  :'video_play_actions' => :'videoPlayActions',
113
141
  :'video30_sec_watched_actions' => :'video30SecWatchedActions',
114
142
  :'video_thruplay_watched_actions' => :'videoThruplayWatchedActions',
@@ -153,6 +181,13 @@ module Zernio
153
181
  :'action_values' => :'Hash<String, Float>',
154
182
  :'purchase_value' => :'Float',
155
183
  :'roas' => :'Float',
184
+ :'cost_per_action' => :'Hash<String, Float>',
185
+ :'outbound_clicks' => :'Integer',
186
+ :'outbound_clicks_ctr' => :'Float',
187
+ :'inline_link_clicks' => :'Integer',
188
+ :'inline_link_click_ctr' => :'Float',
189
+ :'unique_clicks' => :'Integer',
190
+ :'unique_ctr' => :'Float',
156
191
  :'video_play_actions' => :'Integer',
157
192
  :'video30_sec_watched_actions' => :'Integer',
158
193
  :'video_thruplay_watched_actions' => :'Integer',
@@ -259,6 +294,36 @@ module Zernio
259
294
  self.roas = attributes[:'roas']
260
295
  end
261
296
 
297
+ if attributes.key?(:'cost_per_action')
298
+ if (value = attributes[:'cost_per_action']).is_a?(Hash)
299
+ self.cost_per_action = value
300
+ end
301
+ end
302
+
303
+ if attributes.key?(:'outbound_clicks')
304
+ self.outbound_clicks = attributes[:'outbound_clicks']
305
+ end
306
+
307
+ if attributes.key?(:'outbound_clicks_ctr')
308
+ self.outbound_clicks_ctr = attributes[:'outbound_clicks_ctr']
309
+ end
310
+
311
+ if attributes.key?(:'inline_link_clicks')
312
+ self.inline_link_clicks = attributes[:'inline_link_clicks']
313
+ end
314
+
315
+ if attributes.key?(:'inline_link_click_ctr')
316
+ self.inline_link_click_ctr = attributes[:'inline_link_click_ctr']
317
+ end
318
+
319
+ if attributes.key?(:'unique_clicks')
320
+ self.unique_clicks = attributes[:'unique_clicks']
321
+ end
322
+
323
+ if attributes.key?(:'unique_ctr')
324
+ self.unique_ctr = attributes[:'unique_ctr']
325
+ end
326
+
262
327
  if attributes.key?(:'video_play_actions')
263
328
  self.video_play_actions = attributes[:'video_play_actions']
264
329
  end
@@ -350,6 +415,13 @@ module Zernio
350
415
  action_values == o.action_values &&
351
416
  purchase_value == o.purchase_value &&
352
417
  roas == o.roas &&
418
+ cost_per_action == o.cost_per_action &&
419
+ outbound_clicks == o.outbound_clicks &&
420
+ outbound_clicks_ctr == o.outbound_clicks_ctr &&
421
+ inline_link_clicks == o.inline_link_clicks &&
422
+ inline_link_click_ctr == o.inline_link_click_ctr &&
423
+ unique_clicks == o.unique_clicks &&
424
+ unique_ctr == o.unique_ctr &&
353
425
  video_play_actions == o.video_play_actions &&
354
426
  video30_sec_watched_actions == o.video30_sec_watched_actions &&
355
427
  video_thruplay_watched_actions == o.video_thruplay_watched_actions &&
@@ -375,7 +447,7 @@ module Zernio
375
447
  # Calculates hash code according to all attributes.
376
448
  # @return [Integer] Hash code
377
449
  def hash
378
- [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at, date].hash
450
+ [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, cost_per_action, outbound_clicks, outbound_clicks_ctr, inline_link_clicks, inline_link_click_ctr, unique_clicks, unique_ctr, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at, date].hash
379
451
  end
380
452
 
381
453
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.714'
14
+ VERSION = '0.0.715'
15
15
  end
data/openapi.yaml CHANGED
@@ -6908,6 +6908,20 @@ components:
6908
6908
  roas:
6909
6909
  type: number
6910
6910
  description: "Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level."
6911
+ costPerAction:
6912
+ type: object
6913
+ additionalProperties:
6914
+ type: number
6915
+ description: "Derived `spend / actions[type]` for every action type with a non-zero count, in ad-account native currency. Same keys as `actions`. Rounded to 4 decimals because cheap actions cost well under a cent. Recomputed from summed spend + counts at every rollup level. Empty object when spend is 0 or no actions are reported."
6916
+ example:
6917
+ link_click: 0.1052
6918
+ offsite_conversion.fb_pixel_purchase: 4.0114
6919
+ outboundClicks: { type: integer, description: "Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0." }
6920
+ outboundClicksCtr: { type: number, description: "Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level." }
6921
+ inlineLinkClicks: { type: integer, description: "In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only." }
6922
+ inlineLinkClickCtr: { type: number, description: "Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level." }
6923
+ uniqueClicks: { type: integer, description: "People who clicked at least once. NOT additive: summed across days/children it overcounts people who clicked on multiple days or ads, so treat rollups as an upper bound (same caveat as `reach`). Meta-only." }
6924
+ uniqueCtr: { type: number, description: "Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`." }
6911
6925
  videoPlayActions:
6912
6926
  type: integer
6913
6927
  description: "Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`."
@@ -6982,7 +6996,7 @@ components:
6982
6996
  saves: { type: integer, description: "Saves of the ad's post (`onsite_conversion.post_save`)." }
6983
6997
  pageLikes: { type: integer, description: "New Page likes attributed to the ad (`like`)." }
6984
6998
  videoViews: { type: integer, description: "3-second video views (`video_view`). For completion-based counts use `videoThruplayWatchedActions`." }
6985
- linkClicks: { type: integer, description: "Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session `inline_link_clicks` reported by `GET /v1/ads/{adId}/analytics`." }
6999
+ linkClicks: { type: integer, description: "Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session count in the sibling `inlineLinkClicks` field." }
6986
7000
  AdDailyMetrics:
6987
7001
  description: |
6988
7002
  One day of metrics. Same fields as `AdMetrics` plus the `date` they
@@ -111,6 +111,48 @@ describe Zernio::AdDailyMetrics do
111
111
  end
112
112
  end
113
113
 
114
+ describe 'test attribute "cost_per_action"' do
115
+ it 'should work' do
116
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
117
+ end
118
+ end
119
+
120
+ describe 'test attribute "outbound_clicks"' do
121
+ it 'should work' do
122
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
123
+ end
124
+ end
125
+
126
+ describe 'test attribute "outbound_clicks_ctr"' do
127
+ it 'should work' do
128
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
129
+ end
130
+ end
131
+
132
+ describe 'test attribute "inline_link_clicks"' do
133
+ it 'should work' do
134
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
135
+ end
136
+ end
137
+
138
+ describe 'test attribute "inline_link_click_ctr"' do
139
+ it 'should work' do
140
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
141
+ end
142
+ end
143
+
144
+ describe 'test attribute "unique_clicks"' do
145
+ it 'should work' do
146
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
147
+ end
148
+ end
149
+
150
+ describe 'test attribute "unique_ctr"' do
151
+ it 'should work' do
152
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
153
+ end
154
+ end
155
+
114
156
  describe 'test attribute "video_play_actions"' do
115
157
  it 'should work' do
116
158
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -111,6 +111,48 @@ describe Zernio::AdMetrics do
111
111
  end
112
112
  end
113
113
 
114
+ describe 'test attribute "cost_per_action"' do
115
+ it 'should work' do
116
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
117
+ end
118
+ end
119
+
120
+ describe 'test attribute "outbound_clicks"' do
121
+ it 'should work' do
122
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
123
+ end
124
+ end
125
+
126
+ describe 'test attribute "outbound_clicks_ctr"' do
127
+ it 'should work' do
128
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
129
+ end
130
+ end
131
+
132
+ describe 'test attribute "inline_link_clicks"' do
133
+ it 'should work' do
134
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
135
+ end
136
+ end
137
+
138
+ describe 'test attribute "inline_link_click_ctr"' do
139
+ it 'should work' do
140
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
141
+ end
142
+ end
143
+
144
+ describe 'test attribute "unique_clicks"' do
145
+ it 'should work' do
146
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
147
+ end
148
+ end
149
+
150
+ describe 'test attribute "unique_ctr"' do
151
+ it 'should work' do
152
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
153
+ end
154
+ end
155
+
114
156
  describe 'test attribute "video_play_actions"' do
115
157
  it 'should work' do
116
158
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/