Follow

Show User Events

 

The Show User Events command allows you to return all tracking events of certain types for a subscriber specified by subscriber_id.   While still available to use, this command is deprecated in favor of Report Subscriber Events.

Arguments

The Show User Events command requires the following arguments: Command, Realm, Password, and Subscribrer ID.

api_web?r=myrealm&p=mypass&c=show_user_events&subscriber_id=44956

The command is ‘show_user_events’, the realm is ‘myrealm’ and the password is ‘mypass’.  The command will return the following events, including List and event date, for the subscriber with id='44956':

  • Open
  • Click-Through
  • Unsubscribe
  • Opt-Out
  • Global Opt-Out
  • Hard Bounce
  • Soft Bounce

For other events, please use Report Subscriber Events.

The Show User Events command supports the following arguments:

 

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=show_user_events

c=show_user_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]

Subscriber ID

Yes

Identifier for the subscriber data to return.

subscriber_id=[subscriber_id]

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,xml2]

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=show_user_events&r=myrealm&p=mypass&subscriber_id=298&output_format=csv&headers=1

Successful results return:

"Event","Event ID","List","List ID","Date" "Read Message","10","My List","5","09/26/12 10:12 AM" "Clicked on URL","11","My List","5","09/26/12 10:13 AM" "Unsubscribed","21","My List","5","09/26/12 11:02 AM"

Results

The Show User Events command outputs either the results of the search or a FAILURE message. 

SUCCESS

The Show User 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.

Output Format Exception

Show User Events provides two options to output XML formatted results: xml and xml2.  The original output format is 'xml', where each each result is returned within its own <Data> tag as follows:

<Data> <list_name>List Name</list_name><date>01/04/10 11:56 AM</date> <event>Read message</event><event_id>10</event_id><list_id>891</list_id> </Data> <Data> <list_name>List Name</list_name><date>11/12/09 9:40 AM</date> <event>Read message</event><event_id>10</event_id><list_id>891</list_id> </Data> <Data> <list_name>List Name</list_name><date>11/12/09 9:38 AM</date> <event>Unsubscribed</event><event_id>21</event_id><list_id>891</list_id> </Data>

In order to provide the results in a format similar to other 'Show' reports, an addition output format 'xml2' returns all event results within a single <Data> tag as follows:

<Data> <list_name>List Name</list_name><date>01/04/10 11:56 AM</date> <event>Read message</event><event_id>10</event_id><list_id>891</list_id> <list_name>List Name</list_name><date>11/12/09 9:40 AM</date> <event>Read message</event><event_id>10</event_id><list_id>891</list_id> <list_name>List Name</list_name><date>11/12/09 9:38 AM</date> <event>Unsubscribed</event><event_id>21</event_id><list_id>891</list_id> </Data>  

FAILURE

A Show User Events command will fail for several reasons, such as if the subscriber 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