Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 2.51 KB

UPGRADE.md

File metadata and controls

80 lines (61 loc) · 2.51 KB

UPGRADE FROM 1.0.x to 2.0.x

  1. As we're moving to server side tracking - we no longer need SetonoTagBagBundle and SetonoSyliusTagBagPlugin.
  • Remove them from config/bundles.php and add ones we're using:

         $bundles = [
     -       Setono\TagBagBundle\SetonoTagBagBundle::class => ['all' => true],
     -       Setono\SyliusTagBagPlugin\SetonoSyliusTagBagPlugin::class => ['all' => true],
     +       Setono\ClientIdBundle\SetonoClientIdBundle::class => ['all' => true],
     +       Setono\ConsentBundle\SetonoConsentBundle::class => ['all' => true],
     +       Setono\BotDetectionBundle\SetonoBotDetectionBundle::class => ['all' => true],
    
             Setono\SyliusFacebookPlugin\SetonoSyliusFacebookPlugin::class => ['all' => true],
             Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
         ];
  • Remove setono/sylius-tag-bag-plugin if it used

    composer remove setono/sylius-tag-bag-plugin
  1. Remove custom event listeners extended from Setono\SyliusFacebookPlugin\EventListener\TagSubscriber from your application:

     -  namespace App\EventListener;
    
     -  use Setono\SyliusFacebookPlugin\EventListener\AbstractSubscriber;
    
     -  final class SomeTagSubscriber extends AbstractSubscriber
     -  {
     -  ...
     -  }
  2. Configure plugin

    # config/packages/setono_sylius_facebook.yaml
    ...
    setono_sylius_facebook:
        access_token: '%env(FACEBOOK_ACCESS_TOKEN)%'
    # .env
    ###> setono/sylius-facebook-plugin ###
    FACEBOOK_ACCESS_TOKEN=<YOUR TOKEN>
    ###< setono/sylius-facebook-plugin ###

    Warning! This plugin uses https://github.com/Setono/ConsentBundle and data will not be sent to Facebook by default.

    To workaround that on dev environment - you have to configure ConsentBundle like this:

    # config/packages/dev/setono_consent.yaml
    setono_consent:
        marketing_granted: true
  3. Update path to routes at config/routes/setono_sylius_facebook.yaml:

    setono_sylius_facebook:
    - resource: "@SetonoSyliusFacebookPlugin/Resources/config/routing.yaml"
    + resource: "@SetonoSyliusFacebookPlugin/Resources/config/routes.yaml"
  4. Add bin/console setono:sylius-facebook:send-pixel-events command call to your CRON (hourly or more frequently)

  5. Add bin/console setono:sylius-facebook:cleanup command call to your CRON (daily or less frequent)