Difference between revisions of "Nats display stats"

From TMM Wiki
Jump to navigationJump to search
m
 
Line 24: Line 24:
 
| Template used to display output
 
| Template used to display output
 
| Any valid template
 
| Any valid template
| The template, ''function_display_stats''
+
| The template, ''function_display_top_stats''
 
| tpl="mytemplate"
 
| tpl="mytemplate"
 
|-
 
|-

Latest revision as of 18:38, 25 January 2012

NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers
    Template Functions
nats_add_to_array
nats_adtool_replace_linkcode
nats_array_flip
nats_array_to_xml
nats_build_array_by_reference
nats_convert_bytes
nats_decode
nats_display_account_campaigns
nats_display_account_change_history
nats_display_account_notifications
nats_display_account_preview
nats_display_admin_links
nats_display_admin_message
nats_display_adtool_form
nats_display_adtool_types
nats_display_adtools
nats_display_adtools_type_limit
nats_display_choose_adtools_group
nats_display_code_info
nats_display_create_campaign
nats_display_edit_account_details
nats_display_edit_account_settings
nats_display_edit_defaults
nats_display_edit_password
nats_display_edit_payvia
nats_display_edit_payvia_info
nats_display_edit_skin
nats_display_gallery_builder
nats_display_graph
nats_display_hourly_sales
nats_display_latest_adtools
nats_display_map
nats_display_news
nats_display_page_peel
nats_display_payment_history
nats_display_payment_summary
nats_display_ratio
nats_display_reward_category
nats_display_reward_order
nats_display_reward_purchases
nats_display_signup_advanced
nats_display_signup_basic
nats_display_signup_payvia
nats_display_stats
nats_display_stats_calendar
nats_display_stats_form
nats_display_stats_referrals
nats_display_stats_retention
nats_display_stats_subscription_details
nats_display_stats_table
nats_display_timezones
nats_display_top_stats
nats_dump_data
nats_encode
nats_get_first_in_array
nats_get_payment_breakdown
nats_get_period_end
nats_get_reward_categories
nats_get_member
nats_list_adtool_groups
nats_list_affiliates
nats_list_billers
nats_list_campaigns
nats_list_linkcodes
nats_list_options
nats_get_option_details
nats_list_programs
nats_list_sites
nats_list_tool_categories
nats_list_tours
nats_list_xsells
nats_smarty_function_amount_owed
nats_smarty_function_getbonus
nats_smarty_rebuild_form
nats_smarty_rebuild_link
nats_smarty_rebuild_query
nats_tooltip
nats_track_link
nats_strack_link
tmm_admin_pagination
Template Shortcuts
add_to_array
adtool_replace_linkcode
affiliate_select_form
array_flip
array_to_xml
amount_owed
build_array_by_reference
convert_bytes
display_account_campaigns
display_account_change_history
display_account_notifications
display_account_preview
display_admin_links
display_adtool_form
display_adtool_types
display_adtools
display_adtools_type_limit
display_choose_adtools_group
display_code_info
display_create_campaign
display_gallery_builder
display_stats_referrals
display_edit_account_details
display_edit_account_settings
display_edit_defaults
display_edit_password
display_edit_payvia
display_edit_payvia_info
display_edit_skin
display_graph
display_hourly_sales
display_latest_adtools
display_map
display_news
display_page_peel
display_payment_history
display_payment_summary
display_ratio
display_reward_category
display_reward_order
display_reward_purchases
display_signup_advanced
display_signup_basic
display_signup_payvia
display_stats
display_stats_calendar
display_stats_table
display_stats_form
display_stats_retention
display_stats_subscription_details
display_top_stats
display_timezones
dump_data
get_first
get_period_end
get_reward_categories
list_billers
list_campaigns
list_linkcodes
list_options
list_programs
list_sites
list_tool_categories
list_tours
list_xsells
rebuild_form
rebuild_link
rebuild_query
reward_points
tooltip
Common Parameters
assign
assign_prefix
count
data_only
display_on_assign
start
tpl

Applies to NATS 4.0.25 and greater.

nats_display_stats

Displays affiliate statistics.

Alias: display_stats

Parameters

(Required parameters in bold)

Parameter Description Possible Values Default Value Example
tpl Template used to display output Any valid template The template, function_display_top_stats tpl="mytemplate"
assign_prefix Prefix output variables with this word (see Output section below) Any valid Smarty variable name Empty assign_prefix="mystats"
breakdown Show stats by these categories See list of categories in Notes section below. Can be a comma-separated list of categories Date. Shows only stats by date breakdown="camp"
period Show stats for this period See list of periods in Notes section below. Current. Shows stats for current period period="all"
start Start date for freeform period. (See period parameter above) Any date Yesterday. Starts with yesterday's stats start="1 January 2008"
end End date for freeform period. (See period parameter above) Any date Now. Ends with present stats end="26 August 2008"
no_form_vars Does not use parameters set by the user in a form 0 or 1 0. Uses form parameters no_form_vars="1"
no_hits Don't report hits in output 0 or 1 0. Reports hits no_hits="1"
no_transactions Don't report transactions in output 0 or 1 0. Reports transactions no_transactions="1"
no_referral Don't report referrals in output 0 or 1 0. Reports referrals no_referral="1"
order What order to output stats ? breakdown ASC ?
reference_date ? 1 0 reference_date="1"
data_only Set variables but don't display the template 1 None. The template is displayed. data_only=1

Output

Outputs a list of statistics formatted by the parameter of the tpl argument. Also stores output in the variables or arrays listed below; variables are prefixed with argument of the assign_prefix parameter.

  • .breaks
  • .stats
  • .total
  • .breakdown
  • .current_period
  • .filters
  • .period_start
  • .period_end

The following three variables are not prefixed with assign_prefix:

  • period_options
  • countries
  • country_iso

Notes

The arguments for the parameter breakdown, described above, can either be a number, a name, or a list of numbers or names. The table below lists the numbers, names, and argument descriptions.

# Name Argument Description
0 date Current Date
1 camp Campaign
2 prog Program
3 site Site
4 tour Tour
5 option Option
6 adtool Adtool
7 subid1 Sub ID #1
8 subid2 Sub ID #2
9 biller Biller
10 country Country
11 week Week
12 period Period
13 month Month
14 year Year

The arguments for the parameter period, described above, can either be a number, a name, or a list of numbers or names. The table below lists the numbers, names, and argument descriptions.

# Name Argument Description
0 current Current Period
1 last Last Period
2 today Today
3 yesterday Yesterday
4 week This Week
5 month This Month
6 year This Year
7 all All Time
8 free Freeform (See also the start and end parameters above)

See Also