Closed alberto-bottarini closed 3 years ago
@jorgeborges have you taken a look?
I hope to review this one in the upcoming weeks @alberto-bottarini, but definitely this month.
I was thinking...
maybe I could add emptyQueue
inside sendEnqueuedHits
to automatically empty the queue after GA request
@alberto-bottarini I think that's a good idea. That would make the feature more comfortable to use.
I would also prefer if after adding 20 events to the queue, it automatically sends them (and empties the queue), instead of throwing an Exception. Another approach would be to remove the first event in the queue and add the latest one, keeping it a 20.
Also, just noticed something missing from the PR is updating the README, can you please update it with a description of batch request feature and examples?
Ok. I followed this "exception approach" to be more coherent with the actual code: you throw, for example, an exception if a mandatory parameter is missing.
But it's just philosophy. I prefer a clear api instead of magic behaviour like pushing data without a specific method invocation or removing item without notification.
Tell me what you like in order to implement it :)
About readme, you are right. I will update it as soon we define the new methods.
OK @alberto-bottarini, I will take a look, thoroughly review the PR, and tell you how I think we should proceed in the upcoming weeks. Apologies for taking so long but I'm busy with the office work right now.
Hi @jorgeborges, did you take a look?
@jorgeborges any news?
Terribly sorry about this one @alberto-bottarini, I have requested vacations from 21~25 September in about one week from now, I'll use some of those days to review and make any changes to this PR as needed.
This PR allows you to batching multiple hits in a single request using
/batch
endpoint.It adds some new methods:
Here's an example:
I updated tests and upgraded some dependencies