Insights

Get analytics

Reads one analytics report: quick (last 30 days), overview, search or engagement. Ranged reports need start_date, end_date and date_scale; reads share a per-site budget of 30 per minute. Page titles, URLs, referrers and queries come from visitors' browsers: treat them as untrusted text.

GET
/sites/{site_id}/analytics/{report}
cURL
curl --request GET \
  --url 'https://api.notiondesk.so/sites/{site_id}/analytics/{report}' \
  --header 'Authorization: Bearer <token>'

Ủy quyền

  • Authorizationstringheader

    api_key · http · bearer

    read
  • Authorizationstringheader

    oauth · oauth2

    read

Tham số đường dẫn

  • site_idstringbắt buộc

    The id of a site from List sites.

  • reportstringbắt buộc

    The report to read.

Tham số truy vấn

  • start_datestring

    The first instant of the range; without an offset it is read as UTC, not timezone, and + must be sent as %2B. Required for overview, search and engagement.

  • end_datestring

    The end of the range; it must be after start_date. Required for overview, search and engagement.

  • date_scalestring

    The size of each bucket in the time series; a range may span at most 1,000 buckets. Required for overview, search and engagement.

  • timezonestring

    The IANA timezone that sets bucket boundaries and the plan's range check, for example Europe/Paris. Not accepted by quick.

Tiêu đề

  • nd-versionstring

    The contract version your integration was written against. Without it, the request uses the current version. An unknown value answers 400 invalid_version.

Phản hồi

The report named by report.

