0%

Troubleshooting: Criteo purchase items (Advanced Configuration)

STEP 1: Analysis

We need to know what your website calls the "ID", "Price", and "Quantity" inside a product.

  1. Open Tag Assistant and go to a page with products (e.g., Cart or Category).

  2. Open the Data Layer tab and find your product list (the one you found in the previous section).

  3. Inspect ONE product: open the list (click the arrow ) and look at the first item (usually index 0).

  1. Write down the Keys:

    • What is the ID called? (e.g., sku_id, item_id, id)

    • What is the Price called? (e.g., value, price, unit_price)

    • What is the Quantity called? (e.g., qty, quantity, count)

STEP 2: map the code (the fix)

Now we replace the "1s" with your actual data keys.

  1. Go to GTM > Variables and open Criteo - Purchase - Items.

  2. Look at the code. You will see lines like id: 1,, price: 1,, etc..

  3. how to fix it: replace the 1 with product.YOUR_KEY.

Example Scenario:

  • If Tag Assistant says: sku_id: "SKU_123", cost: 29.99, qty_added: 2.

  • You must change the code to:

// ... inside the function ...
return {
  // LEFT (Fixed)    :   RIGHT (Your Edits)
  id:                    product.sku_id,    // Replaced '1' with 'product.sku_id'
  price:                 product.cost,      // Replaced '1' with 'product.cost'
  quantity:              product.qty_added  // Replaced '1' with 'product.qty_added'
};

STEP 3: Verify & Publish

  1. Preview: click Preview in GTM again. Make a test purchase (or go to the confirmation page).

  2. Check the Tag: click on the Criteo Tag - Purchase.

  3. Check the Values: ensure the items field now shows real IDs and Prices, not "1".

  4. Submit: if it looks good, click the blue Submit button in the top right to publish your changes.