Compare converting sessions
const url = 'https://digize.com/api/v1/analytics/compare?outcome=lead&days=30&minSessions=30';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://digize.com/api/v1/analytics/compare?outcome=lead&days=30&minSessions=30' \ --header 'x-api-key: <x-api-key>'Sessions that reached an outcome against those that didn’t: the conversion rate and each side’s share by channel, source, device, browser, country, landing page, visit number, pages viewed, engaged time, scroll reached, page speed (LCP), JavaScript errors, rage clicks and forms left unsent, with the groups that part most surely ranked in differences. Use it for “why don’t they buy” and “who does”: each figure says how many sessions it stands on.
Needs the analytics:read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The outcome to compare on; any is a lead, booking or purchase.
The outcome to compare on; any is a lead, booking or purchase.
How many days back from now to read: 90 at most.
How many days back from now to read: 90 at most.
One site’s sessions, by its Worker id; every site’s when left out.
One site’s sessions, by its Worker id; every site’s when left out.
Fewest sessions a group, and the rest, need to be ranked.
Fewest sessions a group, and the rest, need to be ranked.
Responses
Section titled “Responses”Done
object
More combinations than one query reads: the figures cover the commonest.
object
object
Its conversion rate, from 0 to 1.
Its part of the sessions that converted.
Its part of the sessions that didn’t.
How much better (above 0) or worse it converts than the other sessions: 0.5 is half as much again.
How surely it parts from the rest: beyond ±1.96 is 95% sure.
The groups that part most surely from the rest, first.
object
Its conversion rate, from 0 to 1.
Its part of the sessions that converted.
Its part of the sessions that didn’t.
How much better (above 0) or worse it converts than the other sessions: 0.5 is half as much again.
How surely it parts from the rest: beyond ±1.96 is 95% sure.
At least 95% sure it isn’t chance.
Example
{ "outcome": "lead", "dimensions": [ { "key": "channel" } ], "differences": [ { "dimension": "channel", "direction": "higher" } ]}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}