Outbrain Pixel + S2S Postback — Documentation

Outbrain Pixel + S2S Postback adds Outbrain conversion tracking to your PrestaShop store, with browser Pixel events and optional server-to-server postbacks. It helps you send ecommerce and lead signals to Outbrain while keeping event selection, consent handling, and diagnostics inside the back office.

Features

  • Outbrain browser Pixel. The module injects the Outbrain Pixel from displayHeader and loads https://amplify.outbrain.com/cp/obtp.js when tracking is active.
  • Ecommerce event tracking. It can send PageView, View Content, View Category, Add To Cart, Checkout, Purchase, Search, Add To Wishlist, and Sign Up events.
  • Order confirmation purchase event. The displayOrderConfirmation hook sends the browser purchase event with order value, currency, order ID, and product data.
  • Server-to-server postbacks. Eligible conversions can be queued and sent to Outbrain through https://tr.outbrain.com/unifiedPixel when an Outbrain click ID is available.
  • Click ID capture. The front script reads ob_click_id, OutbrainClickId, outbrain_click_id, and dicbo from landing URLs and stores the value in the mproutbr_ob_click_id cookie.
  • Custom conversion rules. You can define JSON rules for click, URL, controller, or DOM-event based conversions. Controller rules can optionally be limited to selected module front controllers.
  • Front conversion bridge. The conversion front controller receives token-protected browser bridge events for S2S queueing.
  • Registration tracking. The actionCustomerAccountAdd hook marks new customer accounts so the next account page can send the Sign Up event.
  • Consent-aware loading. When mprcookiesrevolution or mprcookiebanner is active, the Pixel waits for marketing consent before booting.
  • Diagnostics and queue controls. The back-office page shows readiness checks, queue counts for pending/sending/sent/failed events, an S2S probe action, and a retry action for failed events.
  • Cron processing. The queue worker registers send_outbrain_conversions with schedule: every:300 and timeout: 30.
Outbrain Pixel + S2S Postback — Outbrain storefront pixel Outbrain Pixel + S2S Postback — Admin integrity checks

Configuration options

Set these in Modules > Outbrain Pixel + S2S Postback > Configure.

  • Enable Outbrain Pixel. Turns browser tracking on or off; default: 0.
  • Outbrain Marketer ID. Stores your numeric Outbrain Marketer ID; default: ``. Multiple IDs may be separated with commas.
  • Exclude employees. Stops tracking when a logged-in back-office employee browses the front office; default: 1.
  • Respect cookie consent. Waits for marketing consent from mprcookiesrevolution or mprcookiebanner when either module is active; default: 1.
  • Track PageView. Sends the Outbrain PAGE_VIEW event from the page header; default: 1.
  • Track View Content. Sends product view events on product pages; default: 1.
  • Track View Category. Sends category view events when a current category is detected; default: 1.
  • Track Add To Cart. Sends add-to-cart events from the PrestaShop event bus or supported add-to-cart buttons; default: 1.
  • Track Checkout. Sends checkout-start events when the module detects the checkout start page with products in the cart; default: 1.
  • Track Purchase. Sends purchase events on order confirmation and can queue purchase postbacks for S2S; default: 1.
  • Track Search. Sends search events on the search controller when s or search_query is present; default: 1.
  • Track Add To Wishlist. Sends wishlist events from supported wishlist buttons and the PrestaShop wishlist event bus; default: 1.
  • Track Sign Up. Sends a Sign Up event after customer account creation; default: 1.
  • Purchase event name. Controls the Outbrain event name used for purchases; default: Purchase.
  • Track custom events. Enables JSON-defined custom conversion rules; default: 0.
  • Custom event rules. Stores the JSON array for custom click, URL, controller, or DOM-event rules; default: ``.
  • Enable S2S postback events. Queues eligible conversion events server-side when an Outbrain click ID is available; default: 0.
  • Test ob_click_id. Stores a real Outbrain click ID used only by the admin S2S probe; default: ``.
  • Keep IP and user agent in queued metadata. Keeps IP and user-agent metadata in the shared conversion queue for diagnostics; default: 1.
  • Queue batch limit. Sets how many queued conversion events the cron processor handles per run; default: 20. Allowed range: 1-1000.
