Code Monkey home page Code Monkey logo

Comments (6)

d4rken avatar d4rken commented on July 24, 2024 1

Don't post your login data publicly.

You neither changed the dry-run setting:
getPiwik().setDryRun(BuildConfig.DEBUG);
https://github.com/Fahadellahi/Samplepiwikintegration1/blob/master/app/src/main/java/com/example/fahad/sunshine/MyApplication.java#L60

Nor the tracker address:
return "http://demo.piwik.org";

https://github.com/Fahadellahi/Samplepiwikintegration1/blob/master/app/src/main/java/com/example/fahad/sunshine/MyApplication.java#L29

Nor the site id:
return 1;
https://github.com/Fahadellahi/Samplepiwikintegration1/blob/master/app/src/main/java/com/example/fahad/sunshine/MyApplication.java#L33

from matomo-sdk-android.

d4rken avatar d4rken commented on July 24, 2024

have tried doing the same in my app and example app you have given in this repository.

You would need to insert your tracking URL and site-id into the app code as seen here:
https://github.com/piwik/piwik-sdk-android/blob/master/exampleapp/src/main/java/com/piwik/demo/DemoApp.java
or here:
https://github.com/piwik/piwik-sdk-android#advanced

Note that the example app has getPiwik().setDryRun(true) which disabled the transmission of tracking data.

Please let me know if you need any further details i.e code or snapshot in order to rectify the issue. Currently, I see no bug or warning in the code

If you can link your code I can take a look.

My second query is regarding you example app. Does it shows the usage log itself or it sends its usage log to piwik dashboard?

It sends the data to the piwik tracker, and the Piwik dashboard can display the tracked data.
The Android SDK here is to track and transmit event data, not to display it.

It is not so intuitive, and the app shows no responce against clicks.

The Android system log should show events when you click stuff in the example app.

Can you please provide some details about this on your forum. It would be very nice nd helpful for average programmers like me :)

You mean https://forum.piwik.org/? I don't think either of the main contributors frequents the Piwik forum. Which doesn't mean though that you can't get help on there regarding the Android SDK, but for SDK related, issues you have better luck making a ticket here.

A better documentation is planned, see #97

from matomo-sdk-android.

Fahadellahi avatar Fahadellahi commented on July 24, 2024

Thanks d4rken for you reply.

I tried changing the argument getPiwik().setDryRun. It still doesn't shows anything on dashboard. Following is the git link of sample(basic) app with one button, I have tried to implement to test piwik android sdk. https://github.com/Fahadellahi/Samplepiwikintegration1.git

edit by @d4rken: Don't post login data.

Can you please check this app/ dashboard and see where am I making the mistake. Same are the settings which I am following on the exampleapp from sdk repository. Even that doesn't show anything on piwik dashboard. May be I am making a small mistake in sdk code or missing something.

Furthermore about the forum, sorry I quoted that wrongly. I meant for the same, android sdk repository. I just noticed that there is alot of material in closed issues. However, it may be sufficient for intermediate developers. I am still a beginner and so I couldn't understand everything well.

I really appreciate your help. Looking forward to hear from you, thanks.

from matomo-sdk-android.

Fahadellahi avatar Fahadellahi commented on July 24, 2024

oh alright, well that is just a test dashboard on a trial version of piwikpro. I just want to test the app with the same. Nevertheless, I will take care in future about the credentials.

I tried changing set.DryRun(false) but even then the tracker wasn't producing any usage data on the dashboard.

For the tracker address, I made the same one (i.e http://demo.piwik.org) in my dashboard/websites as a tracker URL. That is why you still see there the same link. I will paste here the snapshot for your reference:

Now I tried using the other URL : exampleapp1.piwik.pro with its ID. But nothing happens on dashboard. By the way I am running this app on my phone not on the simulator. Any idea, what else could be wrong?

piwikdash

from matomo-sdk-android.

d4rken avatar d4rken commented on July 24, 2024

The tracker address is the server address where your piwik tracker is hosted. It is not the website or URL you are tracking.

I would guess that the tracker in your case is http://exampleapp1.piwik.pro/piwik.php and then the site ID would be either 1, 5 or 7.

When tracking the app will output something like this in the logfiles:

com.piwik.demo D/PIWIK:Tracker: URL added to the queue: ?apiv=1&cdt=2016-05-24%2021%3A22%3A59%2B0200&url=http%3A%2F%2Fcom.piwik.demo%2F&action_name=Main%20screen&idsite=53&uid=42c63624-c97d-48ab-ac7e-cda25465e9d2&rand=53417&_id=43fcb150adfc49a1&rec=1&send_image=0
com.piwik.demo D/PIWIK:Dispatcher: Drained 2 events.
com.piwik.demo D/PIWIK:Dispatcher: DryRun, stored HttpRequest, now 1.
com.piwik.demo D/PIWIK:Dispatcher: Dispatched 2 events.

In this case it was still in dry run mode. Note that dispatching happens in batches every 120seconds? or when you exit the app or if you call forceDispatch().

from matomo-sdk-android.

Fahadellahi avatar Fahadellahi commented on July 24, 2024

ahh thanks for correcting me. I was giving the wrong URL. The piwiksdk example from this repository is working. Furthermore, your logfiles script helped a lot to correct the code of my testapp.

Now, I can work on piwiksdk program flow in order to track my app and add more functions 👍 . Thanks alot d4rken for your quick help.

from matomo-sdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.