I want to use getRequest() of Matomo - the one which takes 3 parameters including custom data and plugin function. But since it is a private function, we must call this.getRequest(). But this function only takes request and is almost useless for us because the full capabilities of the private getRequest() aren't met. Please help me achieve this.
Hi @Sayeeda12, can you please explain why you need this? Generally for the tracker it's expected to call the
track... that will actually send the request to track something. Do you need the tracking URL for some reason?
I wanted to use this function to generate a full request along
with plugin callback. So I could use this request and manipulate it before
sending it to the batching queue.
On Wed, 3 Feb, 2021, 7:41 am dizzy, <email@example.com> wrote:
Hi @Sayeeda12 https://github.com/Sayeeda12, can you please explain why
you need this? Generally for the tracker it's expected to call the
track... that will actually send the request to track something. Do you
need the tracking URL for some reason?
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
Hi @Sayeeda12, tracker plugins can be used to accomplish this: https://developer.matomo.org/guides/enrich-js-tracker#hooking-into-plugin-events.
getRequest will execute plugin methods based on what type of request is being sent: https://github.com/matomo-org/matomo/blob/4.x-dev/js/piwik.js#L3759 . The first argument to plugin methods (which is not shown in the examples in the linked document) will have a
request property w/ the current request. The result of the function is appended to current request.
For future requests for information on how to use or integrate matomo, please use the forums: https://forum.matomo.org/ as the issue tracker is only for feature requests and bug reports.