Closed koteswaradk closed 6 years ago
Provide more information. "its not working" is a pretty shitty error description.
Try using the latest version and have a look at the example app.
Here is what i done in my project. public class MyApplication extends Application { private Tracker mPiwikTracker;
public synchronized Tracker getTracker() {
if (mPiwikTracker != null) {
return mPiwikTracker;
}
try {
mPiwikTracker = Piwik.getInstance(this).newTracker("https://mydomain.net/myapp", 30);
} catch (MalformedURLException e) {
Log.w(Tracker.LOGGER_TAG, "url is malformed", e);
return null;
}
return mpiwikTracker;
}
}
In my Activity: Tracker tracker = ((JunAppApplication) TrackHelper.track().screen("/"+getClass().getSimpleName()).title("NavSelector").with(tracker); Link added in the URL location of project created is: https://mydomain.net/myapp Project created id is 30 which is added in the configuration above. I am added application name in the manifest also i am nat able to get the data in the Piwik dashboard of my project i created.
any wrong i am doing please let me now.
Enable logging and check the logfile on your Android device whether the data is getting transmitted.
Note that there is a delay unless you force the transmission to happen directly.
boss i am new to this i have added log but it is not giving any error.
On Tue, Feb 20, 2018 at 4:23 PM, Matthias Urhahn notifications@github.com wrote:
Enable logging and check the logfile on your Android device whether the data is getting transmitted.
Note that there is a delay unless you force the transmission to happen directly.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/matomo-org/piwik-sdk-android/issues/194#issuecomment-366940392, or mute the thread https://github.com/notifications/unsubscribe-auth/AQcfN09k-MbCkiXAdDhxgx9yo-kvztCxks5tWqQogaJpZM4SLZBt .
how can i check that data is transmitting. please help
hi any one please help me in my problem
You can enable logging by including timber in your project: https://github.com/JakeWharton/timber
The library will then start printing debug information into logcat.
You could also set breakpoints inside library code to see at which point you are stuck.
Btw: Don't spam.
if i am using Web view and if i hit the link then results are showing. through the library of android is not working if i use the sample code also its not working.
i am getting this error is the problem with page or where do i need to fix it D/PIWIK:Tracker: Event added to the queue: org.piwik.sdk.TrackMe@903bdb5 D/PIWIK:EventDiskCache: Cache check took 0ms D/PIWIK:EventDiskCache: Uncaching of 0 events took 0ms D/PIWIK:EventCache: Switched state to ONLINE, uncached 0 events from disk. D/PIWIK:Dispatcher: Drained 1 events. D/PIWIK:DefaultPacketSender: status code 404 D/PIWIK:Dispatcher: Unsuccesful assuming OFFLINE, requeuing events. D/PIWIK:Dispatcher: Dispatched 0 events. D/PIWIK:EventDiskCache: Cache check took 0ms D/PIWIK:EventDiskCache: Uncaching of 0 events took 0ms D/PIWIK:EventCache: Switched state to ONLINE, uncached 0 events from disk. D/PIWIK:Dispatcher: Drained 1 events. D/PIWIK:DefaultPacketSender: status code 404
Event added to the queue: org.piwik.sdk.TrackMe@f9ea4b3 D/PIWIK:EventDiskCache: Cache check took 0ms D/PIWIK:EventDiskCache: Uncaching of 0 events took 0ms D/PIWIK:EventCache: Switched state to ONLINE, uncached 0 events from disk. D/PIWIK:Dispatcher: Drained 1 events. D/PIWIK:DefaultPacketSender: status code 400 D/PIWIK:Dispatcher: Unsuccesful assuming OFFLINE, requeuing events. Dispatched 0 events.
Is your tracker URL / ID correct?
yes some times it gives D/PIWIK:EventCache: Switched state to ONLINE, uncached 0 events from disk. D/PIWIK:Dispatcher: Drained 1 events. D/PIWIK:DefaultPacketSender: status code 204 D/PIWIK:Dispatcher: Dispatched 1 events. D/PIWIK:EventDiskCache: Cache check took 0ms in my activity findViewById(R.id.text).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {
Tracker tracker = ((MyApplication) getApplication()).getTracker();
TrackHelper.track().screen(getClass().getSimpleName()).title("Test Sample").with(tracker);
}
} and in may MyApplication
public class MyApplication extends Application{ //private Tracker tracker; private Tracker mPiwikTracker;
public synchronized Tracker getTracker() {
if (mPiwikTracker != null){
return mPiwikTracker;
}
if (mPiwikTracker == null) {
handleSSLHandshake();
mPiwikTracker = Piwik.getInstance(this).newTracker(new TrackerConfig("https://domain.subdomain.net/piwik", 30, "Mobile App")).setDispatchInterval(10000);
return mPiwikTracker;
}
return mPiwikTracker;
}
@Override
public void onCreate() {
super.onCreate();
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog()
.build());
Timber.plant(new Timber.DebugTree());
}
} this i am doing if is there any mistake i have done please help me
do i need to add any other url
now it is giving me 204 error
@koteswaradk I'm also facing the same problem. Did you get any solution?
now it is giving me 204 error
204 (and 200) are both OK
status codes.
It currently looks like your issue is server side.
Closing due to inactivity.
i am trying to implement PIWIK in my android app its not working. can any one let me know how can i use this. is i am done any wrong implementation. i am referring this link:https://www.diycode.cc/projects/piwik/piwik-sdk-android