Need An Email Marketing Solution For All Of Your Customers?

Partner With VerticalResponse!

getEmailCampaignResponseHistograms


The getEmailCampaignResponseHistorgrams() method provides campaign response stats such as opens, clicks, bounces, and unsubscribes in histogram form suitable for input into graphing tools.

Input

[vrtypens:getEmailCampaignResponseHistogramsArgs]

session_id [xsd:string] (required)
Your API session id.
campaign_ids [vrtypens:ArrayOfInteger] (required)
The ids of the campaigns whose stats are to be retrieved.
response_types [vrtypens:ArrayOfString] (required)
An array of response types to include. Valid values are:

  • OPEN
  • CLICK
  • SALE
  • BOUNCE
  • UNSUBSCRIBE
bins [xsd:int] (required)
The number of intervals that will be represented in the result (default is 2).
min_minutes_since_launch [xsd:int]
The number of minutes after launch where the reporting of events should begin (default is 0).
max_minutes_since_launch [xsd:int] (required)
The number of minutes after launch where the reporting of events should end (default is 2).

Output

[vrtypens:ArrayOfEmailCampaignResponseHistogram]
The output is a variety of response stats for the given campaign.

Examples

PHP

$vr->getEmailCampaignResponseHistograms( array(
	'session_id' => $sid,
	'campaign_ids' => array( $cid ),
	'bins' => 2,
	'max_minutes_since_launch' => 2,
	'response_types' => array( "OPEN", "CLICK"),
	) );          

Ruby

vr.getEmailCampaignResponseHistograms({
	'session_id' => sid,
	'campaign_ids' => [cid],
	'bins' => 2,
	'max_minutes_since_launch' => 2,
	'response_types' => ["OPEN", "CLICK"]
})

Java

String[] response_types = { "OPEN", "CLICK" };
int[] campaign_ids = { campaignId };

GetEmailCampaignResponseHistogramsArgs getEmailCampaignResponseHistogramsArgs = new GetEmailCampaignResponseHistogramsArgs();
	getEmailCampaignResponseHistogramsArgs.setSession_id(sessionID);
	getEmailCampaignResponseHistogramsArgs.setCampaign_ids(campaign_ids);
	getEmailCampaignResponseHistogramsArgs.setBins(2);
	getEmailCampaignResponseHistogramsArgs.setMax_minutes_since_launch(2);
	getEmailCampaignResponseHistogramsArgs.setResponse_types(response_types);

vr.getEmailCampaignResponseHistograms(getEmailCampaignResponseHistogramsArgs);

C#/.NET

getEmailCampaignResponseHistogramsArgs objGetHistogram = new getEmailCampaignResponseHistogramsArgs();
	objGetHistogram.session_id = sessionId;
	objGetHistogram.campaign_ids = new int[] { campaignId };
	objGetHistogram.bins = 2;
	objGetHistogram.max_minutes_since_launch = 2;
	objGetHistogram.response_types = new string[] { "OPEN", "CLICK" };

try
{
    objVR.getEmailCampaignResponseHistograms(objGetHistogram);
}
catch (Exception e)
{
    System.Console.WriteLine(e.Message);
}

Perl

$vrapi->getEmailCampaignResponseHistograms( {
	session_id => $sid,
	campaign_ids => [ $cid ],
	bins => 2,
	max_minutes_since_launch => 2,
	response_types => [ "OPEN", "CLICK"]
} );