Skip to content
Menu
SilktideDevelopers

Context

What a report is about. One website, or every website that matches some tags or a list.

View as Markdown

A report has a context: what it reports on. Its type is contextTypeId, and the details are in context. The two you will meet most:

contextTypeIdReports on
websiteOne website, or one section of it.
websitesSeveral websites, chosen by tags or by a list.

Report templates and report schedules carry a context the same way, and a report made from a template starts with the template's type. Reports can also have the types account (the whole account) and property (Analytics), and an empty type for reports that need no context.

Website#

{ "websiteId": 3, "sectionId": 0 }
FieldWhat it is
websiteIdThe website. Required.
sectionIdOne of its sections. Defaults to 0, the whole website. See Websites and sections.

Websites#

The websites are chosen by criteria. With no criteria, the context is every website the API key's user can see.

Every website and section with both the pre-production and wordpress tags:

{ "criteria": { "tagIds": ["pre-production", "wordpress"], "tagOperator": "and" } }

These websites and sections, by subsite id:

{ "criteria": { "subsiteIds": ["2-0", "3-0", "3-2"] } }
FieldWhat it is
tagIdsWebsites and sections with these tags.
tagOperatoror (the default) for any of the tags, and for all of them.
subsiteIdsThese websites and sections. When you send both, subsiteIds wins and tagIds is ignored.

Tags pick websites and sections as they are tagged when the report is read, so a report on a tag follows the websites as you tag and untag them.

Widgets with a context of their own#

A report is made of widgets, and each one reports on the report's context. A widget can instead be locked to a context of its own, such as one website: then it reports on that website whatever the report's context is. Silktide shows these widgets with a padlock.