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 |
|---|---|---|---|---|
|
|
date |
No |
Start day (inclusive) of the period to retrieve data for (required |
|
|
|
date |
No |
End day (inclusive) of the period to retrieve data for (required |
|
|
|
string (1) |
No |
Specify the number of days to retrieve data for (excluded |
|
|
|
string |
No |
Filters data on a specific country, by default all countries are included |
|
|
|
string (2) |
No |
Filters data on a specific user device, by default all devices are included |
|
|
|
string |
No |
Filters data on a specific service type, by default all services are included |
|
|
|
string |
No |
Filters data on a specific token id, by default all of the application's tokens are included |
|
|
|
boolean |
No |
Filters leads that only have sales tracking enabled (or only disabled) |
|
|
|
string |
No |
Filters data on a specific publisher sub id, by default all data are included |
|
|
|
string |
No |
Filters data on a specific publisher sub name, by default all data are included |
|
|
|
string |
No |
Filters data on a specific publisher traffic type, by default all data are included |
|
|
|
boolean |
No |
Filters data on robotic traffic or not, by default all data are included |
|
(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 |
|---|---|---|---|---|
|
|
string |
No |
Comma separated list of aggregate fields. Aggregation are applied in the order they are defined. |
|
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
groupByparameters that are beforedayormonth. If neitherdaynormonthis requested, that means all parameters; -
then sort by
dayormonthif requested; -
then sort by lead count (as resulting of the aggregation);
-
then sort by any
groupByparameters that are afterdayormonth.
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 |
|---|---|---|---|---|---|
|
|
string |
true |
|
Domain: { |
Country |
|
|
string |
true |
|
Example: |
Day of the click |
|
|
string |
true |
|
Example: |
Month of the click |
|
|
string |
true |
|
Domain: { |
Service used by the publisher to generated the go url or the link |
See the different services.
User related fields
What is the context of the user, when he has done the click.
|
Field |
Type |
Optional |
Available for aggregation by |
Value |
Description |
|---|---|---|---|---|---|
|
|
string |
true |
|
Domain: { |
Device type |
Publisher related fields
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 |
|---|---|---|---|---|
|
|
string |
true |
|
KelkooGroup token identifier |
|
|
string |
true |
|
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 |
|---|---|---|---|---|
|
|
string |
true |
|
If you are a publisher providing offers to several publisher network by affiliation, specify the sub network id in your system |
|
|
string |
true |
|
If you are a publisher providing offers to several publisher network by affiliation, specify the sub network name in your system |
|
|
string |
true |
|
Specify the type of traffic you are sending |
|
|
string |
true |
|
Custom attribute 1 |
|
|
string |
true |
|
Custom attribute 2 |
|
|
string |
true |
|
Custom attribute 3 |
Link related fields
If the user has used a link, what was its context.
|
Field |
Type |
Optional |
Available for aggregation by |
Description |
|---|---|---|---|---|
|
|
string |
true |
|
Page URL from which the link was clicked |
|
|
string |
true |
|
Destination URL used in the link |
Offer related fields
Is the user led to a merchant offer? What is this offer.
|
Field |
Type |
Optional |
Available for aggregation by |
Value |
Description |
Comments |
|---|---|---|---|---|---|---|
|
|
number |
true |
|
Example: |
KelkooGroup category identifier of the offer |
|
|
|
string |
true |
|
Example: |
KelkooGroup category name of the offer |
available only if there is an aggregation or a filter by country |
|
|
number |
true |
|
Example: |
KelkooGroup brand identifier of the offer |
|
|
|
string |
true |
|
Example: |
KelkooGroup brand name of the offer |
|
Merchant related fields
Is the user led to a merchant? What is this merchant.
|
Field |
Type |
Optional |
Available for aggregation by |
Value |
Description |
|---|---|---|---|---|---|
|
|
number |
true |
|
Example: |
KelkooGroup merchant identifier associated to the click |
|
|
number |
true |
|
Example: |
KelkooGroup unique identifier for the merchant domain |
|
|
string |
true |
|
Example: |
KelkooGroup merchant name associated to the click |
|
|
string |
true |
|
Domain: { |
KelkooGroup merchant tier associated to the click. See details. |
|
|
string |
true |
|
Example: |
Merchant domain |
Computations
|
Field |
Type |
Optional |
Value |
Description |
|---|---|---|---|---|
|
|
number |
true |
Example: |
Total of clicks |
|
|
number |
true |
Example: |
Total of valid clicks |
|
|
number |
true |
Example: |
Total of invalid clicks due to no matching on a monetized resource |
|
|
number |
true |
Example: |
Total of valid inclicks due to a client issue |
|
|
string |
true |
Example: |
Ratio between |
|
|
string |
true |
Example: |
Ratio between ( |
|
|
number |
true |
Example: |
Total of leads |
|
|
number |
true |
Example: |
Total of rejected leads |
|
|
number |
true |
Example: |
Total of unbilled leads |
|
|
number |
true |
Example: |
Total of tracked leads |
|
|
number |
true |
Example: |
Estimated revenue (local currency) if applicable |
|
|
number |
true |
Example: |
Estimated revenue (EUR) if applicable |
|
|
number |
true |
Example: |
Estimated revenue (GBP) if applicable |
|
|
number |
true |
Example: |
Estimated revenue (USD) if applicable |
|
|
number |
true |
Example: |
Total number of sales |
|
|
number |
true |
Example: |
Total value of the sales, in local currency |
|
|
number |
true |
Example: |
Total value of the sales, in Euros |
|
|
number |
true |
Example: |
Total value of the sales, in Pounds sterling |
|
|
number |
true |
Example: |
Total value of the sales, in United States Dollars |
|
|
number |
true |
Example: |
Number of Links clicks |
|
|
number |
true |
Example: |
Number of Offer clicks |
|
|
string |
true |
Example: |
Cost of Sales percentage |
|
|
string |
true |
Example: |
Lead conversion rate percentage |
|
|
number |
true |
Example: |
Value per lead: the value of sales generated per lead, in local currency |
|
|
number |
true |
Example: |
Value per lead: the value of sales generated per lead, in Euros |
|
|
number |
true |
Example: |
Value per lead: the value of sales generated per lead, in Pounds |
|
|
number |
true |
Example: |
Value per lead: the value of sales generated per lead, in United States Dollars |
|
|
number |
true |
Example: |
The average CPC you have earned, calculated from estimated earnings per valid lead (local currency) if applicable |
|
|
number |
true |
Example: |
The average CPC you have earned, calculated from estimated earnings per valid lead (EUR) if applicable |
|
|
number |
true |
Example: |
The average CPC you have earned, calculated from estimated earnings per valid lead (GBP) if applicable |
|
|
number |
true |
Example: |
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
[
{
"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
[
{
"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
[
{
"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
}
]