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

Autorisations

  • Authorizationstringheader

    api_key · http · bearer

    read
  • Authorizationstringheader

    oauth · oauth2

    read

Paramètres de chemin

  • site_idstringobligatoire

    The id of a site from List sites.

  • reportstringobligatoire

    The report to read.

Paramètres de requête

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

En-têtes

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

Réponses

The report named by report.

En-têtes

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

    • articlesintegerobligatoire

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

    • visitorsintegerobligatoire
    • searchesintegerobligatoire
    • reactionsintegerobligatoire

      Article reactions, the latest one per reader and article.

  • object
    • visitorsobjectobligatoire

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

      • totalintegerobligatoire

        The total over the range.

      • total_previousintegerobligatoire

        The total over the previous period.

      • differenceintegerobligatoire

        total minus total_previous.

      • percentage_differencenumberobligatoire

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

      • currentobject[]obligatoire

        One point per bucket of the range.

        • datestringobligatoire
        • countintegerobligatoire
      • previousobject[]obligatoire

        One point per bucket of the previous period.

        • datestringobligatoire
        • countintegerobligatoire
    • article_viewsobjectobligatoire

      Article page views.

      • totalintegerobligatoire

        The total over the range.

      • total_previousintegerobligatoire

        The total over the previous period.

      • differenceintegerobligatoire

        total minus total_previous.

      • percentage_differencenumberobligatoire

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

      • currentobject[]obligatoire

        One point per bucket of the range.

        • datestringobligatoire
        • countintegerobligatoire
      • previousobject[]obligatoire

        One point per bucket of the previous period.

        • datestringobligatoire
        • countintegerobligatoire
    • session_durationsobjectobligatoire

      The time readers spend on a page, in seconds.

      • average_secondsnumberobligatoire

        The mean of the current points.

      • currentobject[]obligatoire

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

        • datestringobligatoire
        • secondsnumberobligatoire
      • previousobject[]obligatoire

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

        • datestringobligatoire
        • secondsnumberobligatoire
    • top_countriesobject[]obligatoire

      The countries with the most visitors.

      • countrystringobligatoire

        ISO 3166-1 alpha-2 code.

      • country_namestringobligatoire
      • visitorsintegerobligatoire
  • object
    • searchesobjectobligatoire
      • totalintegerobligatoire

        The total over the range.

      • total_previousintegerobligatoire

        The total over the previous period.

      • differenceintegerobligatoire

        total minus total_previous.

      • percentage_differencenumberobligatoire

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

      • currentobject[]obligatoire

        One point per bucket of the range.

        • datestringobligatoire
        • countintegerobligatoire
      • previousobject[]obligatoire

        One point per bucket of the previous period.

        • datestringobligatoire
        • countintegerobligatoire
    • searches_with_resultsobjectobligatoire

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

      • totalintegerobligatoire
      • total_previousintegerobligatoire
      • differenceintegerobligatoire
      • percentage_differencenumberobligatoire
      • queriesobject[]obligatoire

        Most searched first.

        • querystringobligatoire

          What readers typed.

        • searchesintegerobligatoire
        • clicksintegerobligatoire

          Clicks on a result.

        • articles_shownnumberobligatoire

          The mean number of articles each search returned.

        • click_through_ratenumberobligatoire

          Clicks per search, in percent.

        • avg_click_positionnumber | nullobligatoire

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

    • searches_without_resultsobjectobligatoire

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

      • totalintegerobligatoire
      • total_previousintegerobligatoire
      • differenceintegerobligatoire
      • percentage_differencenumberobligatoire
      • queriesobject[]obligatoire

        Most searched first.

        • querystringobligatoire
        • searchesintegerobligatoire
    • click_through_rateobjectobligatoire

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

      • currentnumberobligatoire
      • previousnumberobligatoire
      • differencenumberobligatoire

        The difference in points.

      • percentage_differencenumberobligatoire

        The change in percent.

  • object
    • overviewobjectobligatoire
      • currentobjectobligatoire
        • viewsintegerobligatoire

          Article views.

        • articles_to_reviseintegerobligatoire

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

        • reaction_summaryobjectobligatoire

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

          • stylestringobligatoire
          • totalintegerobligatoire

            All reactions.

          • scoreintegerobligatoire

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

          • groupsobject[]obligatoire

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

            • keystringobligatoire
            • countintegerobligatoire
            • percentintegerobligatoire
      • previousobjectobligatoire
        • viewsintegerobligatoire

          Article views.

        • articles_to_reviseintegerobligatoire

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

        • reaction_summaryobjectobligatoire

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

          • stylestringobligatoire
          • totalintegerobligatoire

            All reactions.

          • scoreintegerobligatoire

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

          • groupsobject[]obligatoire

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

            • keystringobligatoire
            • countintegerobligatoire
            • percentintegerobligatoire
    • article_viewsobjectobligatoire
      • totalintegerobligatoire

        The total over the range.

      • total_previousintegerobligatoire

        The total over the previous period.

      • differenceintegerobligatoire

        total minus total_previous.

      • percentage_differencenumberobligatoire

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

      • currentobject[]obligatoire

        One point per bucket of the range.

        • datestringobligatoire
        • countintegerobligatoire
      • previousobject[]obligatoire

        One point per bucket of the previous period.

        • datestringobligatoire
        • countintegerobligatoire
    • top_articlesobject[]obligatoire

      The most viewed articles.

      • titlestring | nullobligatoire
      • hoststring | nullobligatoire
      • pathnamestring | nullobligatoire
      • viewsintegerobligatoire
    • top_referrersobject[]obligatoire

      Where visitors came from.

      • referrerstring | nullobligatoire

        The referring URL, or null for a direct visit.

      • visitorsintegerobligatoire
    • article_engagementsobject[]obligatoire

      The articles readers reacted to most positively.

      • titlestring | nullobligatoire
      • urlstring | nullobligatoire
      • viewsintegerobligatoire
      • reaction_summaryobjectobligatoire

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

        • stylestringobligatoire
        • totalintegerobligatoire

          All reactions.

        • scoreintegerobligatoire

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

        • groupsobject[]obligatoire

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

          • keystringobligatoire
          • countintegerobligatoire
          • percentintegerobligatoire
    • articles_to_reviseobject[]obligatoire

      The articles readers reacted to most negatively.

      • titlestring | nullobligatoire
      • urlstring | nullobligatoire
      • viewsintegerobligatoire
      • reaction_summaryobjectobligatoire

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

        • stylestringobligatoire
        • totalintegerobligatoire

          All reactions.

        • scoreintegerobligatoire

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

        • groupsobject[]obligatoire

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

          • keystringobligatoire
          • countintegerobligatoire
          • percentintegerobligatoire