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.org] Link to MatomoTracker.php wrong #12891

Closed
fdellwing opened this issue May 11, 2018 · 4 comments
Closed

[matomo.org] Link to MatomoTracker.php wrong #12891

fdellwing opened this issue May 11, 2018 · 4 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@fdellwing
Copy link
Contributor

https://matomo.org/docs/tracking-api/#use-case-tracking-data-using-the-php-client: This page has a directlink to download the MatomoTracker.php -> http://demo.matomo.org/index.php?module=SitesManager&action=downloadPiwikTracker&idSite={$IDSITE}&piwikUrl=http://piwik.example.org/

But the file it downloads is not very helpful.

<?php
/**
 * Piwik - free/libre analytics platform
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 *
 */

// PiwikTracker.php is now managed by composer. To prevent breaking existing
// code, this file has been left as a redirect to its new location in the
// vendor directory.
if (!class_exists('PiwikTracker')) {
    require_once __DIR__ . '/../../vendor/piwik/piwik-php-tracker/PiwikTracker.php';
}

if (PiwikTracker::VERSION !== 1) {
    throw new Exception("Expected PiwikTracker in libs/PiwikTracker/PiwikTracker.php to be version 1 for keeping backward compatibility.");
}

Instead it should link to https://raw.githubusercontent.com/matomo-org/matomo-php-tracker/master/PiwikTracker.php or https://github.com/matomo-org/matomo-php-tracker/releases/latest

(Or you could rework the Action if you really want to)

@Findus23
Copy link
Member

@fdellwing Many thanks for the info.

As a quick fix I replaced the URL with https://raw.githubusercontent.com/matomo-org/matomo-php-tracker/master/PiwikTracker.php, but I think the php-tracker doc may need to be rewritten and moved to https://developer.matomo.org/api-reference/PHP-Piwik-Tracker as currently this refers to the README which refers back to the dev-docs.
I'm not familiar with the PHP client so I can't really help

@tsteur
Copy link
Member

tsteur commented May 13, 2018

@fdellwing I think I fixed this, can you double check please?

@fdellwing
Copy link
Contributor Author

Well there is the link to the github repo for some days now, so it seems fixxed for now?

@tsteur
Copy link
Member

tsteur commented May 14, 2018

thx

@tsteur tsteur closed this as completed May 14, 2018
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label May 14, 2018
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

3 participants