- Compatible XF 1.x versions
- 1.3
- 1.4
- 1.5
- Additional requirements
- Xen Product Manager 1.2
Piwik Web Analytics 2
- Visible branding
- No
Features
Piwik
What is Piwik?
Piwik is is a web analytics tool like Google Analytics. However, compared to GA it is open source and cannot only be used as a hosted solution where you send all your visitor's data to (one of) the Piwik hoster's servers but it can also be installed on your own webspace. You can try Piwik with the official demo.
Piwik installation
If you would like to install Piwik on your own webspace, check if it meets the requirements. For example, as compared to XF, which needs PHP 5.2.11 or later, Piwik needs at least PHP 5.3.3. The actual installation is like that of XF relatively easy and can be performed within around ten minutes. For more info have a look at the Piwik Installation Guide.
Hint: Google Analytics can be used alongside Piwik without any problems. So you can e.g. continue to use GA (including the historical data) for regular visitor tracking and Piwik for the Ecommerce analytics.
Free Piwik test account
If you are not sure if Piwik is the right solution for you and you just want to test it with your own site, I can give you a free account on my Piwik tracker for at least 30 days. Just start a conversation with me that contains „Piwik test account request“ in the subject and an Email address (required for password change) in the message content. You can also use a disposable Email address if you want. As soon as I've created the account I will reply. Then you can login the tracker with your XF.com user name and the password „pleasechange“.
If you would like to continue to use Piwik after the test period (with your own or another tracker) you can easily make the necessary changes on your XF side. Please keep in mind that this account is only for testing purposes and can be deactived/removed at any time after the 30 day period.
How to setup XenForo for visitor tracking
In order to track your visitors page views, the Piwik JS code snippet (which you can find in the Administration section of the Piwik tracker) has to be on every web page that should be tracked. You can insert the code snippet for example in the ad_below_bottom_breadcrumb template. If you also would like to associate your XF users to the corresponding Piwik visitors, you will have to add an additional code line to the JS tracking code which will then look like this:
<script type="text/javascript">
_paq.push(["setDomains", ["*.mypiwiktracker.com"]]);
<xen:if is="{$visitor.user_id}">_paq.push(['setUserId', '{$visitor.user_id}']);</xen:if>
_paq.push(['trackPageView']);
[...]
</script>
Piwik Ecommerce Analytics
With Piwik you can track different Ecommerce events. The most important are probably your sales. You can analyse the collected data with the detailed Ecommerce reports. For more info have a look at the Piwik Ecommerce User Guide.
Ecommerce Analytics Integration for XPM
This integration add-on currently supports basic Ecommerce tracking. That means it will track all details of an order, including discounts (order level) and taxes (optional). The tracked data is used by Piwik to create various reports than you can view in the Piwik front-end (see screenshots).
Taxes and discounts
To turn on tax tracking check the „Consider Tax“ box in the options. The item prices are always tracked without tax. So if you check the „Tax is included in price“ box, the item price will be lower that the XPM price. Also please note that discounts are currently only tracked on the order level. That means only the total discount amount for an order is tracked.
About the „Product SKU“ and „Product Category“ reports
A product SKU (stock keeping unit) is a unique identifier for a product. For XPM products this will be the product ID which is a positive integer. Optional extras and renewals will be prefixed with „OE-“ and „R-“ by default so that they are treated by Piwik as distinct products.
Each product, optional exra and renewal is assigned to two different categories. The first category „Product x“ whereas „x“ is the XPM product ID to which the item belongs. The secondt category is either „Products“, „Optional Extras“ or „Renewals“.
Compatibility
The add-on is (currently) only tested with the versions stated above. But it may also work with other versions.
Installation
1. Upload the contents of the „upload“ directory to your XF directroy
2. Install the add-on with the supplied XML file
After the installation you have to setup at least a Piwik base URL and the site ID in the options.
Options
On the bottom of the options page near the XPM entry click on „Piwik Ecommerce Analytics Integration for XPM“ and you will see the following page:
Make sure that you enter the correct Piwik base URL and site ID!
Troubleshooting
Problem: XPM orders are not tracked at all
Usually there can be two reasons why the tracking does not work. One of them is a wrong Piwik base URL. So double-check if it is correct. If you get error messages in the Server Log it's very likely that something is wrong with the URL. If you don't get errors in the log when orders should be tracked, check if you have stated the right Site ID.
- Order & Items tracking
- Discounts tracking (order level)
- Tax tracking (optional)
- User ID tracking
- Supports Stripe
Piwik
What is Piwik?
Piwik is is a web analytics tool like Google Analytics. However, compared to GA it is open source and cannot only be used as a hosted solution where you send all your visitor's data to (one of) the Piwik hoster's servers but it can also be installed on your own webspace. You can try Piwik with the official demo.
Piwik installation
If you would like to install Piwik on your own webspace, check if it meets the requirements. For example, as compared to XF, which needs PHP 5.2.11 or later, Piwik needs at least PHP 5.3.3. The actual installation is like that of XF relatively easy and can be performed within around ten minutes. For more info have a look at the Piwik Installation Guide.
Hint: Google Analytics can be used alongside Piwik without any problems. So you can e.g. continue to use GA (including the historical data) for regular visitor tracking and Piwik for the Ecommerce analytics.
Free Piwik test account
If you are not sure if Piwik is the right solution for you and you just want to test it with your own site, I can give you a free account on my Piwik tracker for at least 30 days. Just start a conversation with me that contains „Piwik test account request“ in the subject and an Email address (required for password change) in the message content. You can also use a disposable Email address if you want. As soon as I've created the account I will reply. Then you can login the tracker with your XF.com user name and the password „pleasechange“.
If you would like to continue to use Piwik after the test period (with your own or another tracker) you can easily make the necessary changes on your XF side. Please keep in mind that this account is only for testing purposes and can be deactived/removed at any time after the 30 day period.
How to setup XenForo for visitor tracking
In order to track your visitors page views, the Piwik JS code snippet (which you can find in the Administration section of the Piwik tracker) has to be on every web page that should be tracked. You can insert the code snippet for example in the ad_below_bottom_breadcrumb template. If you also would like to associate your XF users to the corresponding Piwik visitors, you will have to add an additional code line to the JS tracking code which will then look like this:
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setCookieDomain", "*.mypiwiktracker.com"]);_paq.push(["setDomains", ["*.mypiwiktracker.com"]]);
<xen:if is="{$visitor.user_id}">_paq.push(['setUserId', '{$visitor.user_id}']);</xen:if>
_paq.push(['trackPageView']);
[...]
</script>
Piwik Ecommerce Analytics
With Piwik you can track different Ecommerce events. The most important are probably your sales. You can analyse the collected data with the detailed Ecommerce reports. For more info have a look at the Piwik Ecommerce User Guide.
Ecommerce Analytics Integration for XPM
This integration add-on currently supports basic Ecommerce tracking. That means it will track all details of an order, including discounts (order level) and taxes (optional). The tracked data is used by Piwik to create various reports than you can view in the Piwik front-end (see screenshots).
Taxes and discounts
To turn on tax tracking check the „Consider Tax“ box in the options. The item prices are always tracked without tax. So if you check the „Tax is included in price“ box, the item price will be lower that the XPM price. Also please note that discounts are currently only tracked on the order level. That means only the total discount amount for an order is tracked.
About the „Product SKU“ and „Product Category“ reports
A product SKU (stock keeping unit) is a unique identifier for a product. For XPM products this will be the product ID which is a positive integer. Optional extras and renewals will be prefixed with „OE-“ and „R-“ by default so that they are treated by Piwik as distinct products.
Each product, optional exra and renewal is assigned to two different categories. The first category „Product x“ whereas „x“ is the XPM product ID to which the item belongs. The secondt category is either „Products“, „Optional Extras“ or „Renewals“.
Compatibility
The add-on is (currently) only tested with the versions stated above. But it may also work with other versions.
Installation
1. Upload the contents of the „upload“ directory to your XF directroy
2. Install the add-on with the supplied XML file
After the installation you have to setup at least a Piwik base URL and the site ID in the options.
Options
On the bottom of the options page near the XPM entry click on „Piwik Ecommerce Analytics Integration for XPM“ and you will see the following page:
Make sure that you enter the correct Piwik base URL and site ID!
Troubleshooting
Problem: XPM orders are not tracked at all
Usually there can be two reasons why the tracking does not work. One of them is a wrong Piwik base URL. So double-check if it is correct. If you get error messages in the Server Log it's very likely that something is wrong with the URL. If you don't get errors in the log when orders should be tracked, check if you have stated the right Site ID.