Track dynamic conversion values

Overview

Dynamic conversion values enhance your marketing strategy by providing a more accurate measure of metrics such as ROAS (Return on Ad Spend).

Benefits include:

  • Gain better insights into the value generated by Taboola, such as ROAS.
  • Use the insights gained to adjust your campaign strategy.
📘

ROAS (Return on Ad Spend)

Dynamic conversion values allow you to track the actual revenue from each conversion, providing accurate ROAS measurement. This is essential because conversions do not have equal value - a $10 purchase is worth less than a $100 purchase.

Which flow?

Tracking dynamic values depends on your overall conversion tracking solution for Taboola:

  1. If you are using S2S (server to server) conversion tracking, see: The postback URL > Optional params
  2. If you are using Shopify, see: Set up Shopify conversion tracking (via Realize).

    Our Shopify app manages dynamic conversion tracking for you - no special action is required on your side.

  3. If you are using WooCommerce, see: Set up conversion tracking in WooCommerce.

    Our WooCommerce plugin manages dynamic conversion tracking for you - no special action is required on your side.

  4. For most other cases, continue below.

Track dynamic values with Taboola pixel

To track dynamic values via Taboola pixel, edit a conversion rule in Realize (or create a new one), and add dynamic params. Detailed steps are provided below.

🚧

Before you start

If you have not yet done so, install the Taboola pixel.

📘

How dynamic values work

Dynamic values are sent via the pixel as additional parameters (like revenue, currency, quantity, orderid). These parameters use variables from your website that are inserted at runtime, replacing placeholder values in the code snippet. This allows each conversion to include its actual value rather than a fixed amount.

📘

Fixed values vs dynamic values

The instructions below explain how to add dynamic values to your conversions. You can follow similar steps to add fixed values. (Simply replace the placeholder value with a fixed value.)

Realize setup

Edit an existing conversion

If you already created a conversion in Realize, open it and adjust the dynamic parameters:

  1. Open Realize, and select the account (top, left) that you will use to track conversions.

  2. In the sidebar (left), select Tracking.

  3. Click on the Edit icon for the relevant event-based conversion rule:

  4. Scroll down to the Event Code section.

  5. Select the relevant dynamic parameters. Ideally, send at least Value (revenue), Currency, and Quantity. Order ID is relevant for some events (e.g., purchase events).

    Selecting a parameter inserts it into the code snippet with a placeholder value (see screenshot below). Your webmaster will need to ensure that an actual value is inserted dynamically (at run time):


  6. Once you have inserted the relevant params, mouse over the code snippet and click on COPY TO CLIPBOARD.

  7. Review your chosen settings, and click on Save (bottom, right):

  8. Forward the code snippet (that you copied above) to your webmaster to implement on the relevant page(s).

🚧

A common pitfall

Copying and pasting code into Microsoft Word or Google Docs may result in non-standard quotation marks that break your code. Always make sure to copy your code snippets into a text editor only.

📘

To send an email with all your code snippets, see: Tips & techniques (below)

Next, your webmaster will need to implement the pixel in your web pages.

Create an event-based conversion

If you have not yet created a conversion in Realize, create it now:

📘

The instructions below illustrate the steps for setting up a purchase event.


For additional guidelines, see the Help Center.

  1. Open Realize, and select the account (top, left) that you will use to track conversions.

  2. In the sidebar (left), select Tracking.

  3. Click on + New Conversion (far right).

    Select Create conversions using code and click Continue.

  4. Type in a Conversion Name of your choice - e.g. Purchase.

    This is a descriptive name for your convenience.

  5. For Conversion Type, select EVENT:

  6. Leave the Fixed Value field blank.

    For additional guidelines, see the Help Center.

  7. Select the relevant Category - e.g. Make Purchase.

    Note that the default Event Name is make_purchase. The identical name will need to appear in your script.

  8. (Optional) If desired, edit the following fields:

    1. Click Through Conversion Window
    2. View Through Conversion Window
  9. Leave the Include in total conversions checkbox checked.

    Tip: Always include the most important conversions, so that the Taboola algorithm will optimize towards them. For additional guidelines, see the Help Center.

  10. (Optional) If you want to measure ROAS for this conversion in default columns, leave the Include in total value checkbox checked. Otherwise, you can uncheck it.

  11. (Optional) If desired, edit the following fields:

    1. Audience Properties
    2. Aggregation Type
  12. Under the Event Code section:

    1. Select 1 or more dynamic parameters. Ideally, send at least Value (revenue), Currency, and Quantity. Order ID is relevant for some events (e.g., purchase events).

      Each parameter that you select is inserted into the code snippet with a placeholder value. Your webmaster will need to ensure that an actual value is inserted dynamically (at run time):


    2. Mouse over the code snippet and click on COPY TO CLIPBOARD.
  13. Review your chosen settings, and click on Create (bottom, right):

  1. Forward the code snippet (that you copied above) to your webmaster to implement on the relevant page(s).
🚧

A common pitfall

Copying and pasting code into Microsoft Word or Google Docs may result in non-standard quotation marks that break your code. Always make sure to copy your code snippets into a text editor only.

📘

To send an email with all your code snippets, see: Tips & techniques

