Skip to content
Menu
SilktideDevelopers

Analytics

Read visits, sources, pages, events and goals from Analytics, for any view and date range.

View as Markdown

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:

ArgumentWhat it reads
viewAn 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.
websiteIdThe 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#

ArgumentWhat it does
periodThe 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, toWith period=custom, the first and last day, such as 2026-10-01.
timezoneThe 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
OperatorMatches
isExactly the value.
notAnything but the value.
containsAnything containing the value, ignoring case.
startsAnything starting with the value, matching case.
gt, ltMore 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, search and 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:SS in your timezone.
  • A list, such as the top sources, with a limit on 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

Acquisition

Content

Engagement