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 '</form>'.nl();
  • add the following code ABOVE the line with </form>
    // Post Affiliate Pro integration snippet echo '<script type="text/javascript"> document.write(unescape("%3Cscript id=%27pap_x2s6df8d%27 src=%27" + (("https:" == document.location.protocol) ? "https://" : "http://") + "URL_TO_PostAffiliatePro/scripts/trackjs.js%27 type=%27text/javascript%27%3E%3C/script%3E")); </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.
  • nsert 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.