DP6/roger-watcher

Batch Endpoint not Caught

TheSench opened this issue · 4 comments

When requests are sent in batches via the google-analytics.com/batch endpoint, they are not caught by the plugin.

@TheSench thank you for pointing out this problem, it is already being analyzed for correction.

I know of at least the following two tweaks that need to be made:

  1. Add the /batch endpoints here
  2. Add the following additional processing here to process the individual requests separately:
.map(row => row.split('\n'))
.flat()

The following regex statements also need to be updated to handle /batch instead of /collect?{queryString}:
https://github.com/DP6/roger-watcher/blob/master/src/js/rules.js#L4

Making these changes appears to get batch collection working.

I can throw up a PR later when I get the time.