MPA3:Affiliate area/Stats API

From Mansion Productions WIKI
Jump to: navigation, search

You can use the stats API to download affiliate stats from MPA3. Here is how to set this feature.

1) Contact the MPA3 owner, and ask him to enable the API for you, by setting up an "API key" under your affiliate details page (in the MPA3 admin).

2) Get this "API key", you will need it to access the API. We'll refer to it as <API_key> below

3) You can use the following url to get stats from MPA3:

  http://mpa3_url.com/api/index.php?affid=&affkey=&siteid=&sdate=&edate=&groupby=&method=get_stats&format=

Where the parameters are as follows:

  • affid - your MPA3 affiliate id.
  • affkey - your API key described in #2 (<API_key>).
  • siteid - the MPA3 site id you want stats for. If you omit this parameter, stats for all sites will be returned.
  • sdate - the starting date from which stats to be returned. The format of the date is YYYY-MM-DD.
  • sdate - the ending date till which stats to be returned. The format of the date is YYYY-MM-DD.
  • groupby - how to group the stats. Available groupings are:
    • site
    • date
    • campaign
  • format - how to return the data. Available formats are:
    • xml
    • json


Here is an example:

  http://mpa3_url.com/api/index.php?affid=100001&affkey=6g7ef94fbae8c348477a7b10d31ct8eb&siteid=1&sdate=2013-01-15&edate=2013-10-15&groupby=site&method=get_stats&format=xml

4) The API will return result with the following columns:

  • site, date or campaign - the site title, the date or the campaign title, depending on what groupby parameter you passed to the API.
  • raw - the raw hits
  • uniques - the unique hits
  • free_trials - the number of free trials
  • trials - the number of trial sales
  • full_price - the number of full price sales (where the initial days are equal to the recurring days)
  • conversions - the number of conversions (trials or free trials that rebilled)
  • rebills - the number of the rebills
  • chargebacks - the number of chargebacks
  • credits - the number of credits
  • payout - the sum of the payouts resulted from all sales.
Personal tools
Namespaces

Variants
Actions
Products
Navigation
Toolbox