Skip to content

Latest commit

 

History

History
45 lines (42 loc) · 52.1 KB

File metadata and controls

45 lines (42 loc) · 52.1 KB

RetrieveAnalyticsRequest

Fields

Field Type Required Description Example
event Optional[operations.Event] The type of event to retrieve analytics for. Defaults to clicks. leads
group_by Optional[operations.QueryParamGroupBy] The parameter to group the analytics data points by. Defaults to count if undefined.
domain Optional[str] The domain to filter analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: dub.co, dub.co,google.com, -spam.com. dub.co
key Optional[str] The slug of the short link to retrieve analytics for. Must be used along with the corresponding domain of the short link to fetch analytics for a specific short link.
link_id Optional[str] The unique ID of the link to retrieve analytics for.Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: link_123, link_123,link_456, -link_789.
external_id Optional[str] The ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.
tenant_id Optional[str] The ID of the tenant that created the link inside your system. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: tenant_123, tenant_123,tenant_456, -tenant_789.
tag_id Optional[str] The tag ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: tag_123, tag_123,tag_456, -tag_789.
folder_id Optional[str] The folder ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: folder_123, folder_123,folder_456, -folder_789. If not provided, return analytics for all links.
group_id Optional[str] The group ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: grp_123, grp_123,grp_456, -grp_789.
partner_id Optional[str] The ID of the partner to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: pn_123, pn_123,pn_456, -pn_789.
customer_id Optional[str] The ID of the customer to retrieve analytics for.
interval Optional[operations.Interval] The interval to retrieve analytics for. If undefined, defaults to 24h.
start Optional[str] The start date and time when to retrieve analytics from. If set, takes precedence over interval.
end Optional[str] The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with start, takes precedence over interval.
timezone Optional[str] The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. America/New_York
country Optional[str] The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code (see https://d.to/geo). Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: US, US,BR,FR, -US.
city Optional[str] The city to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: New York, New York,London, -New York.
region Optional[str] The ISO 3166-2 region code to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: NY, NY,CA, -NY.
continent Optional[str] The continent to retrieve analytics for. Valid values: AF, AN, AS, EU, NA, OC, SA. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: NA, NA,EU, -AS.
device Optional[str] The device to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: Desktop, Mobile,Tablet, -Mobile.
browser Optional[str] The browser to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: Chrome, Chrome,Firefox,Safari, -IE.
os Optional[str] The OS to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: Windows, Mac,Windows,Linux, -Windows.
trigger Optional[str] The trigger to retrieve analytics for. Valid values: qr, link, pageview. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: qr, qr,link, -qr. If undefined, returns all trigger types.
referer Optional[str] The referer hostname to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: google.com, google.com,twitter.com, -facebook.com.
referer_url Optional[str] The full referer URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: https://google.com, https://google.com,https://twitter.com, -https://spam.com.
url Optional[str] The destination URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: https://example.com, https://example.com,https://other.com, -https://spam.com.
utm_source Optional[str] The UTM source to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: google, google,twitter, -spam.
utm_medium Optional[str] The UTM medium to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: cpc, cpc,social, -email.
utm_campaign Optional[str] The UTM campaign to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -). Examples: summer_sale, summer_sale,winter_sale, -old_campaign.
utm_term Optional[str] The UTM term to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -).
utm_content Optional[str] The UTM content to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with -).
root Optional[bool] Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.
sale_type Optional[operations.SaleType] Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both.
query Optional[str] Search the events by a custom metadata value. Only available for lead and sale events. Examples: metadata['key']:'value'
program_id Optional[str] Deprecated: This is automatically inferred from your workspace's defaultProgramId. The ID of the program to retrieve analytics for.
tag_ids Optional[str] Deprecated: Use tagId instead. The tag IDs to retrieve analytics for.
qr Optional[bool] Deprecated: Use the trigger field instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.