Skip to content
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

Don't see any events being tracked when I'm using the API #10707

Closed
lipis opened this issue Oct 6, 2016 · 3 comments
Closed

Don't see any events being tracked when I'm using the API #10707

lipis opened this issue Oct 6, 2016 · 3 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@lipis
Copy link
Contributor

lipis commented Oct 6, 2016

So according to the API docs for tracking events I'm doing the following in my Python backend (using Flask and Requests):

def track_event_to_piwik(category, action, name, value):
  return requests.post('https://%s/piwik.php' % PIWIK_HOSTNAME, data={
    'idsite': PIWIK_ID,
    'req': 1,
    'url': flask.request.url,
    'rand': random.random(),
    'apiv': 1,
    'e_c': category,
    'e_a': action,
    'e_n': name,
    'e_v': value,
  }).status_code

But I don't see anything in my dashboards.. only the events that are being tracked using JavaScript..

Is there anything that I'm doing wrong?! Yes I'm getting the 200 OK from the above request..

@tsteur
Copy link
Member

tsteur commented Oct 6, 2016

Can you try to rename req => rec ?

@lipis
Copy link
Contributor Author

lipis commented Oct 6, 2016

There is always this one thing!! :D I'll close it for now until further investigation..

@lipis lipis closed this as completed Oct 6, 2016
@tsteur
Copy link
Member

tsteur commented Oct 6, 2016

Sweet. Feel free to reopen in case it doesn't help

@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Oct 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants