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

Referrers.getAll doesn't return search engines #16956

Closed
rhughes8469 opened this issue Dec 15, 2020 · 4 comments
Closed

Referrers.getAll doesn't return search engines #16956

rhughes8469 opened this issue Dec 15, 2020 · 4 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@rhughes8469
Copy link

When sending an API request to Referrers.getAll, the results returned include: Websites, Social Networks, Campaigns, "no referrer", & Keyword/Search Engines

I'm trying to display a list of referrers from the data that is returned.
For websites and social networks I can display the "URL" as the referrer.
For campaigns I can display the campaign "Label" as the referrer.
For no referrer I can display, "No Referrer"

My issue is with Keyword/Search Engines. The API returns each keyword but does not return which search engine it's from.

How do I know which Search engine to display as the referrer, since a keyword by itself, isn't really a "referrer". And if I omit the keywords from the list of referrers I'm displaying, it won't add up to the number of page views.

@sgiehl
Copy link
Member

sgiehl commented Dec 15, 2020

If Referrers.getAll doesn't include the data you require, you might need to use other API methods maybe. e.g. you can simply use Referrers.getSearchEngines to get a list of search engines that referred visits to your site.

@sgiehl sgiehl closed this as completed Dec 15, 2020
@sgiehl sgiehl added the answered For when a question was asked and we referred to forum or answered it. label Dec 15, 2020
@rhughes8469
Copy link
Author

rhughes8469 commented Dec 15, 2020 via email

@sgiehl
Copy link
Member

sgiehl commented Dec 15, 2020

I’m not sure why this would not be considered a bug.

It's just how the method is supposed to work. The report this API method is used for actually also says it in it's description: "This report shows all your Referrers in one unified report, listing all Websites, Search keywords and Campaigns used by your visitors to find your website."

How would one get the actual referrers in page view order. Make two different API requests, then merge the arrays, and somehow resort the result by visits?

Guess that's how I would try to achieve that. Unless you don't want to write a simple plugin that uses Matomo internal methods to achieve that...

@rhughes8469
Copy link
Author

Thanks Stefan. I really do appreciate your responses. I would try the plugin route, but my MySQL skills would surely result in a much slower API request that making two and resorting! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants