Breadcrumbs

/aggregated

Request

Endpoint

/aggregated

Authentication

See JWT details.

Filters

The following filters are available as query parameters to the request. The same filters can be used to drill down on the data in the raw reports:

Parameter name

Type

Mandatory

Description

Example

start

date yyyy-MM-dd

No

Start day (inclusive) of the period to retrieve data for (required end to be defined)

2022-05-01

end

date yyyy-MM-dd

No

End day (inclusive) of the period to retrieve data for (required start to be defined)

2022-05-31

dateRange

string (1)

No

Specify the number of days to retrieve data for (excluded start and end)

yesterday

country

string

No

Filters data on a specific country, by default all countries are included

uk

userDevice

string (2)

No

Filters data on a specific user device, by default all devices are included

desktop

service

string

No

Filters data on a specific service type, by default all services are included

shoppingApi

publisherTokenId

string UUID

No

Filters data on a specific token id, by default all of the application's tokens are included

8d294328-3313-4044-bbc3-e66ecd323c55

salesTracked

boolean

No

Filters leads that only have sales tracking enabled (or only disabled)

true

publisherSubId

string

No

Filters data on a specific publisher sub id, by default all data are included

id59

publisherSubName

string

No

Filters data on a specific publisher sub name, by default all data are included

sub59

publisherTrafficType

string

No

Filters data on a specific publisher traffic type, by default all data are included

content

trafficAnalysisIsBot

boolean

No

Filters data on robotic traffic or not, by default all data are included

false

(1): value of dateRange MUST be one of : yesterday, last7days, last30days (2): value of userDevice MUST be one of : desktop, mobile, tablet

Aggregations

Aggregations are defined by the query parameter groupBy:

Parameter name

Type

Mandatory

Description

Example

groupBy

string

No

Comma separated list of aggregate fields. Aggregation are applied in the order they are defined.

date,country

The following fields can be used for aggregation:

  • day

  • month

  • country

  • userDevice

  • publisherTokenId

  • offerCategoryId

  • merchantId

  • offerBrandId

  • custom1

  • custom2

  • custom3

  • linkUrlTarget

  • linkPublisherPage

  • service

  • publisherSubId

  • publisherSubName

  • publisherTrafficType

  • trafficAnalysisIsBot

The aggregations on day and month can not be used at the same time.

Note that aggregating also implicitly sorts the results, in the following order:

  • first sort by any groupBy parameters that are before day or month. If neither day nor month is requested, that means all parameters;

  • then sort by day or month if requested;

  • then sort by lead count (as resulting of the aggregation);

  • then sort by any groupBy parameters that are after day or month.

For example, grouping by publisherSubId,day,merchantId will sort by publisherSubId,day,leadsCount,merchantId.

Response format

Response format can be chosen using the Accept HTTP header in your request.

Possible value:

  • TSV: text/tab-separated-values (default)

  • JSON: application/json

Report

(response)

The exact fields available in the report will depend on the chosen aggregations. Refer to the column "Available for aggregation by".

General fields

Field

Type

Optional

Available for aggregation by

Value

Description

country

string

true

country

Domain: {fr,uk,es,...}

Country

day

string

true

day

Example: 2022-01-11

Day of the click

month

string

true

month

Example: 2022-01

Month of the click

service

string

true

service

Domain: {Search,Feeds,Links}

Service used by the publisher to generated the go url or the link

See the different services.

What is the context of the user, when he has done the click.

Field

Type

Optional

Available for aggregation by

Value

Description

userDevice

string

true

userDevice

Domain: {desktop,mobile,tablet}

Device type

How you, the publisher , authenticate to service, when he has generated the go url or the link.

Field

Type

Optional

Available for aggregation by

Description

publisherTokenId

string

true

publisherTokenId

KelkooGroup token identifier

publisherTokenName

string

true

publisherTokenId

KelkooGroup token name

Fields provided by the publisher

Which optional parameters and custom parameters, the publisher has provided when he has generated the go url or the link.

Field

Type

Optional

Available for aggregation by

Description

publisherSubId

string

true

publisherSubId

If you are a publisher providing offers to several publisher network by affiliation, specify the sub network id in your system

publisherSubName

string

true

publisherSubName

If you are a publisher providing offers to several publisher network by affiliation, specify the sub network name in your system

publisherTrafficType

string

true

publisherTrafficType

Specify the type of traffic you are sending

custom1

string

true

custom1

Custom attribute 1

custom2

string

true

custom2

Custom attribute 2

custom3

string

true

custom3

Custom attribute 3

If the user has used a link, what was its context.

Field

Type

Optional

Available for aggregation by

Description

linkPublisherPage

string

true

linkPublisherPage

Page URL from which the link was clicked

linkUrlTarget

string

true

linkUrlTarget

Destination URL used in the link

Is the user led to a merchant offer? What is this offer.

Field

Type

Optional

Available for aggregation by

Value

Description

Comments

offerCategoryId

number

true

offerCategoryId

Example: 134101

KelkooGroup category identifier of the offer


offerCategoryName

string

true

offerCategoryId

Example: Medicines & Remedies

KelkooGroup category name of the offer

available only if there is an aggregation or a filter by country

offerBrandId

number

true

offerBrandId

Example: 5235

KelkooGroup brand identifier of the offer


offerBrandName

string

true

offerBrandId

Example: Anadin

KelkooGroup brand name of the offer


Is the user led to a merchant? What is this merchant.

Field

Type

Optional

Available for aggregation by

Value

Description

merchantId

number

true

merchantId

Example: 100510066

KelkooGroup merchant identifier associated to the click

merchantWebsiteId

number

true

merchantId

Example: 100510066

KelkooGroup unique identifier for the merchant domain

merchantName

string

true

merchantId

Example: AGJP Healthcare

KelkooGroup merchant name associated to the click

merchantTier

string

true

merchantId

Domain: {Static, Flex Standard, Flex Premium}

KelkooGroup merchant tier associated to the click. See details.

merchantDomain

string

true

merchantId

Example: merchant.com

Merchant domain

Computations

Field

Type

Optional

Value

Description

clickCount

number

true

Example: 152

Total of clicks

clickValidCount

number

true

Example: 152

Total of valid clicks

clickNoMatchCount

number

true

Example: 10

Total of invalid clicks due to no matching on a monetized resource

clickClientRequestInvalidCount

number

true

Example: 8

Total of valid inclicks due to a client issue

monetizedClickPercentage

string

true

Example: "33.33%"

Ratio between clickValidCount and clickCount percentage

unmonetizedClickPercentage

string

true

Example: "33.33%"

Ratio between (clickCount - clickValidCount) and clickCount percentage

leadCount

number

true

Example: 152

Total of leads

leadRejectedCount

number

true

Example: 0

Total of rejected leads

leadUnbilledCount

number

true

Example: 0

Total of unbilled leads

trackedLeadCount

number

true

Example: 46

Total of tracked leads

leadEstimatedRevenue

number

true

Example: 0.13104

Estimated revenue (local currency) if applicable

leadEstimatedRevenueInEur

number

true

Example: 0.154632834

Estimated revenue (EUR) if applicable

leadEstimatedRevenueInGbp

number

true

Example: 0.13104

Estimated revenue (GBP) if applicable

leadEstimatedRevenueInUsd

number

true

Example: 0.1726320958776

Estimated revenue (USD) if applicable

saleCount

number

true

Example: 10

Total number of sales

saleValue

number

true

Example: 15.99

Total value of the sales, in local currency

saleValueInEur

number

true

Example: 15.99

Total value of the sales, in Euros

saleValueInGbp

number

true

Example: 13.40

Total value of the sales, in Pounds sterling

saleValueInUsd

number

true

Example: 16.81

Total value of the sales, in United States Dollars

linkCount

number

true

Example: 42

Number of Links clicks

offerCount

number

true

Example: 42

Number of Offer clicks

cosPercentage

string

true

Example: "15.2%"

Cost of Sales percentage

crPercentage

string

true

Example: "5.03%"

Lead conversion rate percentage

valuePerLead

number

true

Example: 7.8

Value per lead: the value of sales generated per lead, in local currency

valuePerLeadInEur

number

true

Example: 7.8

Value per lead: the value of sales generated per lead, in Euros

valuePerLeadInGbp

number

true

Example: 7.8

Value per lead: the value of sales generated per lead, in Pounds

valuePerLeadInUsd

number

true

Example: 7.8

Value per lead: the value of sales generated per lead, in United States Dollars

leadEstimatedRevenuePerLead

number

true

Example: 0.26104

The average CPC you have earned, calculated from estimated earnings per valid lead (local currency) if applicable

leadEstimatedRevenuePerLeadInEur

number

true

Example: 0.274632834

The average CPC you have earned, calculated from estimated earnings per valid lead (EUR) if applicable

leadEstimatedRevenuePerLeadInGbp

number

true

Example: 0.26104

The average CPC you have earned, calculated from estimated earnings per valid lead (GBP) if applicable

leadEstimatedRevenuePerLeadInUsd

number

true

Example: 0.3426320958776

The average CPC you have earned, calculated from estimated earnings per valid lead (USD) if applicable

The fields with a local currency value are only available if aggregation by country is chosen or a country filter has been set.

Examples

Group by month

  • Given  the Accept header is defined with value application/json

  • When  I perform a GET with defined headers on following URL /api/public/aggregated?start=2022-01-11&end=2022-02-05&groupBy=month

  • Then  I get a response with status 200

  • And  the result is the same as the following json

JSON
[
  {
    "month": "2022-01",
    "clickCount": 5,
    "clickValidCount": 4,
    "clickNoMatchCount": 1,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "80%",
    "unmonetizedClickPercentage": "20%",
    "leadRejectedCount": 2,
    "leadUnbilledCount": 0,
    "leadCount": 2,
    "trackedLeadCount": 1,
    "leadEstimatedRevenueInEur": 2.8,
    "leadEstimatedRevenueInGbp": 2.3506557012669482,
    "leadEstimatedRevenueInUsd": 3.17268,
    "leadEstimatedRevenuePerLeadInEur": 1.4,
    "leadEstimatedRevenuePerLeadInGbp": 1.1753278506334741,
    "leadEstimatedRevenuePerLeadInUsd": 1.58634,
    "saleCount": 1,
    "saleValueInEur": 15,
    "saleValueInGbp": 12.592798399644366,
    "saleValueInUsd": 16.9965,
    "linkCount": 2,
    "offerCount": 3,
    "crPercentage": "50%",
    "valuePerLeadInEur": 7.5,
    "valuePerLeadInGbp": 6.296399199822183,
    "valuePerLeadInUsd": 8.49825
  },
  {
    "month": "2022-02",
    "clickCount": 1,
    "clickValidCount": 1,
    "clickNoMatchCount": 0,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "100%",
    "unmonetizedClickPercentage": "0%",
    "leadRejectedCount": 0,
    "leadUnbilledCount": 0,
    "leadCount": 1,
    "trackedLeadCount": 0,
    "leadEstimatedRevenueInEur": 1.5,
    "leadEstimatedRevenueInUsd": 1.67235,
    "leadEstimatedRevenuePerLeadInEur": 1.5,
    "leadEstimatedRevenuePerLeadInUsd": 1.67235,
    "saleCount": 0,
    "linkCount": 1,
    "offerCount": 0,
    "crPercentage": "0%",
    "valuePerLeadInEur": 0,
    "valuePerLeadInGbp": 0,
    "valuePerLeadInUsd": 0
  }
]

