Follow

Report Tracked Events

Table of Contents
  1. 1. Overview
  2. 2. Arguments
      1. 2.1.1. Example
    1. 2.2. Results
      1. 2.2.1. SUCCESS
      2. 2.2.2. FAILURE
  3. 3. Related

Overview

The Report Tracked Events command allows you to return a list of subscribers for any tracked event in a date range.   

Arguments

The Report Tracked Events command requires the following arguments: Command, Realm, Password, Campaign ID, Event Type, Offset, From Date, and To Date.

api_web?r=myrealm&p=mypass&c=rpt_tracked_events&event_type=0&offset=0&start_datetime=06/20/2012%2000:00:00&end_datetime=06/20/2012%2011:59:59

The command is ‘rpt_tracked_events’, the realm is ‘myrealm’ and the password is ‘mypass’.  The command will return every tracked event that occured 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:

"campaign_id","campaign_alias","list_id","list_name","subscriber_id","email","first_name","last_name","event_date","event_type","meta_data"

The Report Tracked Events command supports the following arguments:

 

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=rpt_tracked_events

c=rpt_tracked_events

Realm

Yes

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

realm=[realm_name]

r=[realm_name]

Password

Yes

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

pwd=[password]

p=[password]

Event Type Yes

Identifier for the type of event to report.  To report any event regardless of type, use 0. See Event Types for accepted values.

event_type=[0,event_type_id]

Start Date Yes Date to start reporting statistics

start_datetime=[mm/dd/yyyy%20hh:mm:ss]

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 subscribers.  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.]
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.

version=[version_number]

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]

Header

 

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.

headers=[0,1]

DEFAULT==0

 

Example

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

api_web?c=rpt_tracked_events&r=myrealm&p=mypass&event_type=9&offset=0&start_datetime=06/20/2012%2000:00:00&end_datetime=06/20/2012%2011:59:59&version=8.4.0&output_format=csv&headers=1

Successful results return:

"campaign_id","campaign_alias","list_id","list_name","subscriber_id","email","first_name","last_name","event_date","event_type","meta_data"

"10","","42","my list","13","jack@myemail.com","Jack","Sprat","2012-06-20 10:00:09","9","" "10","","42","my list","14","jane@myemail.com","Jane","Doe","2012-06-20 10:00:09","9","" "11","","42","my list","13","jack@myemail.com","Jack","Sprat","2012-06-20 10:48:25","9","" "11","","42","my list","14","jane@myemail.com","Jane","Doe","2012-06-20 10:48:25","9",""

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

Results

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

SUCCESS

The Report Tracked Events 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 results in an alternate format.

FAILURE

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

FAILURE: [Reason]  

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

Comments

Powered by Zendesk