Magento 2

A guide to implement Criteo solutions in Magento 2.

Overview

This guide will explain how to configure the Criteo Extension for your Magento 2 site. The extension will install the Criteo OneTag on your site and will help generate a product feed if your site is compatible. Please provide your Criteo contact with a Google Shopping Feed if you already have one. You may also visit Magento Connect to purchase a third party extension for feed generation.

[[disclaimer-ecp]]

Download

Click to download extension

Installation

  1. Go to Mangento root folder (via SSH for example)

  2. Extract downloaded file to directory app/code

  3. Run command line: php bin/magento setup:upgrade

  4. Run command line: php bin/magento cache:clean

Configuration

I do not handle user consent
  1. Go to STORES > CRITEO ONETAG configuration, fill in Partner ID {{accountid}}, feed password and click on Save Config

    Please ask your Criteo contact for your Criteo Partner ID if you do not know it.

  2. Go to Cache Management and invalidate Configuration Cache

I have to handle user consent

If you are required to handle user consent, you need to configure the extension to generate a DataLayer and not fire the tags. It's your responsibility to implement the consent handling, and to fire the tags only once it has been given by your website visitors. We recommend to use Google Tag Manager to handle the firing conditions and the tags, and we give a GTM container for it.

Step 1: Configuring the module

  1. Go to module configuration, fill in Partner ID with {{accountid}}

    Please ask your Criteo contact for your Criteo Partner ID if you do not know it.

  2. Disable all the options related to firing the tags, and activate the Enable GTM dataLayer Implementation option You can leave the other options as they come by default, and finally click on Save Config

  3. Go to Cache Management and invalidate Configuration Cache

Step 2: Upload the GTM container



1. Download the custom container for the Enhanced Ecommerce data layer



2. Import the container on your GTM


Instructions on how to import a container

3. Add the blocking trigger


By default, the solution above does not fully consider the consent given by the user. You will need to create a "blocking trigger" in GTM so our tags do not fire until a certain condition is met. This condition can be a JS variable, a cookie, or anything else that indicated the user accepted the cookie warning. Since this will be custom for your site, we will not go into detail but please reach out to your Criteo representative if you are at all confused and we can help.

Verification

Tags

[[accurate]]

Feed

Once installed, the feed is available via

{{homepageurl}}/index.php/criteo/feed/?page=1&limit=250&pwd=#password#

Please send feed password to Criteo Technical contact