Event values being rounded?

Hey, there! First, love Piwik. Easy to get up and going, easy to track advanced features, and (so far) a good API to do stuff with that data.

The problem:

  1. I am setting a custom variable called ‘timestamp’ (which contains a unix timestamp) on my pages:

myTracker.setCustomVariable(2, 'timestamp','<?php echo time(); ?>', 'page');

  1. When I look at it in the Detailed Visitor Log, I see two things: the correct timestamp, and a timestamp rounded to the nearest 1000:

http://54.221.240.49/analytics/piwik.png

  1. When I pull an event report from the API, I get the WRONG, ROUNDED numbers in the max_event_value field.

http://54.221.240.49/analytics/piwikAPIresponse.png

There are a couple of questions I have here:

  1. I am trying just to get the latest events from this query - in order, from most recent event to least recent event. I have thousands of events a day, so it needs to be granular at least to the minute, but preferably second. To do this, I’ve put the timestamp in the custom variable, then I pull the last day’s events, then I sort them after the fact in a script. Is this the easiest way to do this? I tried using the sort parameters with the getEvent method, but they didn’t work. Here’s my call to the API:

http://[myhost]/piwik/?module=API&method=Events.getName&idSite=2&period=day&date=today&segment=eventCategory==[theEventIwant];customVariableName1==custid;customVariableValue1==[specificCustomerId];customVariablePageName2==timestamp;customVariablePageName2<=[setTo24hoursAgo]&format=json&filter_limit=5000&token_auth=[myAPIkey]

I added &filter_sort_column=max_event_value&filter_sort_order=desc to the end of it, but it had no impact.

  1. If I am doing it the best way, what can I do to get the exact timestamp reflected in the max_event_value field?

Thank you for your help! I’ve dug through all the forums and the web with no luck on this one.

Hi,

I think you should create an issue on Sign in to GitHub · GitHub and post also those screenshots, either it’s a bug or it’s something specific that a developer can answer.

Hi efrierson

+1 with Matt - can you create a bug report with steps to reproduce and screenshots?