Report Tracked Events by Campaign (Prior to v13.0)

The Report Tracked Events by Campaign command allows you to return a list of contacts for any tracked event in a date range for a specific campaign.   

NOTE: As of revision 13.0.0, the rpt_tracked_events_by_campaign command no longer supports returning all events in a single call. You must use the specific event type ID, found in Event Types.

The Report Tracked Events by Campaign command requires the following arguments: Command, Realm, Password, Campaign ID, Event Type, Offset, Start (From) Date, and End (To) Date:


The command is ‘rpt_tracked_events_by_campaign’, the realm is ‘myrealm’ and the password is ‘mypass’.  The command will return every tracked event that occured for campaign_id '11' from 12:00 am on June 20, 2012 to just before midnight on the same day starting with the first result (offset=0).  The report will include the first 250 events with the following details:



Using all commands and arguments (please note the command is wrapped for display purposes only):


Successful results return:


"11","","80","List","13","","Jack","Sprat","2012-06-20 10:48:25","9","","32" "11","","80","List","14","","Jane","Doe","2012-06-20 10:48:25","11","","33"

Some systems have the ability to define a unique Customer Key per contact.  If your realm has Customer Key enabled, and additional column "customer_key" will be included in the results.


The Report Tracked Events by Campaign command outputs either the results of the search or a FAILURE message. 


The Report Tracked Events by Campaign command does not explicitly return a Success code.  Instead, it outputs the campaign id, list name, subject, date sent, and number of recipients in plain text format.  Use the output_format argument to return the following data results in an alternate format:



A Report Tracked Events by Campaign command will fail for several reasons, such as if the date is invalid or the campaign doesn't exist.  The result format is:

FAILURE: [Reason]


The Report Tracked Events by Campaign command supports the following arguments:







Defines the command to use.

cmd= rpt_tracked_events_by_campaign




Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.





Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.



Campaign ID Yes Identifier for the campaign data to return. campaign_id=[campaign_id]
Event Type Yes

Identifier for the type of the single, specific event to report.  To report all events regardless of type, use 0. The argument does not support a comma delimited list of specific events.

See Event Types for accepted values.

NOTE: event_type=0 is no longer valid as of v13.0.0



Start Date Yes Date to start reporting statistics


End Date Yes Date to end reporting statistics end_datetime=[mm/dd/yyyy%20hh:mm:ss]
Offset Yes The starting point from which to return results.  The maximum result for each call is 250 contacts.  For example, offset=0 returns the first 250 results, and offset=250 returns the next 250 results.  Offset is in multiples of 250. offset=[0,250,500,etc.]
Tracking ID   Include the tracking_id to limit the results to a single tracking event. This argument is not supported after v10.0.0 release. tracking_id=[tracking_id]
Version   Version of API to use.  Data may be added to newer versions of the API.  To alleviate issues for users who have already coded file parsing, new columns are only displayed if the version is included.


8.4.0 = meta_data for clicks and bounces


Output Format


To specify the format of the list output, use one of two arguments.  If no argument is included, the default output is space-delimited plain text string, which may not include all data columns.

csv=1 or

output_format=[csv,csv_tab, csv_pipe,xml]



To define the data with a label, use the Header argument.  This can only be used in conjunction with the output format, and does not affect XML.



Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk