A free and open-source content management system (CMS) for publishing web content.

Joomla is an award-winning content management system. Joomla is a free & open source content management system for publishing content on the Internet and Intranet as well as a Model–view–controller (MVC) Web Application Development framework.
The system includes features such as page caching to improve performance, RSS feeds, printable versions of pages, news flashes, blogs, polls,website searching, and language internationalization.

1.Login and navigation

Login to your admin panel. Navigate to Settings> Checkout and scroll down to Additional Content & Scripts in the section Order processing.


The sale tracking code to track one commission per order is this:

<script id="pap_x2s6df8d" src="http://URL_TO_Affberry/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
	if (window.location.href.indexOf('/thank_you') > 0) {
		sale.setTotalCost('{{subtotal_price | money_without_currency | replace: ',', '' }}');


And now just save it and you are ready to track the sales now.

If you would want to use also Lifetime Commissions plugin you need to add the following line to right under sale.setProductID(‘{{product_ids}}’); to add the customer’s email address to the order:

Or you can use customer ID instead of email, to keep it private:



Per product integration

In case you want to track per product commissions, you should use this integration code instead of the one from step 2.

<script id="pap_x2s6df8d" src="http://URL_TO_affberry/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
if (window.location.href.indexOf('/thank_you') > 0) {
  var discount = '';
  var discountedperc = 1;
  {% for discount in order.discounts %}
    discount = '{{ discount.code }}';
    if ('{{discount.type}}' !== 'ShippingDiscount') {
    	discountedperc = 1 - {{ discount.amount | money_without_currency | replace: ',', '' }} / ({{ order.subtotal_price | money_without_currency | replace: ',', '' }} + {{ discount.amount | money_without_currency | replace: ',', '' }});
  {% endfor %}

{% for line_item in line_items %}
  var price = {{ line_item.line_price | money_without_currency | replace: ',', '' }} * discountedperc;
  var sale{{ forloop.index }} = PostAffTracker.createSale();
  sale{{ forloop.index }}.setTotalCost(price);
  sale{{ forloop.index }}.setOrderID('{{order_number}}({{ forloop.index }})');
  sale{{ forloop.index }}.setProductID('{{ line_item.sku }}');
  sale{{ forloop.index }}.setCoupon(discount);
{% endfor %}


You are done, this is all needed. Save your changes and you are ready to use the integration.

If you would want to use also Lifetime Commissions plugin you need to add the following line to right under sale{{forloop.index}}.setCoupon(discount); to add the customer’s email address to the order.


Additional info can be found here: not forget to integrate your shop with the click tracking code.

You can insert it into the theme of your store this way:

Online store> Themes> Customize theme (top right corner)> Theme option (top left corner)> Edit HTML/CSS

In ‘Layout’ directory, there is a file called ‘theme/liquid’. Insert the click tracking code right above </BODY> tag in that file and save it.