Next, your webmaster will need to implement the pixel in your web pages.

Your web pages

Choose an approach that matches how you manage your Taboola pixel:

Edit the page manually

If you are managing your Taboola pixel directly on your website (not using GTM), follow these steps to implement dynamic values manually.

📘

For more detail about manual implementation, see: Add the base pixel manually.

Using the above code snippet, your webmaster will need to:

  1. Edit the snippet and replace each placeholder value with an appropriate macro or variable - or use custom development to ensure that a dynamic value is inserted.
  2. Fire the code snippet for each relevant event - e.g. when the user makes a purchase.
🚧

The exact steps will depend on the platform you used to integrate Taboola pixel, and/or the platform you used to build your website.

<script>
    const purchaseValue = '<?php echo json_encode($order_total); ?>';
</script>

<!-- Taboola Pixel Code -->
<script>
    _tfa.push({
        notify: 'event',
        name: 'make_purchase',
        id: 1234,
        revenue: purchaseValue
    });
</script>
<!-- End of Taboola Pixel Code -->
🚧

The above example is provided for illustration only.

Google Tag Manager

If you are using Google Tag Manager (GTM) to manage your Taboola pixel, you can pass dynamic values using GTM variables. Choose the approach that matches your GTM setup.

Flow I: Using the GTM Template

📘

For more detail about using the GTM Template, see: Add event pixels in GTM.

  1. In your GTM dashboard, open the Taboola Pixel tag you created for your event.
  2. Scroll down to the Custom Parameters section.
  3. Check the revenue checkbox:
    • In the field that appears, enter a GTM variable using double curly braces {{Variable Name}} (e.g., {{Purchase Value}} or {{Data Layer Variable - transactionTotal}})
    • You can type the variable name with double curly braces, or use the variable picker dropdown (🔽 icon) to select it
    • The value must be numerical (integer or decimal) without commas
  4. Check the currency checkbox:
    • In the field that appears, enter a GTM variable using double curly braces {{Variable Name}} (e.g., {{Currency Code}} or {{Data Layer Variable - currencyCode}})
    • You can type the variable name with double curly braces, or use the variable picker dropdown (🔽 icon) to select it
    • The value must be a three-letter currency code (e.g., USD, EUR, GBP)
  5. (Optional) To pass additional parameters like quantity or orderid:
    • Check the Other parameters checkbox
    • In the table that appears, add rows for each parameter:
      • Name: Enter the parameter name (e.g., quantity, orderid)
      • Value: Enter a GTM variable using double curly braces {{Variable Name}} (e.g., {{Quantity}} or {{Data Layer Variable - quantity}})
  6. Click Save (top, right).
  7. Publish your changes in GTM.

Examples:

The following examples illustrate some values that you might enter in the GTM template.

Under Custom Parameters:

  • revenue: {{Purchase Value}} or {{Data Layer Variable - transactionTotal}} - A GTM variable containing the purchase amount
  • currency: {{Currency Code}} or {{Data Layer Variable - currencyCode}} - A GTM variable containing the currency code

Under Other parameters:

  • quantity: {{Quantity}} or {{Data Layer Variable - quantity}} - A GTM variable containing the quantity value
  • orderid: {{Order ID}} or {{Data Layer Variable - transactionId}} - A GTM variable containing the order/transaction ID
📘

GTM Variable Syntax

The {{Data Layer Variable - keyName}} format tells GTM to read a value from your website's data layer. Replace keyName with the actual key name used in your data layer (e.g., quantity, transactionId, orderId, etc.).

Flow II: Using Custom HTML

📘

For more detail about using Custom HTML, see: Add event pixels in GTM using Custom HTML.

  1. In your GTM dashboard, open the Custom HTML tag you created for your event.
  2. In the HTML field, modify the code snippet to include dynamic parameters.
  3. Replace placeholder values with GTM variables using double curly braces {{Variable Name}}. GTM will replace these variables with their actual values when the tag fires.
  4. Click Save (top, right).
  5. Publish your changes in GTM.

Example:

The following code snippet shows how to include GTM variables (using double curly braces) in your Custom HTML tag:

<script>
  _tfa.push({
    notify: 'event',
    name: 'make_purchase',
    id: {{Taboola Account ID}},
    revenue: {{Purchase Value}},
    currency: '{{Currency Code}}',
    quantity: {{Data Layer Variable - quantity}},
    orderid: '{{Data Layer Variable - transactionId}}'
  });
</script>

Params

You can set dynamic values using the following params:

revenue

Populate revenue with an integer or decimal value, without commas.

currency

If your website supports multiple currencies, use the currency param to specify the currency for that conversion.

  • Supported currencies: ILS, GBP, USD, BRL, EUR, INR, JPY, KRW, CNY, RUB, AUD, CAD, HKD, MXN, NZD, SGD, THB, TRY, ZAR.
📘

Default currency

If you do not receive a currency param, the system uses the default currency settings of your account. If the currency for a given conversion differs from your account default, make sure to pass an appropriate currency param.

orderid

Assign a value to the orderid field to track the Order ID (the CRM ID assigned to your order).

quantity

Indicates the item’s quantity in the order.