To get details about contacts that opened a landing page, make a GET call to the reports/landing_pages/campaign_details/{campaign_activity_id}/p_contact_opens
endpoint and include the campaign_activity_id
to identify which landing page to use.
The response returns contact details for all contact opens (identified by contact_id
). If a contact opened a landing page more than once, that contact may appear more than once in the results. The resulting contact data is listed with most recent activity first. The following provides an example response:
{
"tracking_activities": [
{
"contact_id": "fgac8eda-9735-11e9-9d5c-fa163e277e19",
"campaign_activity_id": "62e09568-139e-4cbd-95ae-4d7cafc9b474",
"tracking_activity_type": "p_contact_opens",
"email_address": "f1_csm2355@nullmailer.com",
"first_name": "Joe",
"last_name": "Fawcett",
"device_type": "computer",
"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_opens",
"email_address": "c2_csm2355@nullmailer.com",
"first_name": "Josie",
"last_name": "Langevin",
"device_type": "computer",
"created_time": "2023-06-25T21:53:00.000Z"
},
{
"contact_id": "fgac8eda-9735-11e9-9d5c-fa163e277e19",
"campaign_activity_id": "62e09568-139e-4cbd-95ae-4d7cafc9b474",
"tracking_activity_type": "p_contact_opens",
"email_address": "f1_csm2355@nullmailer.com",
"first_name": "Joe",
"last_name": "Fawcett",
"device_type": "computer",
"created_time": "2023-05-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_contact_opens?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_contact_opens?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_contact_opens?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_contact_opens?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_opens",
"email_address": "f1_csm2355@nullmailer.com",
"first_name": "Joe",
"last_name": "Fawcett",
"device_type": "computer",
"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_opens",
"email_address": "c2_csm2355@nullmailer.com",
"first_name": "Josie",
"last_name": "Langevin",
"device_type": "computer",
"created_time": "2023-06-25T21:53:00.000Z"
},
{
"contact_id": "fgac8eda-9735-11e9-9d5c-fa163e277e19",
"campaign_activity_id": "62e09568-139e-4cbd-95ae-4d7cafc9b474",
"tracking_activity_type": "p_contact_opens",
"email_address": "f1_csm2355@nullmailer.com",
"first_name": "Joe",
"last_name": "Fawcett",
"device_type": "computer",
"created_time": "2023-05-25T21:53:00.000Z"
}
]
}