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

pdf report: Render unique visitors graph in Visits Summary #8424

Open
Fensterbank opened this issue Jul 24, 2015 · 4 comments
Open

pdf report: Render unique visitors graph in Visits Summary #8424

Fensterbank opened this issue Jul 24, 2015 · 4 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@Fensterbank
Copy link
Contributor

In the statistics section "Visits Summary" of a generated pdf report the unique visits are displayed in the table, but not in the graph.
Only the amount of visits are contained in the graph.

It would be great, if the unique visits will be included in the graph as a particular line, like in my example picture:

piwik_pdf_report

@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Sep 18, 2015
@mattab mattab added this to the Mid term milestone Sep 18, 2015
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
@kiber-io
Copy link

Hello. I don't know why no one has done this for so many years, but I found a method for adding this indicator to the chart (and any other available ones). This is most likely the wrong approach, but it works :)
Actually, you only need to add one line

$response['metadata']['imageGraphUrl'] .= '&columns=nb_visits,nb_uniq_visitors';

at the end of the method

enrichProcessedReportIfVisitsSummaryExtendGet(&$response, $infos)

in file

../plugins/VisitsSummary/VisitsSummary.php

You can see what it looks like in my mini-plugin

@diosmosis
Copy link
Member

Hi @kiber-io, thanks for figuring this out! If this works correctly (I haven't actually tested it), would you be willing to create a pull request for it? I believe the proper place to change the imageGraphUrl property would be in the plugins/VisitsSummary/Reports/Get.php file by adding the following method:

protected function buildReportMetadata()
{
    $reportMetadata = parent::buildReportMetadata();
    $reportMetadata['imageGraphUrl'] = // ...
    return $reportMetadata;
}

That should have the same effect (again, I haven't tested, just looked at the code a bit).

@kiber-io
Copy link

That should have the same effect

Unfortunately, no, at this stage the required key is not in the array
изображение

@kiber-io
Copy link

would you be willing to create a pull request for it?

I didn't do this, because it's hardcore and not everyone needs this indicator in the report

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