Sylius plugin that integrates Criteo tracking scripts
Open a command console, enter your project directory and execute the following command to download the latest stable version of this plugin:
# Omit setono/sylius-tag-bag-plugin if you want to
# override layout.html.twig as described at https://github.com/Setono/TagBagBundle#usage
$ composer require setono/sylius-criteo-plugin setono/sylius-tag-bag-plugin
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the plugin by adding it to the list of registered plugins/bundles
in the config/bundles.php
file of your project:
<?php
# config/bundles.php
return [
Setono\TagBagBundle\SetonoTagBagBundle::class => ['all' => true],
// Use this bundle or override layout.html.twig as described at https://github.com/Setono/TagBagBundle#usage
Setono\SyliusTagBagPlugin\SetonoSyliusTagBagPlugin::class => ['all' => true],
Setono\SyliusCriteoPlugin\SetonoSyliusCriteoPlugin::class => ['all' => true],
];
# config/packages/_sylius.yaml
imports:
# ...
- { resource: "@SetonoSyliusCriteoPlugin/Resources/config/app/config.yaml" }
# ...
# config/routes/setono_sylius_criteo.yaml
setono_criteo_plugin:
resource: "@SetonoSyliusCriteoPlugin/Resources/config/routing.yaml"
$ php bin/console doctrine:migrations:diff
$ php bin/console doctrine:migrations:migrate
Login to your Sylius app admin and go to the Criteo page and click "Create" to create a new account. Fill in the account id of your Criteo account, make sure "enable" is toggled on, and choose which channel the Criteo account should be applied to. Please notice you should only make one account for each channel, or else you will end up with undefined behaviour.