fullmetrix / sylius-plugin
Fullmetrix connector for Sylius. Syncs orders, customers, products, promotions and tracks visitor events to Fullmetrix.
Package info
github.com/Fullmetrix/sylius-plugin
Type:sylius-plugin
pkg:composer/fullmetrix/sylius-plugin
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
- doctrine/doctrine-bundle: ^2.10
- doctrine/orm: ^2.15 || ^3.0
- sylius/sylius: ^1.13 || ^2.0
- symfony/event-dispatcher: ^6.4 || ^7.0
- symfony/framework-bundle: ^6.4 || ^7.0
- symfony/http-foundation: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
- symfony/security-bundle: ^6.4 || ^7.0
- symfony/twig-bundle: ^6.4 || ^7.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpstan/phpstan-doctrine: ^1.3
- phpstan/phpstan-symfony: ^1.3
- phpunit/phpunit: ^10.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Official Fullmetrix plugin for Sylius. It connects your store to Fullmetrix, the analytics, segmentation and marketing platform for ecommerce.
Compatible with Sylius 1.13 and 2.x, PHP 8.1 or later.
Installation
composer require fullmetrix/sylius-plugin
Register the bundle in config/bundles.php:
Fullmetrix\SyliusPlugin\FullmetrixPlugin::class => ['all' => true],
Import the routes in config/routes.yaml:
fullmetrix: resource: '@FullmetrixPlugin/Resources/config/routing.yaml'
Create the plugin tables and clear the cache:
bin/console doctrine:migrations:migrate bin/console cache:clear
Connection
In the admin, go to Marketing, then Fullmetrix, and enter the connection code shown in Fullmetrix.
Tracking script served by the store
The store serves the tracking script from its own domain only when the refresh command runs from cron. Add this line to the crontab of the user that runs the store:
*/10 * * * * cd /path/to/store && bin/console fullmetrix:tracker:refresh --env=prod > /dev/null 2>&1
The command downloads the verified Fullmetrix script into public/media/kvo/ and the store serves it from its own domain. Without this line, or if the folder is not writable, the script loads from https://fullmetrix.com/assets/js/s.js.
Before uninstalling the plugin, run bin/console fullmetrix:tracker:refresh --remove and delete the cron line.
Service and cookies
The measurement script sends page views, cart and order events to https://fullmetrix.com (or to a subdomain of your own store domain when you configured one in Fullmetrix) and sets first-party cookies on the store domain: _kvo_v (anonymous visitor id, up to 390 days), _kvo_s (session, 30 minutes) and _kvo_c (contact identifiers after a login or an order). Stores connected before version 1.8.0 keep the older fm_vid, fm_sid and fm_cid cookies until they expire. The store sets _kvo_v again on a same-origin POST /kvo/k so browsers keep it longer; no session is started by that request. Tracking consent is not handled by the plugin: call fm('consent', {...}) from your tag manager or consent tool. Privacy policy: https://fullmetrix.com/privacy