Skip to content

Not possible to create multiple Piwik tracker instances having different API urls #14

@tsteur

Description

@tsteur

Because $URL is a constant and not a property of the class: https://github.com/piwik/piwik-php-tracker/blob/1.0.0/PiwikTracker.php#L32

$tracker1 = new \PiwikTracker(1, 'http://demo.piwik.org/piwik.php');
$tracker2 = new \PiwikTracker(1, 'http://apache.piwik/piwik.php');

Both tracker instances will use http://apache.piwik/piwik.php as URL.

Use case see matomo-org/matomo#4589 where up to 3 trackers can be configured and we need to send the same data to different trackers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions