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

this.getRequest function doesn't take additional parameters that it internally can pass to private getRequest function #17176

Closed
Sayeeda12 opened this issue Feb 2, 2021 · 3 comments
Labels
invalid For issues or pull requests that are no longer relevant to Matomo core.

Comments

@Sayeeda12
Copy link

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
Copy link
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
Copy link
Author

Sayeeda12 commented Feb 3, 2021 via email

@diosmosis
Copy link
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.

@diosmosis diosmosis added the invalid For issues or pull requests that are no longer relevant to Matomo core. label Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid For issues or pull requests that are no longer relevant to Matomo core.
Projects
None yet
Development

No branches or pull requests

2 participants