To get details about contacts that uniquely clicked a link on a landing page, make a GET call to the reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_clicks
endpoint and include the campaign_activity_id
to identify which landing page campaign activity to use.
The response returns contact details for unique contact clicks (identified by contact_id
and url_id
). The same contact may appear more than once in the results if they clicked more than one link on the landing page. The resulting contact data is listed with most recent activity first.
The following example shows contact details returned in the response for unique contact clicks tracking activities.
{
"tracking_activities": [
{
"contact_id": "fgac8eda-9735-11e9-9d5c-fa163e277e19",
"campaign_activity_id": "62e09568-139e-4cbd-95ae-4d7cafc9b474",
"tracking_activity_type": "p_contact_click",
"email_address": "f1_csm2355@nullmailer.com",
"first_name": "Joe",
"last_name": "Fawcett",
"device_type": "computer",
"url_id": "4374642855454351379",
"link_url": "http://www.sample.com/",
"created_time": "2023-06-25T21:53:00.000Z"
},
{
"contact_id": "dfac8eda-9735-11e9-9d5c-fa163e277e19",
"campaign_activity_id": "62e09568-139e-4cbd-95ae-4d7cafc9b474",
"tracking_activity_type": "p_contact_click",
"email_address": "c2_csm2355@nullmailer.com",
"first_name": "Josie",
"last_name": "Langevin",
"device_type": "computer",
"url_id": "3474642855454351380",
"link_url": "http://www.dogget.com/",
"created_time": "2023-06-25T21:53:00.000Z"
}
]
}
Parameters
-
campaign_activity_id
- Identifies which landing page campaign activity to use. Required. -
contacts_filter
- Filters which contacts details to return, specify the contacts full or partial first or last name, or email. For example:Josie
orJo
. Optional. -
limit
- Limits the number of tracking activities to return on each page. Valid values are1
through500
and the default value is500
. Optional.
Example GET Request
The code examples that follow include both the limit
and contacts_filter
optional query parameters.
GET https://api.cc.email/v3/reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_clicks?limit=2&contacts_filter=joe
Endpoint Requirements
User privileges: ui:campaign:metrics
Authorization scopes: campaign_data
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.cc.email/v3/reports/contact_reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_clicks?limit=2&contacts_filter=joe',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: */*',
'Authorization: Bearer {access_token}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location
'https://api.cc.email/v3/reports/contact_reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_clicks?limit=2&contacts_filter=joe' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Authorization: Bearer {access_token}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.cc.email/v3/reports/contact_reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_clicks?limit=2&contacts_filter=joe'")
.method("GET", body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "*/*")
.addHeader("Authorization", "Bearer {access_token}")
.build();
Example Response
{
"tracking_activities": [
{
"contact_id": "fgac8eda-9735-11e9-9d5c-fa163e277e19",
"campaign_activity_id": "62e09568-139e-4cbd-95ae-4d7cafc9b474",
"tracking_activity_type": "p_contact_click",
"email_address": "f1_csm2355@nullmailer.com",
"first_name": "Joe",
"last_name": "Fawcett",
"device_type": "computer",
"url_id": "4374642855454351379",
"link_url": "http://www.sample.com/",
"created_time": "2023-06-25T21:53:00.000Z"
},
{
"contact_id": "dfac8eda-9735-11e9-9d5c-fa163e277e19",
"campaign_activity_id": "62e09568-139e-4cbd-95ae-4d7cafc9b474",
"tracking_activity_type": "p_contact_click",
"email_address": "c2_csm2355@nullmailer.com",
"first_name": "Josie",
"last_name": "Langevin",
"device_type": "computer",
"url_id": "3474642855454351380",
"link_url": "http://www.dogget.com/",
"created_time": "2023-06-25T21:53:00.000Z"
}
]
}