How to modify the Traffic Overview in the Home screen of the affiliate panel?

To modify the traffic overview you will need to edit the template called period_stats.stpl that you can find under Configuration > Design > Affiliate panel theme > click Edit Theme on the currently active theme. For traffic overview in merchant panel you'd find the template called home_panel_content.stpl.

In these templates you can use the following prefixes, suffixes and variables to get the statistics for various objects like clicks, impressions and commissions.

 

Prefixes

  • $today
  • $lastWeek
  • $thisMonth
  • $lastMonth
  • $last30Days
  • $allTime

 

FirstTier sufix

Works with Commissions object, so the available options are:

  • $todayCommissionsFirstTier
  • $lastWeekCommissionsFirstTier
  • $thisMonthCommissionsFirstTier
  • $lastMonthCommissionsFirstTier
  • $last30DaysCommissionsFirstTier
  • $allTimeCommissionsFirstTier

 

Variables

Variables for count of clicks and impressions:

  • Clicks->count->all <= all clicks or impressions
  • Clicks->count->raw  <= repeated clicks or impressions
  • Clicks->count->unique  <= unique clicks or impressions
  • Clicks->count->declined  <= declined clicks, impressions cannot be declined

Variables for commission (count or commission values):

  • Clicks->count->approved  <=  returns all approved AND unpaid commissions
  • Clicks->count->paid  <=  returns all approved AND paid commissions
  • Clicks->commission->pending  <=  returns all pending commissions
  • Clicks->commission->declined  <=  returns all declined commissions
  • Clicks->commission->all <=  returns all commissions, no matter the status

If you want to get all approved commissions, no matter the payout status, you'd need to get both approved and paid

 

Examples of various objects you can use

Count of impressions
  • Impressions->count->all <= all impressions
  • Impressions->count->raw  <= repeated impressions
  • Impressions->count->unique  <= unique impressions

CPM commissions

  • Impressions->commission->approved

1st tier commissions of type "Sale"

  • Sales->totalCost->approved
  • Sales->count->approved
  • Sales->commission->approved

All 1st tier commissions of type "Action", this lists all Action commissions, no matter the action code

  • ActionCommissions->totalCost->approved
  • ActionCommissions->count->approved
  • ActionCommissions->commission->approved

1st tier commissions of type "Action" with action code "my_action" from all campaigns where this action is defined (available since version 5.11.22.1)

  • ActionCommissions->code_my_action->totalCost->approved
  • ActionCommissions->code_my_action->count->approved
  • ActionCommissions->code_my_action->commission->approved

1st tier commissions of type "Action" with action code "my_action" only from campaign with id 11111111 (available since version 5.11.22.1)

  • ActionCommissions->code_my_action_cmp_11111111->totalCost->approved
  • ActionCommissions->code_my_action_cmp_11111111->count->approved
  • ActionCommissions->code_my_action_cmp_11111111->commission->approved

All commissions, no matter the type

  • Commissions->totalCost->approved
  • Commissions->count->approved
  • Commissions->commission->approved

Refunds

  • Refunds->totalCost->approved
  • Refunds->count->approved
  • Refunds->commission->approved

Chargeback

  • Chargebacks->totalCost->approved
  • Chargebacks->count->approved
  • Chargebacks->commission->approved

Signup Bonus commissions

  • SignupBonus->count->approved
  • SignupBonus->commission->approved

 

Subaffiliates count

It is also possible to display the number of subaffiliates here, to do that please follow this article.

 

Parent affiliate

You can also display parent affiliates details in this section of the affiliate panel with the following variables:

{$parentAffiliate->firstname}
{$parentAffiliate->lastname}
{$parentAffiliate->username}
{$parentAffiliate->email}
{$parentAffiliate->notificationemail}
{$parentAffiliate->refid}
{$parentAffiliate->id}
{$parentAffiliate->data1}
{$parentAffiliate->data2}
{$parentAffiliate->data3}
...
{$parentAffiliate->data25}
{$parentAffiliate->photo}
×