Outbrain Pixel + S2S Postback — Outbrain product events Outbrain Pixel + S2S Postback — Storefront pixel rendered

Customization examples

Campaign landing URL with Outbrain click-ID capture:

https://www.example.com/product.html?ob_click_id={{ob_click_id}}

Multiple Marketer IDs can be entered like this:

123456, 789012

Click-based custom event rule for product gallery interaction:

[
  {
    "event": "Gallery Browse",
    "trigger": "click",
    "selector": ".product-images img,.images-container img",
    "params": {
      "property": "product_gallery"
    },
    "s2s": true
  }
]

Lead button with extra Outbrain parameters read from HTML attributes:

<a
  href="/contact"
  class="js-outbrain-lead"
  data-outbrain-param-property="contact_cta"
  data-outbrain-param-placement="product_page"
>
  Contact us
</a>

Matching rule for that button:

[
  {
    "event": "Lead",
    "trigger": "click",
    "selector": ".js-outbrain-lead",
    "s2s": true
  }
]

URL-based lead event for the contact page:

[
  {
    "event": "Lead",
    "trigger": "url",
    "contains": ["/contact"],
    "params": {
      "property": "contact_page"
    },
    "s2s": true
  }
]

Controller-based rule, with optional module matching for module front controllers:

[
  {
    "event": "Lead",
    "trigger": "controller",
    "controllers": ["contact"],
    "modules": [],
    "params": {
      "property": "contact_controller"
    },
    "once": true,
    "s2s": true
  }
]

DOM-event rule for a custom form or theme script:

[
  {
    "event": "Lead",
    "trigger": "event",
    "dom_event": "mproutbr:lead",
    "params": {
      "property": "custom_form"
    },
    "s2s": true
  }
]

Theme JavaScript that fires the DOM event:

document.dispatchEvent(new CustomEvent('mproutbr:lead', {
  detail: {
    params: {
      placement: 'footer_form',
      value: 1
    }
  }
}));

Direct browser tracking call after the module has booted:

if (typeof window.mproutbrTrack === 'function') {
  window.mproutbrTrack('Lead', {
    property: 'custom_cta',
    event_source_url: window.location.href
  }, true);
}
Outbrain Pixel + S2S Postback — Outbrain s2s diagnostics Outbrain Pixel + S2S Postback — Storefront purchase event

Installation

  1. Download the module ZIP from your mypresta.rocks account.
  2. In the PrestaShop back office, go to Modules > Module Manager.
  3. Click Upload a module and select the ZIP file.
  4. After installation, open Modules > Outbrain Pixel + S2S Postback > Configure.
  5. Save the required values, then use the diagnostics panel to confirm the Pixel state, click-ID readiness, and queue status.
  6. If you use S2S postbacks, add an Outbrain click-ID parameter to campaign URLs and test with Send S2S probe using a real ob_click_id.
Outbrain Pixel + S2S Postback — Admin config credentials

How it works

On the storefront, shoppers do not see a widget or banner from this module. When tracking is active, the module loads the Outbrain Pixel in the page header, sends selected browser events, and captures Outbrain click IDs from campaign landing URLs.

For purchases and eligible custom events, the module can also queue server-side postbacks. The cron task processes that queue in batches and the diagnostics panel shows whether events are pending, sending, sent, or failed.

Outbrain Pixel + S2S Postback — Admin config events

Honest limits

  • S2S attribution requires a real Outbrain click ID in the visit; browser Pixel tracking can run without it, but postbacks without a click ID are not queued.
  • PageView is browser-only in this module and is not sent through the S2S bridge.
  • The S2S probe needs a real ob_click_id from an Outbrain ad click, not a made-up test value.
  • Consent waiting only applies when mprcookiesrevolution or mprcookiebanner is active and the consent cookie/event is available.
  • Add To Cart and Add To Wishlist tracking supports common PrestaShop event buses and selectors; unusual custom themes may need a custom event rule.
  • Outbrain campaign setup, conversion naming, and reporting inside Outbrain are still managed in your Outbrain account.

Compatibility: PrestaShop 1.6 to 9.0 (latest), PHP 7.1+. We continue to support upcoming PrestaShop versions.

Outbrain Pixel + S2S Postback — Admin config s2s postback
Loading...
Back to top