See where customers are coming from by attributing conversions directly in your Sylius store
composer require setono/sylius-conversion-attribution-plugin
Notice that this also installs the setono/client-bundle
which is required by this plugin to work properly.
If you want to use the default javascript injection, you should also install the setono/tag-bag-bundle
.
See the installation instructions for the setono/tag-bag-bundle
here.
# config/routes/setono_sylius_conversion_attribution.yaml
setono_sylius_conversion_attribution:
resource: "@SetonoSyliusConversionAttributionPlugin/Resources/config/routes.yaml"
<?php
declare(strict_types=1);
namespace App\Entity\Customer;
use Doctrine\ORM\Mapping as ORM;
use Setono\SyliusConversionAttributionPlugin\Model\CustomerInterface;
use Setono\SyliusConversionAttributionPlugin\Model\CustomerTrait;
use Sylius\Component\Core\Model\Customer as BaseCustomer;
/**
* @ORM\Entity
*
* @ORM\Table(name="sylius_customer")
*/
class Customer extends BaseCustomer implements CustomerInterface
{
use CustomerTrait;
}
<?php
declare(strict_types=1);
namespace App\Entity\Order;
use Doctrine\ORM\Mapping as ORM;
use Setono\SyliusConversionAttributionPlugin\Model\OrderInterface;
use Setono\SyliusConversionAttributionPlugin\Model\OrderTrait;
use Sylius\Component\Core\Model\Order as BaseOrder;
/**
* @ORM\Entity
*
* @ORM\Table(name="sylius_order")
*/
class Order extends BaseOrder implements OrderInterface
{
use OrderTrait;
}
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate