ikuzostudio/matomo-plugin

Integrate Matomo ecommerce tracking into Sylius.

Installs: 509

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:sylius-plugin

pkg:composer/ikuzostudio/matomo-plugin


README

Matomo Plugin

Integrate Matomo ecommerce tracking into Sylius.

/!\ Currently in alpha /!\

Quickstart

$ composer require ikuzostudio/matomo-plugin

Add plugin dependencies to your config/bundles.php file:

return [
  // ...
  Ikuzo\SyliusMatomoPlugin\IkuzoSyliusMatomoPlugin::class => ['all' => true],
];

Import required config in your config/packages/_sylius.yaml file:

# config/packages/_sylius.yaml

imports:
  ...
  - { resource: "@IkuzoSyliusMatomoPlugin/Resources/config/app/config.yaml"}

Extend your Channel entity

// [...]
use Sylius\Component\Core\Model\Channel as BaseChannel;
use Ikuzo\SyliusMatomoPlugin\Model\MatomoChannelInterface;
use Ikuzo\SyliusMatomoPlugin\Model\MatomoChannelTrait;

/**
 * @ORM\Table(name="sylius_channel")
 * @ORM\Entity()
 */
class Channel extends BaseChannel implements MatomoChannelInterface
{
  use MatomoChannelTrait;
}

Update your database

$ bin/console doctrine:schema:update --force

Then configure your credentials from channel form