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

Matomo API Funktion ImageGraph not generating nb_uniq_visitors on period month #18976

Open
Makathen opened this issue Mar 21, 2022 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@Makathen
Copy link

When using the API for our Matomo we wanted to generate an ImageGraph with the folowing API call that represents the uniqe Visitors, the visits and the pageviews:

OurURL/index.php?module=API&method=ImageGraph.get&idSite=1&apiModule=API&apiAction=get&period=month&token_auth=OurToken&date=2021-01-01,2021-12-31&columns=nb_visits,nb_pageviews,nb_uniq_visitors

Expected Behaviour

The ImageGraph is generated.

Actual Behaviour

Getting an error message that nb_uniq_visitors was not found in the report.

When using period=day the graph gets generated. On the Dashboard, of our Matomo Site, the graph set to period month is also generated normaly.

Is this a potential Bug or is the setting for month just not supported for the API call?

@sgiehl
Copy link
Member

sgiehl commented Mar 21, 2022

@Makathen Thanks for creating this issue. The unique visitor metric actually should be available for this report.
I was able to reproduce that locally but couldn't quickly to sort out, why the graph can't display it.
The report API.get is actually a very special one, as it tries to combine all other available get reports. Maybe the column gets unavailable while combining those reports. Guess we need to investigate that further.

@sgiehl sgiehl added the Bug For errors / faults / flaws / inconsistencies etc. label Mar 21, 2022
@Makathen
Copy link
Author

Also I just found that if you call the API.get Method without the ImageGraph and period set to month for example:
OurURL?module=API&method=API.get&idSite=1&period=month&date=2022-01-01&format=Json&token_auth=OutToken&showColumns=nb_uniq_visitors,nb_visits,nb_pageviews
the nb_uniq_visitors is shown. But when the period is set to year it disapears again.

@sgiehl
Copy link
Member

sgiehl commented Mar 23, 2022

Unique visitors metrics are not calculated for years by default. This behavior can be changed by setting enable_processing_unique_visitors_year = 1 in the config. But that can slow down the archiving a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants