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

Allow events to use a bulk Request #7949

Closed
wants to merge 2 commits into from

Conversation

dhoko
Copy link

@dhoko dhoko commented May 20, 2015

Allow events to use a Bulk API Request.

Usefull on a mobile device.

API

Record an event

trackEventList(category, action, [name], [value])

Send events

bulkEventList();

@tsteur
Copy link
Member

tsteur commented Jun 1, 2015

Thx for the PR.

I'm a bit scared we will end up with many methods like trackEventList and bulkEventList and in the future maybe also trackContentList & bulkContentList, trackDownloadList & bulkContentList, ...

Is there a chance we could have something like an enableBulkTracking and doBulkTrack similar to the PHP tracker here https://github.com/piwik/piwik-php-tracker/blob/1.0.0/PiwikTracker.php#L416 and https://github.com/piwik/piwik-php-tracker/blob/1.0.0/PiwikTracker.php#L620 .

Once enableBulkTracking is called all requests would be "queued" and once doBulkTrack is called all requests would be actually tracked in bulk. It wouldn't be exactly the same as you only want events to be tracked in bulk whereas this would track all in bulk. Would it be ok for you if it worked like this? It would be maybe not even too complicated to implement as we could just check in sendRequest whether bulk is enabled, and if so queue it instead of directly sending it.

@dhoko
Copy link
Author

dhoko commented Jun 2, 2015

👍

I will update the PR.

@mnapoli mnapoli added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Jun 2, 2015
@dhoko
Copy link
Author

dhoko commented Sep 1, 2015

I was wondering, using bulk will create a list. It's useless to send it as soon it's created, so how do we send it ?

  • After a custom delay ?
  • After a custom quantity of resquest ?

If we send them asynchronously maybe we need to have a timestamp per request.

@tsteur
Copy link
Member

tsteur commented Sep 2, 2015

I'd maybe wait for eg 300ms or so to see if some more requests are coming and then send the request

@dhoko
Copy link
Author

dhoko commented Sep 2, 2015

We can close this, there is a new PR for the feature #8699

@dhoko dhoko closed this Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants