Tracking Sales in whmcs billing system

I’m using piwik for tracking and for billing… and need some help tracking the sales.

the piwik tag is tracking correctly (placed in the footer template of whmcs billing software) but I can’t figure out how to track the actual sale amount/item etc just using the goals feature…

Other software users have this working with google analytics by adding additional code to the page that is fired EVERY time there is a successful transaction.

So when a transaction is compelted this pages template AND the footer template are executed.

Here’s the an example of the completed sale template that works with Google

$orderid = $this->get_template_vars(‘orderid’);
$userid = $_SESSION[“uid”];

// get client data
$result = select_query(“tblclients”,“city, state, country”,array(“id”=>$userid));
$data = mysql_fetch_array($result);
$city = $data[“city”];
$state = $data[“state”];
$country = $data[“country”];

// get package name
$result = select_query(“tblhosting”,“packageid”,array(“orderid”=>$orderid));
$data = mysql_fetch_array($result);
$packageid = $data[“packageid”];
$result = select_query(“tblproducts”,“name, type”,array(“id”=>$packageid));
$data = mysql_fetch_array($result);
$name = $data[“name”];
$type = $data[“type”];



I’m not a coder by any means… BUT I’m wondering if this will also work with piwik ??? and if so what has to be changed?

the javascript function to register a goal event in piwik is not yet released, it is on our TODO list for the goal tracking plugin. It is currently in alpha release only, and I would expect to have a stable release withing 2 months. stay tuned!


Is the javascript function ready to use for whmcs ?

See: Ecommerce Analytics - Analytics Platform - Matomo