@pomeloanalytics/api 0.1.0-beta.3 → 0.1.0-beta.4
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.
- package/CHANGELOG.md +29 -0
- package/README.md +27 -9
- package/dist/generated/openapi.d.ts +382 -342
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.4
|
|
4
|
+
|
|
5
|
+
- Sync the reviewed public contract for a single audience measurement and the
|
|
6
|
+
Campagnes option. Availability statuses `locked_by_profile` and
|
|
7
|
+
`partially_available_after_effective_at`, the reasons `strict_safe_route`,
|
|
8
|
+
`extended_data_required` and `requested_period_crosses_profile_change`, and
|
|
9
|
+
the availability fields `currentProfile`, `classification`, `readModel` and
|
|
10
|
+
`collectionProfileEffectiveAt` are removed. Reasons are now
|
|
11
|
+
`campaigns_option_required`, `outside_source_coverage` or `null`.
|
|
12
|
+
- Acquisition responses add `campaigns_enabled`, `consented_sessions` and the
|
|
13
|
+
`contents` and `terms` dimensions, and drop the `tagged_*` coverage fields.
|
|
14
|
+
- Rates, shares and means are `number | null` (null under 10 contributors);
|
|
15
|
+
envelopes may carry `small_site`.
|
|
16
|
+
- `meta.surface.reportingPrecision` is
|
|
17
|
+
`{ version: 'exact-masked-counts-v1', minimumCount: 10, rateStep: 0.01 }`:
|
|
18
|
+
counts are exact from 10 and `null` from 1 to 9 (never 0, never 5; render as
|
|
19
|
+
`< 10`). Rates, means and p75 are `null` under 10 contributors; `delta` and
|
|
20
|
+
`delta_pct` are published only when both counts are.
|
|
21
|
+
- Timeseries responses add `period_total`; Acquisition details add the
|
|
22
|
+
`referrer_sources` and `referrer_types` dimensions; Content `include` no
|
|
23
|
+
longer accepts `details` (`summary` or `full`).
|
|
24
|
+
- `small_site.reason` (`small_site` or `filter_complement`) says why the
|
|
25
|
+
totals come from a wider period: too few visits, or a filter that sets 1 to
|
|
26
|
+
9 visits of the site apart (its rates and means are then null).
|
|
27
|
+
- Report filters accept only values published for the period (10 visits or
|
|
28
|
+
more); others are refused with 422 `INVALID_PARAMS`
|
|
29
|
+
(`reason: filter_value_not_published`).
|
|
30
|
+
- The HTTP client implementation is unchanged.
|
|
31
|
+
|
|
3
32
|
## 0.1.0-beta.3
|
|
4
33
|
|
|
5
34
|
- Add optional per-metric Content sample counts and the selected measurement method to generated API types.
|
package/README.md
CHANGED
|
@@ -51,8 +51,8 @@ const { data: account } = await pomelo.me();
|
|
|
51
51
|
|
|
52
52
|
Create a read token in the Pomelo dashboard as described in the getting-started
|
|
53
53
|
guide. Keep it in server configuration, outside source control and browser code.
|
|
54
|
-
API access depends on your plan and the token's permissions.
|
|
55
|
-
|
|
54
|
+
API access depends on your plan and the token's permissions. Each report
|
|
55
|
+
returns `availability`, which tells you whether the requested period is covered.
|
|
56
56
|
|
|
57
57
|
## Read metrics
|
|
58
58
|
|
|
@@ -107,7 +107,7 @@ Response fields are never renamed.
|
|
|
107
107
|
Dates use inclusive UTC `YYYY-MM-DD` values. Pass explicit dates to bound a read.
|
|
108
108
|
The server owns defaults, period validation, entitlements, and numeric limits;
|
|
109
109
|
the SDK does not choose content depth, clamp limits, or change a requested range.
|
|
110
|
-
|
|
110
|
+
Content `include` accepts `summary` or `full`.
|
|
111
111
|
|
|
112
112
|
Full Content responses can include `current.metric_method` and
|
|
113
113
|
`current.pages[].performance.n_lcp`, `n_fcp`, `n_inp`, `n_cls` and `n_ttfb`.
|
|
@@ -145,8 +145,9 @@ if ('channels' in data.current) {
|
|
|
145
145
|
}
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
For Acquisition, `details` is a distinct shape
|
|
149
|
-
|
|
148
|
+
For Acquisition, `details` is a distinct shape (it adds the `referrer_sources`
|
|
149
|
+
and `referrer_types` dimensions). Content accepts only `summary` and `full`.
|
|
150
|
+
Actions accepts `summary`, `full`, and `details`
|
|
150
151
|
using its single response schema; summary leaves detail lists empty on the server.
|
|
151
152
|
Omitting `include` leaves the server's selection unchanged.
|
|
152
153
|
|
|
@@ -169,7 +170,7 @@ if ('dimensions' in data.current && data.current.impact) {
|
|
|
169
170
|
}
|
|
170
171
|
```
|
|
171
172
|
|
|
172
|
-
Impact is conditional on the server response and
|
|
173
|
+
Impact is conditional on the server response and on the Campagnes option. It reports
|
|
173
174
|
distinct converted visits using first-pageview attribution; repeated goal
|
|
174
175
|
matches count once. Check availability as well as the optional impact object.
|
|
175
176
|
The SDK supplies no impact defaults or enrichment.
|
|
@@ -187,11 +188,28 @@ curl --get 'https://api.pomeloanalytics.com/v1/reports/acquisition' \
|
|
|
187
188
|
--data-urlencode 'goal_id=goal-test'
|
|
188
189
|
```
|
|
189
190
|
|
|
190
|
-
|
|
191
|
-
`
|
|
192
|
-
|
|
191
|
+
Check `availability.sections` for sections that are unavailable or only
|
|
192
|
+
partially available: `reason` is `campaigns_option_required` when the Campagnes
|
|
193
|
+
option is off, `outside_source_coverage` when the period is not covered, or
|
|
194
|
+
`null`. Tenant-scoped reads use a stable opaque `tenantId`; the server checks
|
|
193
195
|
the token's permissions and the site's configuration.
|
|
194
196
|
|
|
197
|
+
## Reporting precision
|
|
198
|
+
|
|
199
|
+
`meta.surface.reportingPrecision` is
|
|
200
|
+
`{ version: 'exact-masked-counts-v1', minimumCount: 10, rateStep: 0.01 }`.
|
|
201
|
+
Counts are exact from 10. A count from 1 to 9 is published as `null`: display
|
|
202
|
+
it as `< 10`. It is never `0` and never a representative value such as 5.
|
|
203
|
+
`0` is a measured zero. Rates, shares, means and p75 values are `null` under 10
|
|
204
|
+
contributors. `delta` and `delta_pct` are published only when both counts are.
|
|
205
|
+
`timeseries` responses carry `period_total`, which is `null` when masked.
|
|
206
|
+
|
|
207
|
+
The SDK returns these values unchanged: it does not retry, round or rebuild
|
|
208
|
+
anything. A masked value stays `null`: never add it up, subtract it or compute
|
|
209
|
+
a gap from it. A missing observation is signalled by the field or the
|
|
210
|
+
availability state of the section, not by a number. Responses may also carry
|
|
211
|
+
`small_site`.
|
|
212
|
+
|
|
195
213
|
## Errors and request metadata
|
|
196
214
|
|
|
197
215
|
HTTP failures throw `PomeloApiError`, exposing `status`, `code`, `requestId`, and
|