Source destination - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service responds with the number of visits for each source type with the details of the source.

Method Endpoint
POST /analytics/api/v1/traffic/sources/destination

Request example

{
  "startDate": "2023-10-01",
  "endDate": "2023-12-01",
  "filters": {
    "pageId": [
      "45d2564c-c877-4c8b-84cb-a9c3f7f8f97d",
      "ft/home",
      "ft/search",
      "ft/reader",
      "ft/viewer"
    ],
    "language": "en-US",
    "authenticated": true,
    "sourceTypes": [
      "direct",
      "organic",
      "referral",
      "social"
    ]
  }
}
Field Type Required? Description
startDate String Yes Inclusive start date of the period. The start date must be in the past year.
endDate String Yes Exclusive end date of the period. The end date must be later than the start date.
groupByPeriod String Yes Period by which to group the page views. Valid values are month and day.
filters Object No Field to specify which events to retrieve.
pageId Array No Filter on page IDs.
language String No Filter on the UI Locale (for example, en-US or fr-FR).
authenticated Boolean No Field to define users' status. If undefined, the web service returns page views for both authenticated and unauthenticated users. If set to true, the web service returns only navigation information for authenticated users. if set to false, the web service returns only navigation information for unauthenticated users.
sourceTypes Array No Filter on the source type: direct, organic, referral, social.

Response body

The following lines show an example of a JSON response body:

{
  "startDate": "2023-10-01",
  "endDate": "2023-12-01",
  "results": [
    {
      "type": "direct",
      "source": "unknown",
      "targetPageType": "readerPage",
      "count": 4752
    },
    {
      "type": "direct",
      "source": "unknown",
      "targetPageType": "homePage",
      "count": 2688
    },
    {
      "type": "organic_google",
      "source": "https://www.google.com/",
      "targetPageType": "readerPage",
      "count": 345
    },
    {
      "type": "organic_yandex",
      "source": "https://yandex.ru/",
      "targetPageType": "readerPage",
      "count": 89
    },
    {
      "type": "referral",
      "source": "https://app.qanswer.ai/",
      "targetPageType": "readerPage",
      "count": 9
    },
    {
      "type": "social_facebook",
      "source": "https://www.facebook.com/",
      "targetPageType": "readerPage",
      "count": 3
    }
  ]
}
Field Type Description
startDate String Inclusive start date of the total period as defined in the request.
endDate String Exclusive end date of the total period as defined in the request.
type String The source type of the visit (organic, referral, direct or social) concatenated with the possible source category (google, yandex, facebook, etc.)
source String The source of the visit.
targetPageType String The target page's type.
count Number The number of visits.
Return code Description
200 OK Returns data in JSON format.