Group by month and merchantId

  • Given  the Accept header is defined with value application/json

  • When  I perform a GET with defined headers on following URL /api/public/aggregated?start=2022-01-11&end=2022-02-05&groupBy=month,merchantId

  • Then  I get a response with status 200

  • And  the result is the same as the following json

JSON
[
  {
    "month": "2022-01",
    "merchantId": 444,
    "merchantWebsiteId": 10444,
    "merchantName": "myMerchant",
    "merchantTier": "Static",
    "merchantDomain": "my-merchant.fr",
    "clickCount": 3,
    "clickValidCount": 3,
    "clickNoMatchCount": 0,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "100%",
    "unmonetizedClickPercentage": "0%",
    "leadRejectedCount": 2,
    "leadUnbilledCount": 0,
    "leadCount": 1,
    "trackedLeadCount": 0,
    "leadEstimatedRevenue": 1.6,
    "leadEstimatedRevenueInEur": 1.6,
    "leadEstimatedRevenueInGbp": 1.343231829295399,
    "leadEstimatedRevenueInUsd": 1.81296,
    "leadEstimatedRevenuePerLead": 1.6,
    "leadEstimatedRevenuePerLeadInEur": 1.6,
    "leadEstimatedRevenuePerLeadInGbp": 1.343231829295399,
    "leadEstimatedRevenuePerLeadInUsd": 1.81296,
    "saleCount": 0,
    "linkCount": 0,
    "offerCount": 3,
    "crPercentage": "0%",
    "valuePerLead": 0,
    "valuePerLeadInEur": 0,
    "valuePerLeadInGbp": 0,
    "valuePerLeadInUsd": 0
  },
  {
    "month": "2022-01",
    "merchantId": 647,
    "merchantWebsiteId": 10647,
    "merchantName": "myMerchant2",
    "merchantTier": "Flex Premium",
    "merchantDomain": "my-merchant2.com",
    "clickCount": 1,
    "clickValidCount": 1,
    "clickNoMatchCount": 0,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "100%",
    "unmonetizedClickPercentage": "0%",
    "leadRejectedCount": 0,
    "leadUnbilledCount": 0,
    "leadCount": 1,
    "trackedLeadCount": 1,
    "leadEstimatedRevenue": 1.2,
    "leadEstimatedRevenueInEur": 1.2,
    "leadEstimatedRevenueInGbp": 1.0074238719715491,
    "leadEstimatedRevenueInUsd": 1.35972,
    "leadEstimatedRevenuePerLead": 1.2,
    "leadEstimatedRevenuePerLeadInEur": 1.2,
    "leadEstimatedRevenuePerLeadInGbp": 1.0074238719715491,
    "leadEstimatedRevenuePerLeadInUsd": 1.35972,
    "saleCount": 1,
    "saleValue": 10,
    "saleValueInEur": 15,
    "saleValueInGbp": 12.592798399644366,
    "saleValueInUsd": 16.9965,
    "linkCount": 1,
    "offerCount": 0,
    "crPercentage": "100%",
    "valuePerLead": 10,
    "valuePerLeadInEur": 15,
    "valuePerLeadInGbp": 12.592798399644366,
    "valuePerLeadInUsd": 16.9965
  },
  {
    "month": "2022-01",
    "clickCount": 1,
    "clickValidCount": 0,
    "clickNoMatchCount": 1,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "0%",
    "unmonetizedClickPercentage": "100%",
    "leadRejectedCount": 0,
    "leadUnbilledCount": 0,
    "leadCount": 0,
    "trackedLeadCount": 0,
    "saleCount": 0,
    "linkCount": 1,
    "offerCount": 0,
    "crPercentage": "0%",
    "valuePerLead": 0,
    "valuePerLeadInEur": 0,
    "valuePerLeadInGbp": 0,
    "valuePerLeadInUsd": 0
  },
  {
    "month": "2022-02",
    "merchantId": 444,
    "merchantWebsiteId": 10444,
    "merchantName": "myMerchant",
    "merchantTier": "Static",
    "merchantDomain": "my-merchant.fr",
    "clickCount": 1,
    "clickValidCount": 1,
    "clickNoMatchCount": 0,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "100%",
    "unmonetizedClickPercentage": "0%",
    "leadRejectedCount": 0,
    "leadUnbilledCount": 0,
    "leadCount": 1,
    "trackedLeadCount": 0,
    "leadEstimatedRevenue": 1.5,
    "leadEstimatedRevenueInEur": 1.5,
    "leadEstimatedRevenueInUsd": 1.67235,
    "leadEstimatedRevenuePerLead": 1.5,
    "leadEstimatedRevenuePerLeadInEur": 1.5,
    "leadEstimatedRevenuePerLeadInUsd": 1.67235,
    "saleCount": 0,
    "linkCount": 1,
    "offerCount": 0,
    "crPercentage": "0%",
    "valuePerLead": 0,
    "valuePerLeadInEur": 0,
    "valuePerLeadInGbp": 0,
    "valuePerLeadInUsd": 0
  }
]

