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

When a dimension implements a goalConversion method, automatically set Report::hasGoalMetrics #10039

Closed
tsteur opened this issue Apr 11, 2016 · 3 comments
Labels
answered For when a question was asked and we referred to forum or answered it. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Apr 11, 2016

Our platform goal is to make it as easy as possible for developers to use features like Goals. So far, in a report, a developer needs to set $this->hasGoalMetrics=true when the dimension defines goal metrics. However, we could likely detect this automatically if the associated dimension implements eg onAnyGoalConversion. See https://github.com/piwik/piwik/pull/10026/files#r59276336

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels Apr 11, 2016
@tsteur tsteur added this to the 3.0.0-b2 milestone Apr 11, 2016
@mattab mattab modified the milestones: 3.0.0-b2, 3.0.0-b3 Oct 30, 2016
@mattab mattab modified the milestones: 3.0.0-b3, 3.0.0-b4 Nov 14, 2016
@tsteur
Copy link
Member Author

tsteur commented Nov 23, 2016

I had a look into this and while I could detect this automatically it would not 100% work since the report would still need to archive a report for goals but only because we are writing a value into log_conversion doesn't mean the report generates this report.
Otherwise could have done:

    public function hasGoalMetrics()
    {
        if ($this->hasGoalMetrics) {
            return true;
        }

        if (!empty($this->dimension) && $this->dimension->hasImplementedEvent('onAnyConversion')) {
            return true;
        }

        return false;
    }

@tsteur
Copy link
Member Author

tsteur commented Nov 23, 2016

Maybe we close the issue? Or postpone it to Piwik 4? I think we could just close it

@mattab
Copy link
Member

mattab commented Dec 1, 2016

Closing for now 👍

@mattab mattab closed this as completed Dec 1, 2016
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Dec 1, 2016
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. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. 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

2 participants