setono/sylius-criteo-plugin

Sylius plugin integrating Criteo tracking scripts

Installs: 15 706

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 2

Type:sylius-plugin

v1.3.0 2022-08-10 10:52 UTC

README

Latest Version on Packagist Software License Build Status

Sylius plugin that integrates Criteo tracking scripts

Installation

Step 1: Download the plugin

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.

Step 2: Enable the plugin

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],
];

Step 3: Configure plugin

# config/packages/_sylius.yaml
imports:
    # ...
    - { resource: "@SetonoSyliusCriteoPlugin/Resources/config/app/config.yaml" }
    # ...

Step 4: Import routing

# config/routes/setono_sylius_criteo.yaml
setono_criteo_plugin:
    resource: "@SetonoSyliusCriteoPlugin/Resources/config/routing.yaml"

Step 5: Update your database schema

$ php bin/console doctrine:migrations:diff
$ php bin/console doctrine:migrations:migrate

Step 6: Setup account

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.