Detailed Stats

From TMM Wiki
Skins & Templates Admin
Smarty Plugins
Editing Skins
Creating Skins
Switching Skins
Affiliate Stats Template
Affiliate Support Template
Affiliate Login Template
custom errors.php
Template Array Variable
Detailed Stats
NATS Variables
Dialer Statistics
Affiliate Signup
Post URL Variables
Member Usernames & Passwords
Output An Affiliate's Last Paid Date
Custom Program and Campaign Selection Pages
Username Recommendations
Password Retrieval
Post-Biller Templates
Geo-Target Join Options
Template Caching
Random Usernames and Passwords
Base Templates
Protecting Template Data
Mail Reseller Signup Template Variable Names
Smarty print array
News Section Templating
Affiliate Signup Email
Getting The NATSCode
Checking for Usernames on All Sites
Adding Stats to Affiliate Pages
Affiliate Join Page Linkcodes

Setting up detailed stats for affiliates starts in the programs admin. Start by getting the shortname for each program that will offer detailed stats. Figures 1a -- 1c depict navigating through an example programs admin and finding the program short name

Figure 1a Programs admin link from the admin areas list
Figure 1b Sample Programs Admin
Figure 1c Edit Program Details: Short Name

Create the statistics templates in the Skins and Templates admin. Figures 2a -- 2c depict navigating through the Skins and Templates admin and creating templates for each program:

Figure 2a Skins and Templates admin link from the admin areas list
Figure 2b Sample Skins and Templates admin skin list
Figure 2c Create Template form near the top of the list of templates

For each program, create a similar template and replace the last portion of the template name with the program's short name. Be sure to select the appropriate header and footer templates if you use header and footer templates. Once the form has been completed, click the Create button to enter the edit page for your new detailed stats template. Figure 3 depicts the edit template interface:

Figure 3 The edit template page for the new detailed stats template

The design and implementation of the detailed stats page is up to you, but we do provide you with examples near the bottom of the list of templates for each skin. Figure 4 depicts the short list of example templates:

Figure 4 Example template list for detailed stats templates

Your template can display any information available from NATS's stats; below is a short list of the things you might want to display for a pay-per-signup program:

Arrays of data that are looped through or displayed in the template example:

  • $total
  • $stats[day]
    • $stats[day] has the following fields of interest:
    • $stats[day].raw
    • $stats[day].unq
    • $stats[day].signups
    • $stats[day].ratio
    • $stats[day].earned
  • $total has the following fields of interest:
  • $total.raw
  • $total.unq
  • $total.signups
  • $total.ratio
  • $total.earned

For Revenue Share programs, you'll find a different list of fields:

  • $stats[day] has the following fields of interest:
  • $stats[day].signups
  • $stats[day].a_perc_initial
  • $stats[day].rebills
  • $stats[day].a_perc_rebill
  • $stats[day].credits
  • $stats[day].chargebacks
  • $stats[day].a_perc_ccb
  • $stats[day].ratio
  • $stats[day].earned
  • $total has the following fields of interest:
    • $total.signups
    • $total.a_perc_initial
    • $total.rebills
    • $total.a_perc_rebill
    • $total.credits
    • $total.chargebacks
    • $total.a_perc_ccb
    • $total.ratio
    • $total.earned

You can directly use the template example called _ex_stats_detailed_normal for all of your detailed stats pages and simply change the variables used near the end of the template to match the stats you want to display. Once you've created a template you'll be able to access these templates through the existing affiliates stats page. Figure 5 depicts the link to the detailed stats page:

Figure 5 The detailed stats link from the affiliates stats page

More information about Smarty templates and the Smarty template engine, please visit