Master One Posted May 8, 2014 Share Posted May 8, 2014 Just wondering about a Piwik Module for PrestaShop 1.6. A quick search showed some non-free modules, as well as the official free module from sutunam, but they all are only for PrestaShop 1.4 or 1.5. A free module would be preferred. Any chance the module for PrestaShip 1.5 from sutunam will work in PrestaShop 1.6? How would a manual implementation look like? Link to comment Share on other sites More sharing options...
prestamax Posted May 8, 2014 Share Posted May 8, 2014 What would you like the module to do? I am tracking my site with piwik without using a module.If you go to your piwik settings and click on websites you will find the tracking code for your website. Just copy it to your themes footer.tpl right before the closing </body> tag. 1 Link to comment Share on other sites More sharing options...
Master One Posted May 8, 2014 Author Share Posted May 8, 2014 I honestly don't know what the existing Piwik modules for PrestaShop do exactly. Of course it's easy to add that code to footer.tpl, just wondering. Link to comment Share on other sites More sharing options...
deSjaak Posted June 30, 2014 Share Posted June 30, 2014 I honestly don't know what the existing Piwik modules for PrestaShop do exactly. Of course it's easy to add that code to footer.tpl, just wondering. Well, the proper Piwik module will keep track of your sales, your e-commerce goals, your products and loads more. Essentially the same as those evil people at google do. I took the old module from GitHub and added/replaced the new Piwik analytics style, it works good now at my site. I just can not get the statistics that are build in into the module to show up in the backoffice statistics page of Prestashop..... Link to comment Share on other sites More sharing options...
Master One Posted August 19, 2014 Author Share Posted August 19, 2014 (edited) Too bad that the free piwik module from sutunam (which is also linked to from the Piwik website) has not been updated since about 2 years any more and obviously is not compatible with v1.6. It really is not only about inserting the code into the footer if you want to do proper conversion tracking. There are two pay-modules compatible with v1.6 but I don't know if they are implemented properly to do it all: Piwik Analytics with e-Commerce Module Piwik Analytics integration with e-commerce Module @deSjaak, so the old v1.5 module is working for you on v1.6.0.9? If only someone with the knowlege could take a look what needs to be fixed or fork the abandoned module from sutunam... Edited August 19, 2014 by Master One (see edit history) Link to comment Share on other sites More sharing options...
sYs^ Posted August 25, 2014 Share Posted August 25, 2014 Hi there, Finally after hours of searching I managed to find a PrestaShop 1.6 compatible piwik tracking module, with order and cart tracking.You can find it here: https://cmjscripter.net/public/2014/01/24/piwik-traking-prestashop/I just installed it on my development site and it seems to be working pretty well. I had to disable the "Use proxy script" feature and there was a minor error in the tracking javascript. (On the 5th line I had change from: {literal}var u= "//{/literal}{$PIWIK_HOST}{literal}" : "//{/literal}{$PIWIK_HOST}{literal}");{/literal} to {literal}var u= "//{/literal}{$PIWIK_HOST}{literal}";{/literal} Otherwise it's working and it's FREE. 2 Link to comment Share on other sites More sharing options...
sumo23 Posted September 22, 2014 Share Posted September 22, 2014 there was a minor error in the tracking javascript. (On the 5th line I had change from: {literal}var u= "//{/literal}{$PIWIK_HOST}{literal}" : "//{/literal}{$PIWIK_HOST}{literal}");{/literal} to {literal}var u= "//{/literal}{$PIWIK_HOST}{literal}";{/literal} Otherwise it's working and it's FREE. Hi. Where can I find that code to change? Link to comment Share on other sites More sharing options...
sYs^ Posted September 24, 2014 Share Posted September 24, 2014 (edited) Hi. Where can I find that code to change? piwikanalytics/views/templates/hook/jstracking.tpl Edited September 24, 2014 by sYs^ (see edit history) Link to comment Share on other sites More sharing options...
sumo23 Posted September 24, 2014 Share Posted September 24, 2014 (edited) Thanks. I have found only /jstracking.tpl in current version of plugin. I've changed code: to {literal}var u= "//{/literal}{$PIWIK_HOST}{literal}";{/literal} but it's still not working Regards Edited September 24, 2014 by sumo23 (see edit history) Link to comment Share on other sites More sharing options...
sYs^ Posted September 24, 2014 Share Posted September 24, 2014 Thanks. I have found only /jstracking.tpl in current version of plugin. I've changed code: to but it's still not working Regards Here is my complete file. <script type="text/javascript"> {if $PIWIK_USE_PROXY eq true} {literal}var u= "{/literal}{$PIWIK_HOST}{literal}";{/literal} {else} {literal}var u= "//{/literal}{$PIWIK_HOST}{literal}";{/literal} {/if}{literal} var _paq = _paq || []; _paq.push(["setSiteId", {/literal}{$PIWIK_SITEID}{literal}]);{/literal} {if $PIWIK_USE_PROXY eq true} {literal}_paq.push(["setTrackerUrl",u]);{/literal} {else} {literal}_paq.push(["setTrackerUrl", u+'piwik.php']);{/literal} {/if} {literal} _paq.push(["setCookieDomain", "{/literal}{$PIWIK_COOKIE_DOMAIN}{literal}"]); _paq.push(['setDomains', "{/literal}{$PIWIK_DOMAINS}{literal}"]); _paq.push(['setVisitorCookieTimeout', '{/literal}{$PIWIK_COOKIE_TIMEOUT}{literal}']); _paq.push(['setSessionCookieTimeout', '{/literal}{$PIWIK_SESSION_TIMEOUT}{literal}']); _paq.push(['enableLinkTracking']); {/literal} {if isset($PIWIK_PRODUCTS) && is_array($PIWIK_PRODUCTS)} {foreach from=$PIWIK_PRODUCTS item=piwikproduct} {literal} _paq.push(['setEcommerceView', '{/literal}{$piwikproduct.SKU}{literal}', '{/literal}{$piwikproduct.NAME|escape:'htmlall':'UTF-8'}{literal}', {/literal}{$piwikproduct.CATEGORY}{literal}, '{/literal}{$piwikproduct.PRICE|floatval}{literal}']); {/literal} {/foreach} {/if} {if isset($piwik_category) && is_array($piwik_category)}{literal} _paq.push(['setEcommerceView', false, false, '{/literal}{$piwik_category.NAME|escape:'htmlall':'UTF-8'}{literal}']);{/literal} {/if} {if $PIWIK_CART eq true} {if is_array($PIWIK_CART_PRODUCTS)} {foreach from=$PIWIK_CART_PRODUCTS item=_product} _paq.push(['addEcommerceItem', '{$_product.SKU}', '{$_product.NAME}', {$_product.CATEGORY}, '{$_product.PRICE}', '{$_product.QUANTITY}']); {/foreach} {/if} {if isset($PIWIK_CART_TOTAL)} _paq.push(['trackEcommerceCartUpdate', {$PIWIK_CART_TOTAL|floatval}]); {/if} {/if} {if $PIWIK_ORDER eq true} {if is_array($PIWIK_ORDER_PRODUCTS)} {foreach from=$PIWIK_ORDER_PRODUCTS item=_product} _paq.push(['addEcommerceItem', '{$_product.SKU}', '{$_product.NAME}', {$_product.CATEGORY}, '{$_product.PRICE}', '{$_product.QUANTITY}']); {/foreach} {/if} _paq.push(['trackEcommerceOrder',"{$PIWIK_ORDER_DETAILS.order_id}", '{$PIWIK_ORDER_DETAILS.order_total}', '{$PIWIK_ORDER_DETAILS.order_sub_total}', '{$PIWIK_ORDER_DETAILS.order_tax}', '{$PIWIK_ORDER_DETAILS.order_shipping}', '{$PIWIK_ORDER_DETAILS.order_discount}']); {/if} {if isset($PIWIK_SITE_SEARCH)} {$PIWIK_SITE_SEARCH} {else} {literal}_paq.push(['trackPageView']);{/literal} {/if} {literal} (function() {var d = document, g = d.createElement("script"), s = d.getElementsByTagName("script")[0];g.type = "text/javascript";g.defer = true;g.async = true;g.src = {/literal}{if $PIWIK_USE_PROXY eq true}{literal}u{/literal}{else}{literal}u+'piwik.js'{/literal}{/if}{literal};s.parentNode.insertBefore(g, s);})(); {/literal} </script> {* let's help get those harvesters and other, comment spammers see http://projecthoneypot.org/ *} <a href="//cmjscripter.net/independence.php" style="display:none;">Most sold products</a> Most sold products Link to comment Share on other sites More sharing options...
Dh42 Posted March 11, 2016 Share Posted March 11, 2016 I missed this thread. We actually have a Piwik module that is free and works with 1.6. You can find it here, https://dh42.com/free-prestashop-modules/prestashop-piwik-statistics/ It also has a few subtle changes from the others. One being is that you can track people's histories by their name in Piwik. You can also track page views by registered users as well. So you can pull a report of users with accounts that have viewed this product, but not purchased it. So you can more effectively market to them. Link to comment Share on other sites More sharing options...
Recommended Posts