@Sayeeda12 opened this Issue on February 2nd 2021

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.

@diosmosis commented on February 3rd 2021 Member

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?

@Sayeeda12 commented on February 3rd 2021

Hi colleagues,

     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.

Thanks,
Sayeeda

On Wed, 3 Feb, 2021, 7:41 am dizzy, <notifications@github.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
https://github.com/matomo-org/matomo/issues/17176#issuecomment-772156597,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGT2YIM7VPSLKXIIOOPNKD3S5CWEFANCNFSM4W6GIG3Q
.

@diosmosis commented on February 4th 2021 Member

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.

This Issue was closed on February 4th 2021
Powered by GitHub Issue Mirror