New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Piwik doesn't track some mobile devices #8151
Comments
Hi @igorkba We need to get to the bottom of this issue and understand why some of your data is not tracked in Piwik. thanks for sending us more info! |
Hi @mattab utils.register('addTrans', function (idTrans, skuKod, gaProductName, total, quantity, gaCategory) {
var showUserInfo = function showUserInfo() {
var userInfo = 'userID - ' + skuKod + ' || user agent - ' + navigator.userAgent + ' || cookieEnabled - ' + navigator.cookieEnabled + ' || time - ' + Date();
return userInfo;
};
if (ga) {
try {
ga('ecommerce:addTransaction', {
'id': idTrans, // Transaction ID. Required
'affiliation': '', // Affiliation or store name
'revenue': total // Grand Total
});
ga('ecommerce:addItem', {
'id': idTrans, // Transaction ID. Required
'name': gaProductName, // Product name. Required
'sku': skuKod, // SKU/code
'category': gaCategory, // Category or variation
'price': total, // Unit price
'quantity': '1' // Quantity
});
ga('ecommerce:send');
} catch (e) {
//eat exception
}
}
if(typeof _paq != 'undefined') {
utils.trackEvent('Add Transaction - success', showUserInfo()); // track event to GA
}
else {
utils.trackEvent('Add Transaction - fail', showUserInfo()); // track event to GA
}
if (typeof _paq != 'undefined') {
try {
_paq.push(['setUserId', skuKod]);
_paq.push(['trackPageView']);
_paq.push(['addEcommerceItem',
skuKod, // (required) SKU: Product unique identifier
gaProductName, // (optional) Product name
gaCategory, // (optional) Product category.
total, // (recommended) Product price
1 // (optional, default to 1) Product quantity
]);
_paq.push(['trackEcommerceOrder',
idTrans,
total
]);
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);
}
}
}); No 'Add Transaction - fail' event in the GA(only success) and all users has cookieEnabled - true. |
Thanks for this, it's great to hear you're investigating. let us know what you find and when we can help |
Good news piwik team, problem detected and solved. Igor |
Ok. Thanks for the update |
Follow up to share this knowledge in a FAQ: Document the possible issue with data not being tracked and SSL certificates / net::ERR_INSECURE_RESPONSE #8220 |
Hi folks,
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:
track ecommerce:
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):
thx,
Igor
The text was updated successfully, but these errors were encountered: