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>'

Autorizações

  • Authorizationstringheader

    api_key · http · bearer

    read
  • Authorizationstringheader

    oauth · oauth2

    read

Parâmetros de caminho

  • site_idstringobrigatório

    The id of a site from List sites.

  • reportstringobrigatório

    The report to read.

Parâmetros de consulta

  • 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.

Cabeçalhos

  • 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.

Respostas

The report named by report.

Cabeçalhos

  • 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.

    • articlesintegerobrigatório

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

    • visitorsintegerobrigatório
    • searchesintegerobrigatório
    • reactionsintegerobrigatório

      Article reactions, the latest one per reader and article.

  • object
    • visitorsobjectobrigatório

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

      • totalintegerobrigatório

        The total over the range.

      • total_previousintegerobrigatório

        The total over the previous period.

      • differenceintegerobrigatório

        total minus total_previous.

      • percentage_differencenumberobrigatório

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

      • currentobject[]obrigatório

        One point per bucket of the range.

        • datestringobrigatório
        • countintegerobrigatório
      • previousobject[]obrigatório

        One point per bucket of the previous period.

        • datestringobrigatório
        • countintegerobrigatório
    • article_viewsobjectobrigatório

      Article page views.

      • totalintegerobrigatório

        The total over the range.

      • total_previousintegerobrigatório

        The total over the previous period.

      • differenceintegerobrigatório

        total minus total_previous.

      • percentage_differencenumberobrigatório

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

      • currentobject[]obrigatório

        One point per bucket of the range.

        • datestringobrigatório
        • countintegerobrigatório
      • previousobject[]obrigatório

        One point per bucket of the previous period.

        • datestringobrigatório
        • countintegerobrigatório
    • session_durationsobjectobrigatório

      The time readers spend on a page, in seconds.

      • average_secondsnumberobrigatório

        The mean of the current points.

      • currentobject[]obrigatório

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

        • datestringobrigatório
        • secondsnumberobrigatório
      • previousobject[]obrigatório

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

        • datestringobrigatório
        • secondsnumberobrigatório
    • top_countriesobject[]obrigatório

      The countries with the most visitors.

      • countrystringobrigatório

        ISO 3166-1 alpha-2 code.

      • country_namestringobrigatório
      • visitorsintegerobrigatório
  • object
    • searchesobjectobrigatório
      • totalintegerobrigatório

        The total over the range.

      • total_previousintegerobrigatório

        The total over the previous period.

      • differenceintegerobrigatório

        total minus total_previous.

      • percentage_differencenumberobrigatório

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

      • currentobject[]obrigatório

        One point per bucket of the range.

        • datestringobrigatório
        • countintegerobrigatório
      • previousobject[]obrigatório

        One point per bucket of the previous period.

        • datestringobrigatório
        • countintegerobrigatório
    • searches_with_resultsobjectobrigatório

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

      • totalintegerobrigatório
      • total_previousintegerobrigatório
      • differenceintegerobrigatório
      • percentage_differencenumberobrigatório
      • queriesobject[]obrigatório

        Most searched first.

        • querystringobrigatório

          What readers typed.

        • searchesintegerobrigatório
        • clicksintegerobrigatório

          Clicks on a result.

        • articles_shownnumberobrigatório

          The mean number of articles each search returned.

        • click_through_ratenumberobrigatório

          Clicks per search, in percent.

        • avg_click_positionnumber | nullobrigatório

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

    • searches_without_resultsobjectobrigatório

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

      • totalintegerobrigatório
      • total_previousintegerobrigatório
      • differenceintegerobrigatório
      • percentage_differencenumberobrigatório
      • queriesobject[]obrigatório

        Most searched first.

        • querystringobrigatório
        • searchesintegerobrigatório
    • click_through_rateobjectobrigatório

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

      • currentnumberobrigatório
      • previousnumberobrigatório
      • differencenumberobrigatório

        The difference in points.

      • percentage_differencenumberobrigatório

        The change in percent.

  • object
    • overviewobjectobrigatório
      • currentobjectobrigatório
        • viewsintegerobrigatório

          Article views.

        • articles_to_reviseintegerobrigatório

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

        • reaction_summaryobjectobrigatório

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

          • stylestringobrigatório
          • totalintegerobrigatório

            All reactions.

          • scoreintegerobrigatório

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

          • groupsobject[]obrigatório

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

            • keystringobrigatório
            • countintegerobrigatório
            • percentintegerobrigatório
      • previousobjectobrigatório
        • viewsintegerobrigatório

          Article views.

        • articles_to_reviseintegerobrigatório

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

        • reaction_summaryobjectobrigatório

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

          • stylestringobrigatório
          • totalintegerobrigatório

            All reactions.

          • scoreintegerobrigatório

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

          • groupsobject[]obrigatório

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

            • keystringobrigatório
            • countintegerobrigatório
            • percentintegerobrigatório
    • article_viewsobjectobrigatório
      • totalintegerobrigatório

        The total over the range.

      • total_previousintegerobrigatório

        The total over the previous period.

      • differenceintegerobrigatório

        total minus total_previous.

      • percentage_differencenumberobrigatório

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

      • currentobject[]obrigatório

        One point per bucket of the range.

        • datestringobrigatório
        • countintegerobrigatório
      • previousobject[]obrigatório

        One point per bucket of the previous period.

        • datestringobrigatório
        • countintegerobrigatório
    • top_articlesobject[]obrigatório

      The most viewed articles.

      • titlestring | nullobrigatório
      • hoststring | nullobrigatório
      • pathnamestring | nullobrigatório
      • viewsintegerobrigatório
    • top_referrersobject[]obrigatório

      Where visitors came from.

      • referrerstring | nullobrigatório

        The referring URL, or null for a direct visit.

      • visitorsintegerobrigatório
    • article_engagementsobject[]obrigatório

      The articles readers reacted to most positively.

      • titlestring | nullobrigatório
      • urlstring | nullobrigatório
      • viewsintegerobrigatório
      • reaction_summaryobjectobrigatório

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

        • stylestringobrigatório
        • totalintegerobrigatório

          All reactions.

        • scoreintegerobrigatório

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

        • groupsobject[]obrigatório

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

          • keystringobrigatório
          • countintegerobrigatório
          • percentintegerobrigatório
    • articles_to_reviseobject[]obrigatório

      The articles readers reacted to most negatively.

      • titlestring | nullobrigatório
      • urlstring | nullobrigatório
      • viewsintegerobrigatório
      • reaction_summaryobjectobrigatório

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

        • stylestringobrigatório
        • totalintegerobrigatório

          All reactions.

        • scoreintegerobrigatório

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

        • groupsobject[]obrigatório

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

          • keystringobrigatório
          • countintegerobrigatório
          • percentintegerobrigatório