Analytics
Read visits, sources, pages, events and goals from Analytics, for any view and date range.
Analytics measures real visits to your websites with the Silktide Script, without cookies. Through the API you can read what it measured into your own dashboards and reports: how many people visited, where they came from, what they read, and what they did.
Every Analytics operation is a results query, and they all take the same arguments for what to read and over which dates. They are described once here.
Which analytics to read#
Send one of these:
| Argument | What it reads |
|---|---|
view | An analytics view. Its id is the number after /analytics/ in the view's address in Silktide. view=all reads all of the account's analytics. |
websiteId | The analytics of a website, which must have Analytics set up. Add sectionId for one of its sections. |
Leave both out and the query answers with an error.
Over which dates#
| Argument | What it does |
|---|---|
period | The date range: today, last-7-days, last-30-days, last-90-days, month-to-date, last-month, year-to-date, last-12-months, all, or custom. Defaults to all. |
from, to | With period=custom, the first and last day, such as 2026-10-01. |
timezone | The IANA time zone days are read in, such as America/New_York. Defaults to UTC. |
Queries that answer over time, one entry per hour, day, week or month, need a period with a start: send any period but all. With the default, they currently answer with an error.
Which visits#
filters keeps only the visits that match every filter you send. Each is keyed by what it filters, and its value is an operator and a value:
filters[url]=contains:/blog&filters[deviceType]=is:mobile| Operator | Matches |
|---|---|
is | Exactly the value. |
not | Anything but the value. |
contains | Anything containing the value, ignoring case. |
starts | Anything starting with the value, matching case. |
gt, lt | More than, or less than, the value, such as filters[viewWidth]=gt:1200. |
Keys include url, hostName, entryUrl, exitUrl, event, outgoingUrl, referrer, source, medium, campaign, content, term, countryCode, regionCode, language, viewWidth, deviceType (desktop, tablet or mobile), operatingSystem and browser. An unknown key or operator answers with an error.
Three kinds of answer#
- A table, such as pages or sources, with one row each. It takes
columns,sort,searchand pagination. See Tables. - A series, such as visitors over time, with one entry per step. Each step's time is written
YYYY-MM-DD HH:MM:SSin yourtimezone. - A list, such as the top sources, with a
limiton how many entries come back.
An example#
The ten most viewed pages in the last 30 days, across all of the account's analytics:
curl "https://api.eu.silktide.com/v1/results/analytics/pages?view=all&period=last-30-days&columns=url,pageViews&sort=pageViews:d&rowsPerPage=10" \
-H "Authorization: silktide token=YOUR_API_KEY"In Silktide itself: Analytics, in Help.
Audience
- GETGet how many people visited, step by step over a period
/v1/results/analytics/visitorsReturns how many people visited in each step of a period, and across the whole of it, for an analytics view or a website. - GETGet how many pages were viewed, step by step over a period
/v1/results/analytics/page-viewsReturns how many pages were viewed in each step of a period, and across the whole of it, for an analytics view or a website. - GETGet the share of visits that bounced, step by step over a period
/v1/results/analytics/bounce-rateReturns the share of visits that bounced in each step of a period, and across the whole of it, for an analytics view or a website. - GETGet how long visits lasted, step by step over a period
/v1/results/analytics/duration-over-timeReturns how long the average visit lasted in each step of a period, and across the whole of it, for an analytics view or a website. - GETList the countries visitors came from
/v1/results/analytics/countriesLists the countries visits came from, with each country's visitors and page views, most visitors first. - GETList the regions within countries that visitors came from
/v1/results/analytics/regionsLists the regions within countries that visits came from, such as states, provinces or the nations of the United Kingdom, with each region's visitors and page views, most visitors first. - GETList the browsers visitors used
/v1/results/analytics/browsersLists the browsers visitors used, with each one's visitors and page views, most visitors first. - GETList the operating systems visitors used
/v1/results/analytics/operating-systemsLists the operating systems visitors used, with each one's visitors and page views, most visitors first. - GETList the sizes of browser window visitors used
/v1/results/analytics/browser-sizesLists how wide visitors' browser windows were, grouped into sizes, with the visitors and page views at each, smallest first. - GETGet visitors at each browser size, step by step over a period
/v1/results/analytics/browser-sizes-over-timeReturns one series per browser size, with the visitors at that size in each step of a period, for an analytics view or a website.
Acquisition
- GETList where visitors came from, one row per source and medium
/v1/results/analytics/sourcesLists where visitors came from: a search engine, a social network, an AI assistant such as ChatGPT, an email, or another website that linked to yours. - GETGet visitors from the busiest sources, step by step
/v1/results/analytics/sources-over-timeDraws the busiest sources as lines over time: unique visitors from each, step by step through the period. - GETList the campaigns visitors arrived through
/v1/results/analytics/campaignsLists the campaigns visitors arrived through. - GETGet visitors from the busiest campaigns, step by step
/v1/results/analytics/campaigns-over-timeDraws the busiest campaigns as lines over time: unique visitors who arrived through each, step by step through the period.
Content
- GETList the pages people viewed
/v1/results/analytics/pagesLists the pages people viewed, with how often and for how long. - GETList the landing pages visits began on
/v1/results/analytics/entry-pagesLists landing pages: the first tracked page of each visit, and how many visits began on each. - GETList the pages visits ended on
/v1/results/analytics/exit-pagesLists exit pages: the last tracked page of each visit, and how many visits ended on each. - GETList the files people downloaded
/v1/results/analytics/downloadsLists the files people downloaded from your website, such as PDFs, documents and spreadsheets. - GETList the links people left your website through
/v1/results/analytics/outgoing-linksLists the outgoing links people clicked: links on your pages that lead to another website. - GETList the pages where people met dead clicks
/v1/results/analytics/frustration-pagesLists the pages where people got stuck.
Engagement
- GETList the events visitors sent, with how often and by how many
/v1/results/analytics/eventsLists every event sent in the period, one row each, most sent first: the events your site sends with silktide("…"), and the ones the Silktide Script records by itself (pageload, click, download, frustration and the others). - GETGet how often each event was sent, step by step
/v1/results/analytics/events-over-timeCounts how often events were sent across the period, one line per event in multiSeries, and every event together in total and series. - GETList the properties an event was sent with
/v1/results/analytics/event-propertiesLists the properties one event was sent with, most sent first. - GETRank the values one property of an event was sent with
/v1/results/analytics/event-property-valuesRanks one property's values, most sent first, with the number of times each was sent. - GETList every time an event was sent, newest first
/v1/results/analytics/event-occurrencesLists every time one event was sent, newest first. - GETList goals and how often each was completed
/v1/results/analytics/goalsLists every goal of the view, or of the website, with how many times each was completed in the period and the share of visitors who completed it, most completed first. - GETList what people searched your site for
/v1/results/analytics/site-search-termsLists every term people typed into your site's own search boxes in the period, with its searches and visitors, most searched first. - GETCount searches of your site, step by step
/v1/results/analytics/site-searches-over-timeCounts searches of your site's own search boxes over the period, one entry per step.