Convertigo now supports MATOMO (Piwik) analytics Out Of The Box !

Here is a new feature from Convertigo Mobility platform’s Mobile builder. We support direct and automatic integration with Matomo (Piwik) Analytics. Matomo comes in when Enterprises are concerned about not sharing too much data with some well knwown Internet giants, and still require some high-quality analytics. Therfore, the new Convertigo 7.5.3 features a new Mobile Builder template directly integrating Matomo. See here how to use it.

Configure the template with Matomo settings

Convertigo mobile builder templates are available in your Studio’s project workspace in the “Project Explorer” tab. Click on the tab to display a file view of all your projects and templates. Template directories are named mobilebuilder_tpl_X_Y_Z. So open the 7.5.3 and edit the mobilebuilder_tpl_7_5_3/src/index.html file :

  

  <!-- un-comment these lines to support Matomo Piwik Analytics. Also set the Matomo-Server-Address:port in server_addr 
  <script type="text/javascript">
	  var _paq = _paq || [];
	  var server_addr = "192.168.100.161:38080";
	  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
	  _paq.push(['trackPageView']);
	  _paq.push(['enableLinkTracking']);
	  (function() {
		var u = window._cordovaNative ? "http://" + server_addr + "/":"//" + server_addr + "/";
	    _paq.push(['setTrackerUrl', u+'piwik.php']);
	    _paq.push(['setSiteId', '2']);
	    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
	    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
	  })();
  </script>-->

Just comment out this code and:

  • Modify the line `var server_addr = ` and set here your Matomo server ip or DNS name and port, for example, `var server_addr = my.matomo.server:443`
  • Modify the line `var u = window._cordovaNative ? “http://….` to `var u = window._cordovaNative ? “https://…` if you want to use HTTPS (Required in most cases)
  • Modify the line `_paq.push([‘setSiteId’, ‘2’]);` and set here your Matomo Web site ID number you will find in the Matomo admin console (https://my.matomo.server:443/index.php?module=SitesManager)

And that’s it! From now on, all Convertigo mobile builder projects based on this template (see Project->MobileApplication->Application->Template property) will support Matomo analytics. Applications pages visited by the user will automatically be monitored by Matomo.

Leave a comment