matomo-org / piwik-python-api

Piwik API for Python
BSD 3-Clause "New" or "Revised" License
101 stars 43 forks source link

set_ip ignored ? #2

Closed domguard closed 12 years ago

domguard commented 12 years ago

I just tested piwikapi on a view, and although I'm following cloasely the basic example, the IP is not transmitted , the log always shows the tracked site IP. Here is the view

def tagview(request, slug):
    tag = get_object_or_404(Tag, slug=slug)
    pt = PiwikTracker(1, request)
    pt.set_api_url('http://stats.myserver.com/piwik.php')
    pt.do_track_page_view("Tag : %s" % tag.name)
    pt.set_ip(request.META['REMOTE_ADDR'])
    pt.set_token_auth('xxxxxxxxxxxx')
    rdict = {'tag': tag}
    return render_to_response('tag.html', rdict, RequestContext(request))

First I created a Piwik user, but forgot to give him admin rights Now the user has admin rights over the tracked site, his token changed and I modifed it in the code, but I'm still getting only the site's IP The IP passed is correct, it's just like if it's ignored

Any clue to where I should look at first ?