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 suffix

Works with Commissions object, so the available options are:

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

Variables

The following accessors work with most stat objects. In the examples below, replace Clicks with any object from the Examples section — the same patterns apply to all of them.

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

Tip: If you want to get all approved commissions, no matter the payout status, you need to get both approved and paid.

Per-campaign filtering

For Sales, Commissions, and ReferralCommissions objects, you can limit statistics to a single campaign by inserting cmp_<campaignId> directly after the object name, where campaignId is the full-length ID from your campaign settings (how to find your campaign ID). Example — this month's sales for campaign 11111111:

{$thisMonthSales->cmp_11111111->totalCost->approved|currency_span}

For ActionCommissions, the campaign ID is appended to the action code instead — see the examples below.

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

1st tier commissions of type "Recurring"

  • $recurringCommissionsEnabled with no prefix or suffix returns Y and N depending on whether the Recurring Commissions feature is enabled or not.
  • RecurringCommissions->totalCost->approved
  • RecurringCommissions->count->approved
  • RecurringCommissions->commission->approved

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

  • $actionCommissionsEnabled with no prefix or suffix returns Y and N depending on whether any Action commission type is configured.
  • 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

Referral commissions

  • ReferralCommissions->commission->approved
  • ReferralCommissions->commission->paid
  • ReferralCommissions->commission->pending
  • ReferralCommissions->count->approved
  • ReferralCommissions->count->paid
  • ReferralCommissions->count->pending

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}
×