Piwik doesn't track some mobile devices


#1

Hi piwik developers,
I’m software developer(mobile applications) and I’m new in the piwik. Our company has decided to replace from Google Analytics to Piwik, but we found some problems. Piwik track approximately only half of Ecommerce items like google analytics. for example: GA 10 000 ecommerce items and piwik only 5 000 ecommerce items. I have created a special tracking code that detects these users. Here is our javascript settings, piwik settings and part of devices which piwik doesn’t track:
piwik:
-piwik version: latest
-Do Not Track support: disabled
javascript(our application required that all user must enabled javascript):
-bootstrap:
when DOM ready:


try {
     _paq = _paq || [];
    _paq.push(['setSiteId', app.options.siteId]); // for example - 2
    _paq.push(['setTrackerUrl', 'https://some_adress/piwik.php']);
    _paq.push(['enableLinkTracking']);
    }
    catch (e) {
        if (typeof ga != 'undefined') {
        var message = e.name + ' | ' + e.message + ' | ' + e.stack + ' | ' + navigator.userAgent + + ' || time - ' + Date();
        ga('send', 'event', 'piwik-error', 'bootstrap', message, null);
    }
    }

track ecommerce:


if (typeof _paq != 'undefined') {
	try {
		_paq.push(['setUserId', skuKod]); // 124789
		_paq.push(['trackPageView']);		
		_paq.push(['addEcommerceItem',
			skuKod, // 124789
			gaProductName, // some string
			gaCategory, // some string
			total, // number
			1 // always 1
		]);
		_paq.push(['trackEcommerceOrder',
			idTrans, // unix time stamp
			total // number
		]);
		console.log('_addItem', idTrans, skuKod, gaProductName, gaCategory, total);
	} catch (e) {
		ga('send', 'event', 'piwik-error', 'utils', 'userID' + '-' + skuKod + ':' + e.name + ' | ' + e.message + ' | ' + e.stack + ' | ' + navigator.userAgent + ' || time - ' + Date(), null);
	}
}

piwik.js - I a little changed it(only try catch bock for error tracking to GA) and included to our all.js javascript file(Adblock hide etc), because at first I thought that some users blocking piwik.js. link on piwik.js: http://www.fileshare.sk/shares/cp6ihuopr/piwik.js
From GA: _paq object exists and no piwik error.
Part of devices which piwik no tracking(it looks only Android and only Chrome problems):

  • Sony D2203, Android 4.4.2, Chrome 35.0.1916.141, user agent - Mozilla/5.0 (Linux; Android 4.4.2; D2203 Build/18.4.C.1.36) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.141 Mobile Safari/537.36
  • Samsung GT-S7580 Trend Plus, Android 4.2.2, Chrome 34.0.1847.114, user agent - Mozilla/5.0 (Linux; Android 4.2.2; GT-S7580 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36
  • Samsung SM-G357FZ, Android 4.4.4, Chrome 43.0.2357.93, user agent - Mozilla/5.0 (Linux; Android 4.4.4; SM-G357FZ Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Mobile Safari/537.36
  • Sony C5303 Xperia SP, Android 4.1.2, Chrome 35.0.1916.138, user agent - Mozilla/5.0 (Linux; Android 4.1.2; C5303 Build/12.0.A.1.257) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.138 Mobile Safari/537.36
  • Samsung GT-P3100 Galaxy Tab 2 7.0, Android 4.1.2, Chrome 43.0.2357.93, user agent - Mozilla/5.0 (Linux; Android 4.1.2; GT-P3100 Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Safari/537.36
  • Sony D6503 Xperia Z2, Android 5.0.2, Chrome 39.0.2171.93, user agent - Mozilla/5.0 (Linux; Android 5.0.2; D6503 Build/23.1.A.1.28) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Mobile Safari/537.36
  • Feiteng GT-i9300, Android 4.3, Chrome 43.0.2357.93, user agent - Mozilla/5.0 (Linux; Android 4.3; GT-I9300 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Mobile Safari/537.36
  • Sony D6503 Xperia Z2, Android 5.0.2, Chrome 39.0.2171.93, user agent - Mozilla/5.0 (Linux; Android 5.0.2; D6503 Build/23.1.A.1.28) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Mobile Safari/537.36
  • Samsung GT-I9195 Galaxy S4 Mini, Android 4.2.2, Chrome 18.0.1025.308, user agent - Mozilla/5.0 (Linux; Android 4.2.2; sk-sk; SAMSUNG GT-I9195/I9195XXUBML4 Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Version/1.0 Chrome/18.0.1025.308 Mobile Safari/535.19
  • Sony LT25i Xperia V, Android 4.3, Chrome 43.0.2357.93, user agent - Mozilla/5.0 (Linux; Android 4.3; LT25i Build/9.2.A.2.5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Mobile Safari/537.36
  • Sony D2303 Xperia M2, Android 4.4.4, Chrome 43.0.2357.93, user agent - Mozilla/5.0 (Linux; Android 4.4.4; D2303 Build/18.3.1.C.1.15) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Mobile Safari/537.36
  • Sony LT30p Xperia T, Android 4.0.4, Chrome 41.0.2272.96, user agent - Mozilla/5.0 (Linux; Android 4.0.4; LT30p Build/7.0.A.3.223) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36
  • Samsung GT-I9505 Galaxy S IV, Android 4.4.2, Chrome 28.0.1500.94, user agent - Mozilla/5.0 (Linux; Android 4.4.2; sk-sk; SAMSUNG GT-I9505 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Mobile Safari/537.36
  • Sony D2005 Xperia E1, Android 4.4.2, Chrome 34.0.1847.114, user agent - Mozilla/5.0 (Linux; Android 4.4.2; D2005 Build/20.1.A.2.13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36

thx,

Igor


#2

discussion here: Piwik doesn't track some mobile devices · Issue #8151 · matomo-org/piwik · GitHub


#3

problem solved: Piwik doesn't track some mobile devices · Issue #8151 · matomo-org/piwik · GitHub