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

Add number of months (similar to date range) #20956

Open
Birkaransingh94 opened this issue Jul 3, 2023 · 3 comments
Open

Add number of months (similar to date range) #20956

Birkaransingh94 opened this issue Jul 3, 2023 · 3 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@Birkaransingh94
Copy link

Birkaransingh94 commented Jul 3, 2023

Issue from customer:

I am creating these embeddings for my coworkers so they can get the best experience with Matomo's integration.

The following embedding code I am using is:

<div id="widgetIframe"><iframe width="100%" height="350" src="https://example.matomo.cloud/index.php?module=Widgetize&action=iframe&containerId=Goal_2&disableLink=1&widget=1&moduleToWidgetize=CoreHome&actionToWidgetize=renderWidgetContainer&idSite=1&period=day&date=yesterday" scrolling="yes" frameborder="0" marginheight="0" marginwidth="0"></iframe></div>

Usually, there period is set to days. I want months or weeks, but when changing the parameter "yesterday" to "month", the embedding fails and stops showing.


We replied:

Unfortunately, at the moment there is no way to customise the number of months shown on the chart. You could, however, display a range of days using:
period=range&date=previous60 or period=range&date=2023-04-01,2023-06-30


Required: Data should be displayed easily by selecting the of number of months from UI.

@Birkaransingh94 Birkaransingh94 added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member labels Jul 3, 2023
@michalkleiner
Copy link
Contributor

If I understand it correctly the enhancement here would be to allow providing the param period with a value of weeks or months, but we'd still need to figure out how to provide how many weeks/months back, whether it's the current week/month or previous week/month etc.

Looking at the FAQ at https://matomo.org/faq/reports/embed-a-matomo-report-in-a-html-page/, we already allow for weeks and months to be used, the customer needs to adjust the period param, not the date param.

@Birkaransingh94 if there's still some enhancement needed here, please provide a clearer requirement what exactly would be needed.

When creating widgets, there are no UI controls for the period or the dates, it's about tweaking the generated iframe URL manually, so passing the FAQ to the customer should help them.

@michalkleiner michalkleiner added Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. and removed To Triage An issue awaiting triage by a Matomo core team member labels Jul 4, 2023
@9joshua
Copy link
Contributor

9joshua commented Jul 6, 2023

@michalkleiner The customer needed to configure his widget chart to display a specific number of months, in this case 4 to save space in his dashboard. So the period would be month and the interval 4, similar to displaying a chart with 6 monthly data points...
image

Using period=month&date=2023-07-01 produces a chart with 24 monthly intervals by default.

Looking at the network tab in the browser when I change the interval, I see this:
Screenshot from 2023-07-06 19-59-47

So the only work around at the moment seems to be calling the saveViewDataTableParameters module prior to loading the chart.

TLDR: Adding the ability to use date=previousX with period=month would be ideal.

@michalkleiner michalkleiner removed the Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. label Jul 6, 2023
@michalkleiner michalkleiner added this to the For Prioritization milestone Jul 6, 2023
@rcontiuk
Copy link

rcontiuk commented Dec 1, 2023

In addition to the number of request, I have a customer who wishes to parameterise a widget graph adding metrics, similar to the graph below:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

4 participants