BreezingForms is a Joomla extension to help you manage various registration forms. This integration integrates "per lead" transaction - a sale commission with no order amount.

1.

Adding a function with thge tracking code

First step is to create a special function that we can call when onclick method for your submit button is triggered. Navigate to your joomla directory /components/com_breezingforms/ and open file facileforms.process.php for edit. Now, find the code of your form - it depends on what settings did you choose in module configuration. In this example we are modifying a form for "Quick mode".

  • find this text: switch ($this->runmode) { case _FF_RUNMODE_FRONTEND:case _FF_RUNMODE_FRONTEND:
  • now locate the first occurrence of line: echo ''.nl();
  • add the following code ABOVE the line with
    // Post Affiliate Pro integration snippet echo '<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script> <script type="text/javascript"> function trackIt() {'." PostAffTracker.setAccountId('Account_ID'); var sale = PostAffTracker.createSale(); sale.setTotalCost(''); sale.setOrderID(\"registration\"); PostAffTracker.register();".' } </script>'; // /Post Affiliate Pro integration snippet

2.

Setting the function for an onclick event

Locate file /administrator/components/com_breezingforms/libraries/crosstec/classes/BFQuickMode.php and open it for edit.

  • locate onclick method in your submit button... there are more unfortunately.
  • insert this line into the onclick event the way it is first in a row:
    trackIt();
    That's it. Now when the submit button is clicked, a new lead is generated.