0

I'm currently using piwik's java api to get my stats but I have some dificulties.

To begin, my standard code :

try {
    SimplePiwikTracker piwik = new SimplePiwikTracker(3, myServer, request);
    piwik.setPageCustomVariable(ACCOUNT_NUMBER, clientAccountNumber);
    piwik.sendRequest(piwik.getLinkTrackURL(request.getRequestURL().toString()));
} catch (PiwikException e1) {
    logger.error("Piwik error", e1);
}

The first problem is that even if I can see visited pages in "user logs", the widget "pages" does not display it.

The second, I want to know the number of different users that are using my website. To do so I send a custom variable containing the client's account number. Do you know a way to know how many different account numbers I have in my stats ?

Thank you for your help and sorry if there's any english mistakes (I hope there is not). :)

Yiwey
  • 111
  • 1
  • 7

2 Answers2

0

I found an answer for my first question.

Instead of using :

piwik.sendRequest(piwik.getLinkTrackURL(request.getRequestURL().toString()));

The solution is to use :

piwik.sendRequest(piwik.getPageTrackURL(request.getRequestURL().toString()));
Yiwey
  • 111
  • 1
  • 7
0

A possible answer to the second question :

When you create a custom variable that is sent to your piwik server go to the custom variable widget. The pagination displayed when you select a variable can be an indication.

But if someone have a better answer, I'd be glad :)

Yiwey
  • 111
  • 1
  • 7