Arguments
The Report Contact Clicks command requires the following arguments: Command, Realm, Password, Campaign ID and URL.
api_web?r=myrealm&p=mypass&c=rpt_clicked_on&campaign_id=12&url=http://www.google.com
The command is ‘rpt_clicked_on’, the realm is ‘myrealm’ and the password is ‘mypass’. The command will return a list of all contacts that clicked the link in the campaign including email address, first name, last name, and event date.
The Report Contact Clicks command supports the following arguments:
Name |
Req? |
Description |
Argument |
Command |
Yes |
Defines the command to use. |
cmd=rpt_clicked_on c=rpt_clicked_on |
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] |
Campaign ID |
Yes |
Identifier for the campaign to report. |
campaign_id=[campaign_id] |
URL | Yes | The URL to report contact click-through totals. The URL parameter must be URL encoded for the command to work. For more information, see Special Characters. |
url=[url] |
Exact | To limit your results to a specific URL, set exact to 1. If set to 0, all URLs that Start With the specified string will be reported. |
exact=[0,1] DEFAULT==0 |
|
Unique | To limit your results to the unique clicks per URL, set unique to 1. If set to 0, every click for every contact for the URL in the campaign will be counted. |
unique=[0,1] DEFAULT==0 |
|
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_clicked_on&r=myrealm&p=mypass&campaign_id=12&url=http://www.google.com&exact=1&unique=1&output_format=csv&headers=1
Successful results return:
"email","first_name","last_name","event_date" "john.doe@myemail.com","","","2008-12-23 12:11:51" "jane@myemail.com","","","2008-12-23 12:11:33" "john.doe@myemail.com","","","2008-12-23 12:11:39""
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.
Results
The Report Contact Clicks command outputs either the results of the search or a FAILURE message.
SUCCESS
The Report Contact Clicks command does not explicitly return a Success code. Instead, it outputs the campaign details in plain text format. Use the output_format argument to return the results in an alternate format.
FAILURE
A Report Contact Clicks command will fail for several reasons. The result format is:
FAILURE: [Reason]