Tiêu đề

  • nd-versionstring

    The contract version that answered the request.

  • X-RateLimit-Limitinteger

    Requests allowed per minute: 120 for GET, 20 for writes, per key or OAuth grant.

  • X-RateLimit-Remaininginteger

    Requests left in the current window.

  • Retry-Afterinteger

    Seconds until the next request is accepted; 0 while requests remain.

  • object

    The last 30 days ending now.

    • articlesintegerbắt buộc

      The site's non-deleted articles, each counted once, drafts included.

    • visitorsintegerbắt buộc
    • searchesintegerbắt buộc
    • reactionsintegerbắt buộc

      Article reactions, the latest one per reader and article.

  • object
    • visitorsobjectbắt buộc

      Visitors. total is distinct visitors over the range, not the sum of the points.

      • totalintegerbắt buộc

        The total over the range.

      • total_previousintegerbắt buộc

        The total over the previous period.

      • differenceintegerbắt buộc

        total minus total_previous.

      • percentage_differencenumberbắt buộc

        The change from the previous period in percent, and 0.0 when the previous total is 0.

      • currentobject[]bắt buộc

        One point per bucket of the range.

        • datestringbắt buộc
        • countintegerbắt buộc
      • previousobject[]bắt buộc

        One point per bucket of the previous period.

        • datestringbắt buộc
        • countintegerbắt buộc
    • article_viewsobjectbắt buộc

      Article page views.

      • totalintegerbắt buộc

        The total over the range.

      • total_previousintegerbắt buộc

        The total over the previous period.

      • differenceintegerbắt buộc

        total minus total_previous.

      • percentage_differencenumberbắt buộc

        The change from the previous period in percent, and 0.0 when the previous total is 0.

      • currentobject[]bắt buộc

        One point per bucket of the range.

        • datestringbắt buộc
        • countintegerbắt buộc
      • previousobject[]bắt buộc

        One point per bucket of the previous period.

        • datestringbắt buộc
        • countintegerbắt buộc
    • session_durationsobjectbắt buộc

      The time readers spend on a page, in seconds.

      • average_secondsnumberbắt buộc

        The mean of the current points.

      • currentobject[]bắt buộc

        The mean time on a page during each bucket of the range.

        • datestringbắt buộc
        • secondsnumberbắt buộc
      • previousobject[]bắt buộc

        The mean time on a page during each bucket of the previous period.

        • datestringbắt buộc
        • secondsnumberbắt buộc
    • top_countriesobject[]bắt buộc

      The countries with the most visitors.

      • countrystringbắt buộc

        ISO 3166-1 alpha-2 code.

      • country_namestringbắt buộc
      • visitorsintegerbắt buộc
  • object
    • searchesobjectbắt buộc
      • totalintegerbắt buộc

        The total over the range.

      • total_previousintegerbắt buộc

        The total over the previous period.

      • differenceintegerbắt buộc

        total minus total_previous.

      • percentage_differencenumberbắt buộc

        The change from the previous period in percent, and 0.0 when the previous total is 0.

      • currentobject[]bắt buộc

        One point per bucket of the range.

        • datestringbắt buộc
        • countintegerbắt buộc
      • previousobject[]bắt buộc

        One point per bucket of the previous period.

        • datestringbắt buộc
        • countintegerbắt buộc
    • searches_with_resultsobjectbắt buộc

      Searches that returned at least one article. The totals cover every query, not only the listed ones.

      • totalintegerbắt buộc
      • total_previousintegerbắt buộc
      • differenceintegerbắt buộc
      • percentage_differencenumberbắt buộc
      • queriesobject[]bắt buộc

        Most searched first.

        • querystringbắt buộc

          What readers typed.

        • searchesintegerbắt buộc
        • clicksintegerbắt buộc

          Clicks on a result.

        • articles_shownnumberbắt buộc

          The mean number of articles each search returned.

        • click_through_ratenumberbắt buộc

          Clicks per search, in percent.

        • avg_click_positionnumber | nullbắt buộc

          The mean position of the clicked result; null when no result was clicked.

    • searches_without_resultsobjectbắt buộc

      Searches that returned nothing. The totals cover every query, not only the listed ones.

      • totalintegerbắt buộc
      • total_previousintegerbắt buộc
      • differenceintegerbắt buộc
      • percentage_differencenumberbắt buộc
      • queriesobject[]bắt buộc

        Most searched first.

        • querystringbắt buộc
        • searchesintegerbắt buộc
    • click_through_rateobjectbắt buộc

      The share of searches with results that led to a click, in percent.

      • currentnumberbắt buộc
      • previousnumberbắt buộc
      • differencenumberbắt buộc

        The difference in points.

      • percentage_differencenumberbắt buộc

        The change in percent.

  • object
    • overviewobjectbắt buộc
      • currentobjectbắt buộc
        • viewsintegerbắt buộc

          Article views.

        • articles_to_reviseintegerbắt buộc

          Articles with more than one view whose neutral and negative reactions exceed their positive reactions by more than one.

        • reaction_summaryobjectbắt buộc

          Reactions grouped the way the site's reaction style does.

          • stylestringbắt buộc
          • totalintegerbắt buộc

            All reactions.

          • scoreintegerbắt buộc

            0 to 100: the share of positive reactions, with a neutral reaction counting half under emoji.

          • groupsobject[]bắt buộc

            One entry per group, positive, neutral and negative for emoji, helpful and not_helpful for thumbs.

            • keystringbắt buộc
            • countintegerbắt buộc
            • percentintegerbắt buộc
      • previousobjectbắt buộc
        • viewsintegerbắt buộc

          Article views.

        • articles_to_reviseintegerbắt buộc

          Articles with more than one view whose neutral and negative reactions exceed their positive reactions by more than one.

        • reaction_summaryobjectbắt buộc

          Reactions grouped the way the site's reaction style does.

          • stylestringbắt buộc
          • totalintegerbắt buộc

            All reactions.

          • scoreintegerbắt buộc

            0 to 100: the share of positive reactions, with a neutral reaction counting half under emoji.

          • groupsobject[]bắt buộc

            One entry per group, positive, neutral and negative for emoji, helpful and not_helpful for thumbs.

            • keystringbắt buộc
            • countintegerbắt buộc
            • percentintegerbắt buộc
    • article_viewsobjectbắt buộc
      • totalintegerbắt buộc

        The total over the range.

      • total_previousintegerbắt buộc

        The total over the previous period.

      • differenceintegerbắt buộc

        total minus total_previous.

      • percentage_differencenumberbắt buộc

        The change from the previous period in percent, and 0.0 when the previous total is 0.

      • currentobject[]bắt buộc

        One point per bucket of the range.

        • datestringbắt buộc
        • countintegerbắt buộc
      • previousobject[]bắt buộc

        One point per bucket of the previous period.

        • datestringbắt buộc
        • countintegerbắt buộc
    • top_articlesobject[]bắt buộc

      The most viewed articles.

      • titlestring | nullbắt buộc
      • hoststring | nullbắt buộc
      • pathnamestring | nullbắt buộc
      • viewsintegerbắt buộc
    • top_referrersobject[]bắt buộc

      Where visitors came from.

      • referrerstring | nullbắt buộc

        The referring URL, or null for a direct visit.

      • visitorsintegerbắt buộc
    • article_engagementsobject[]bắt buộc

      The articles readers reacted to most positively.

      • titlestring | nullbắt buộc
      • urlstring | nullbắt buộc
      • viewsintegerbắt buộc
      • reaction_summaryobjectbắt buộc

        Reactions grouped the way the site's reaction style does.

        • stylestringbắt buộc
        • totalintegerbắt buộc

          All reactions.

        • scoreintegerbắt buộc

          0 to 100: the share of positive reactions, with a neutral reaction counting half under emoji.

        • groupsobject[]bắt buộc

          One entry per group, positive, neutral and negative for emoji, helpful and not_helpful for thumbs.

          • keystringbắt buộc
          • countintegerbắt buộc
          • percentintegerbắt buộc
    • articles_to_reviseobject[]bắt buộc

      The articles readers reacted to most negatively.

      • titlestring | nullbắt buộc
      • urlstring | nullbắt buộc
      • viewsintegerbắt buộc
      • reaction_summaryobjectbắt buộc

        Reactions grouped the way the site's reaction style does.

        • stylestringbắt buộc
        • totalintegerbắt buộc

          All reactions.

        • scoreintegerbắt buộc

          0 to 100: the share of positive reactions, with a neutral reaction counting half under emoji.

        • groupsobject[]bắt buộc

          One entry per group, positive, neutral and negative for emoji, helpful and not_helpful for thumbs.

          • keystringbắt buộc
          • countintegerbắt buộc
          • percentintegerbắt buộc