Group by day, country and offerCategoryId

  • Given  the Accept header is defined with value application/json

  • When  I perform a GET with defined headers on following URL /api/public/aggregated?start=2022-01-11&end=2022-02-05&groupBy=day,country,offerCategoryId

  • Then  I get a response with status 200

  • And  the result is the same as the following json

JSON
[
  {
    "day": "2022-01-11",
    "country": "fr",
    "clickCount": 1,
    "clickValidCount": 1,
    "clickNoMatchCount": 0,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "100%",
    "unmonetizedClickPercentage": "0%",
    "leadRejectedCount": 0,
    "leadUnbilledCount": 0,
    "leadCount": 1,
    "trackedLeadCount": 1,
    "leadEstimatedRevenue": 1.2,
    "leadEstimatedRevenueInEur": 1.2,
    "leadEstimatedRevenueInGbp": 1.0074238719715491,
    "leadEstimatedRevenueInUsd": 1.35972,
    "leadEstimatedRevenuePerLead": 1.2,
    "leadEstimatedRevenuePerLeadInEur": 1.2,
    "leadEstimatedRevenuePerLeadInGbp": 1.0074238719715491,
    "leadEstimatedRevenuePerLeadInUsd": 1.35972,
    "saleCount": 1,
    "saleValue": 10,
    "saleValueInEur": 15,
    "saleValueInGbp": 12.592798399644366,
    "saleValueInUsd": 16.9965,
    "linkCount": 1,
    "offerCount": 0,
    "crPercentage": "100%",
    "valuePerLead": 10,
    "valuePerLeadInEur": 15,
    "valuePerLeadInGbp": 12.592798399644366,
    "valuePerLeadInUsd": 16.9965
  },
  {
    "day": "2022-01-11",
    "country": "fr",
    "offerCategoryId": 42,
    "offerCategoryName": "High Tech",
    "clickCount": 1,
    "clickValidCount": 1,
    "clickNoMatchCount": 0,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "100%",
    "unmonetizedClickPercentage": "0%",
    "leadRejectedCount": 1,
    "leadUnbilledCount": 0,
    "leadCount": 0,
    "trackedLeadCount": 0,
    "leadEstimatedRevenue": 0,
    "leadEstimatedRevenueInEur": 0,
    "leadEstimatedRevenueInGbp": 0,
    "leadEstimatedRevenueInUsd": 0,
    "saleCount": 0,
    "linkCount": 0,
    "offerCount": 1,
    "crPercentage": "0%",
    "valuePerLead": 0,
    "valuePerLeadInEur": 0,
    "valuePerLeadInGbp": 0,
    "valuePerLeadInUsd": 0
  },
  {
    "day": "2022-01-11",
    "country": "uk",
    "clickCount": 1,
    "clickValidCount": 0,
    "clickNoMatchCount": 1,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "0%",
    "unmonetizedClickPercentage": "100%",
    "leadRejectedCount": 0,
    "leadUnbilledCount": 0,
    "leadCount": 0,
    "trackedLeadCount": 0,
    "saleCount": 0,
    "linkCount": 1,
    "offerCount": 0,
    "crPercentage": "0%",
    "valuePerLead": 0,
    "valuePerLeadInEur": 0,
    "valuePerLeadInGbp": 0,
    "valuePerLeadInUsd": 0
  },
  {
    "day": "2022-01-12",
    "country": "fr",
    "offerCategoryId": 99,
    "offerCategoryName": "Electroménager",
    "clickCount": 1,
    "clickValidCount": 1,
    "clickNoMatchCount": 0,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "100%",
    "unmonetizedClickPercentage": "0%",
    "leadRejectedCount": 0,
    "leadUnbilledCount": 0,
    "leadCount": 1,
    "trackedLeadCount": 0,
    "leadEstimatedRevenue": 1.6,
    "leadEstimatedRevenueInEur": 1.6,
    "leadEstimatedRevenueInGbp": 1.343231829295399,
    "leadEstimatedRevenueInUsd": 1.81296,
    "leadEstimatedRevenuePerLead": 1.6,
    "leadEstimatedRevenuePerLeadInEur": 1.6,
    "leadEstimatedRevenuePerLeadInGbp": 1.343231829295399,
    "leadEstimatedRevenuePerLeadInUsd": 1.81296,
    "saleCount": 0,
    "linkCount": 0,
    "offerCount": 1,
    "crPercentage": "0%",
    "valuePerLead": 0,
    "valuePerLeadInEur": 0,
    "valuePerLeadInGbp": 0,
    "valuePerLeadInUsd": 0
  },
  {
    "day": "2022-01-12",
    "country": "fr",
    "offerCategoryId": 42,
    "offerCategoryName": "High Tech",
    "clickCount": 1,
    "clickValidCount": 1,
    "clickNoMatchCount": 0,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "100%",
    "unmonetizedClickPercentage": "0%",
    "leadRejectedCount": 1,
    "leadUnbilledCount": 0,
    "leadCount": 0,
    "trackedLeadCount": 0,
    "leadEstimatedRevenue": 0,
    "leadEstimatedRevenueInEur": 0,
    "leadEstimatedRevenueInGbp": 0,
    "leadEstimatedRevenueInUsd": 0,
    "saleCount": 0,
    "linkCount": 0,
    "offerCount": 1,
    "crPercentage": "0%",
    "valuePerLead": 0,
    "valuePerLeadInEur": 0,
    "valuePerLeadInGbp": 0,
    "valuePerLeadInUsd": 0
  },
  {
    "day": "2022-02-01",
    "country": "fr",
    "offerCategoryId": 42,
    "offerCategoryName": "High Tech",
    "clickCount": 1,
    "clickValidCount": 1,
    "clickNoMatchCount": 0,
    "clickClientRequestInvalidCount": 0,
    "monetizedClickPercentage": "100%",
    "unmonetizedClickPercentage": "0%",
    "leadRejectedCount": 0,
    "leadUnbilledCount": 0,
    "leadCount": 1,
    "trackedLeadCount": 0,
    "leadEstimatedRevenue": 1.5,
    "leadEstimatedRevenueInEur": 1.5,
    "leadEstimatedRevenueInUsd": 1.67235,
    "leadEstimatedRevenuePerLead": 1.5,
    "leadEstimatedRevenuePerLeadInEur": 1.5,
    "leadEstimatedRevenuePerLeadInUsd": 1.67235,
    "saleCount": 0,
    "linkCount": 1,
    "offerCount": 0,
    "crPercentage": "0%",
    "valuePerLead": 0,
    "valuePerLeadInEur": 0,
    "valuePerLeadInGbp": 0,
    "valuePerLeadInUsd": 0
  }
]