setono / sylius-plausible-plugin
Start tracking your visitors with Plausible.io
Fund package maintenance!
Setono
Installs: 3 125
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- php: >=8.1
- psr/event-dispatcher: ^1.0
- psr/log: ^1.1 || ^2.0 || ^3.0
- setono/tag-bag: ^2.2
- setono/tag-bag-bundle: ^3.0
- sylius/core: ^1.0
- sylius/core-bundle: ^1.0
- sylius/order: ^1.0
- sylius/resource-bundle: ^1.0
- symfony/config: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/event-dispatcher: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
- symfony/messenger: ^5.4 || ^6.0
- symfony/monolog-bundle: ^3.10
- symfony/string: ^5.4 || ^6.0
- webmozart/assert: ^1.11
Requires (Dev)
- api-platform/core: ^2.7.16
- babdev/pagerfanta-bundle: ^3.8
- behat/behat: ^3.13
- doctrine/doctrine-bundle: ^2.11
- infection/infection: ^0.27.6
- jms/serializer-bundle: ^4.2
- lexik/jwt-authentication-bundle: ^2.16
- matthiasnoback/symfony-dependency-injection-test: ^4.3 || ^5.1
- phpunit/phpunit: ^9.6
- psalm/plugin-phpunit: ^0.18
- setono/code-quality-pack: ^2.8.2
- sylius/sylius: ~1.12.13
- symfony/debug-bundle: ^5.4 || ^6.0
- symfony/dotenv: ^5.4 || ^6.0
- symfony/intl: ^5.4 || ^6.0
- symfony/property-info: ^5.4 || ^6.0
- symfony/serializer: ^5.4 || ^6.0.1
- symfony/web-profiler-bundle: ^5.4 || ^6.0
- symfony/webpack-encore-bundle: ^1.17
- willdurand/negotiation: ^3.1
This package is auto-updated.
Last update: 2024-10-27 08:09:50 UTC
README
Use Plausible Analytics to track visitors and events in your Sylius store.
Installation
Step 1: Install and enable plugin
composer require setono/sylius-plausible-plugin
Usage
If you have created your website in the Plausible dashboard, the plugin will just work out of the box. Enjoy 🎉
Configuration
Add functionality
Plausible use different scripts to enable functionality. Plausible calls them script extensions, and you can read about them here.
To use a script extension, you need configure the script in the plugin as follows:
setono_sylius_plausible: client_side: script: "https://plausible.io/js/script.manual.revenue.file-downloads.js"
Here I have added the 'file downloads' extension. Notice that I am keeping both the 'manual' and 'revenue' extensions. This is because the 'revenue' extension is used for tracking purchases, and the 'manual' extension is used for manual tracking of the pageview event.
Test tracking
If you want to test the plugin in your local environment, you can input the domain and use the local script extension:
setono_sylius_plausible: client_side: script: "https://plausible.io/js/script.manual.revenue.local.js" domain: "your-domain.com"