Get Clicks By Country

bitly.get_metrics_by_country
ActionBusiness appsconnection required

Calls the Bitly API with the connection's credentials.

Return the clicks on one Bitlink broken down by visitor country.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
Bitly
Secret shape
{"access_token": "…"} — a Bitly generic access token, or {"client_id": "…", "client_secret": "…", "refresh_token": "…"}
Config it needs
group_guid, domain, organization_guid
Resolved by
config.connection_id, else node.connection_id

Configuration

5 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
bitlink
The Bitlink to act on, as domain/hash (bit.ly/2kZDMbT) or the full short URL.
stringYes——bit.ly/2kZDMbT
unit
The size of one time bucket in the returned series.
stringNodayone of "minute", "hour", "day", "week", "month"—
units
How many of those units to look back over; -1 covers the whole history.
numberNo-1≥ -1—
size
Maximum number of rows to return in the response.
numberNo50≥ 1—
unit_reference
ISO-8601 timestamp of the most recent point to pull metrics for; defaults to now.
stringNo—iso8601 format—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "bitlink": "bit.ly/2kZDMbT",
  "size": 50,
  "unit": "day",
  "units": -1
}

Output

One shape.

result

FieldTypeExample
metrics
One row per facet value, each with 'value' and 'clicks'.
array—
count
How many rows the response carried.
number—
facet
The facet Bitly grouped the clicks by.
string—
unit
The time bucket the counts cover.
string—
units
How many units the window spanned.
number—
unit_reference
The most recent point in the window, as returned.
string—
bitlink
The Bitlink the metrics belong to.
string—
{
  "bitlink": "",
  "count": 0,
  "facet": "",
  "metrics": [],
  "unit": "",
  "unit_reference": "",
  "units": 0
}

See Get Clicks By Country run in a workflow.

In a technical demo we add the Bitly connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.