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 not running in Phonegap Apps #8341
Comments
Just a guess, maybe instead of |
If it doesn't work, it would be great if you could remote debug your PhoneGap app and let us know if there are any errors |
Bravooo!!!!......Thanks a lot... var u="http://piwik-techforumatos.rhcloud.com/"; works for me... Searched a lot for this and final you helped. hope on next version piwik site will give the proper js code. because its very difficult to debug third party lib. |
@tsteur do you reckon we should do something to prevent such issues in the future (product improvement, or otherwise a FAQ maybe?) |
Was thinking about this as well. Not sure what best solution would be. If we had a type "PhoneGap App" (similar to type Mobile App or Intranet) then we could generate the tracking code differently based on that but it will maybe not happen that we have such a type. An option in the tracking code generator is maybe too much as only a very few sites are actually PhoneGap apps. Maybe a FAQ entry? But this will be hard to find. Not sure what to do. FAQ seems like easiest solution for now. |
Created FAQ: How do I track a Phonegap app with Piwik? |
I am using piwik to find analyse on website have got the js code from setting option of the piwik.
script type
var _paq = _paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
paq.push(["setCookieDomain", ".techforum-worldline.rhcloud.com"]);
paq.push(["setDomains", [".techforum-worldline.rhcloud.com"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['appendToTrackingUrl', 'bots=1']);
(function() {
var u="//piwik-techforumatos.rhcloud.com/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
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);
})();
Have pasted above code just above tag.
Above code working properly and on dashboard of the piwik getting stats also but same thing via cordavo android apk it's not working. Site is working properly on mobile via apk but call to the piwik not going.
What's wrong there? JavaScript is enabled. Is there a known problem.
Inside config.xml:
access origin="*"
already in place.
The text was updated successfully, but these errors were encountered: