Outbrain Pixel Setup, Conversion Events, and Amplify API | OpsBlu Docs

Outbrain Pixel Setup, Conversion Events, and Amplify API

Technical guide to Outbrain Pixel installation, conversion tracking, custom audience creation, and Amplify API integration for native ad campaigns.

How Outbrain Tracking Works

Outbrain uses a JavaScript-based tracking pixel to attribute conversions back to content recommendation clicks. When a user clicks an Outbrain recommendation on a publisher site, the click passes through Outbrain's redirect with a click identifier (ob_click_id) appended as a URL parameter. The Outbrain Pixel on the advertiser's site captures this identifier and fires conversion events back to Outbrain's servers.

The data flow works as follows:

  1. User clicks a content recommendation on a publisher site
  2. Outbrain's redirect server logs the click and forwards the user to the advertiser's landing page with ob_click_id in the URL
  3. The Outbrain Pixel JavaScript loads on the landing page, reads the click ID, and stores it in a first-party cookie (obuid)
  4. When the user completes a conversion action, the pixel fires an event to tr.outbrain.com with the stored click ID
  5. Outbrain matches the conversion event to the original click for attribution

The pixel also collects page URL, referrer, user agent, and device fingerprint data for audience building and campaign optimization. All pixel requests are sent to tr.outbrain.com as image beacon or XHR calls.


Installing the Outbrain Pixel

Place the Outbrain Pixel base code in the <head> of every page on your site. Replace YOUR_OB_ADV_ID with your Outbrain advertiser ID found in the Amplify dashboard under Settings > Tracking.

<!-- Outbrain Conversion Pixel - Base Code -->
<script>
  !function(_window, _document) {
    var OB_ADV_ID = 'YOUR_OB_ADV_ID';
    if (_window.obApi) { var toArray = function(object) { return Object.prototype.toString.call(object) === '[object Array]' ? object : [object]; }; _window.obApi.marketerId = toArray(_window.obApi.marketerId).concat(toArray(OB_ADV_ID)); return; }
    var api = _window.obApi = function() { api.dispatch ? api.dispatch.apply(api, arguments) : api.queue.push(arguments); };
    api.version = '1.1'; api.loaded = true; api.marketerId = OB_ADV_ID; api.queue = [];
    var tag = _document.createElement('script'); tag.async = true;
    tag.src = '//amplify.outbrain.com/cp/obtp.js';
    tag.type = 'text/javascript';
    var script = _document.getElementsByTagName('script')[0];
    script.parentNode.insertBefore(tag, script);
  }(window, document);

  obApi('track', 'PAGE_VIEW');
</script>
<noscript>
  <img height="1" width="1" style="display:none"
    src="https://tr.outbrain.com/pixel?ob_adv_id=YOUR_OB_ADV_ID&ev=PAGE_VIEW&noscript=1" />
</noscript>

Verify installation by opening browser DevTools, navigating to the Network tab, and filtering for tr.outbrain.com. You should see a request firing on page load with the PAGE_VIEW event.

To verify via the Amplify dashboard, go to Conversions > Pixel Management and check the pixel status indicator. It should show "Active" within a few minutes of receiving the first event.


Conversion Tracking

Fire conversion events when users complete target actions. Outbrain supports standard and custom event names.

Standard Events

<script>
  // Purchase event with value
  obApi('track', 'Purchase', { orderValue: 49.99, currency: 'USD', orderId: 'ORD-12345' });

  // Lead submission
  obApi('track', 'Lead');

  // Registration / Sign-up
  obApi('track', 'Sign_Up');

  // Add to cart
  obApi('track', 'Add_To_Cart');

  // Content view (for content engagement goals)
  obApi('track', 'Content_View');
</script>

Custom Events

<script>
  // Custom event with arbitrary name
  obApi('track', 'CustomEvent', { customData: 'newsletter_signup' });

  // Custom event with revenue
  obApi('track', 'CustomEvent', { orderValue: 199.00, currency: 'USD' });
</script>

Setting Up Conversions in the Dashboard

  1. Navigate to Conversions > Actions in the Amplify dashboard
  2. Click "New Conversion Action"
  3. Select the event name (standard or custom) that matches your pixel fire
  4. Set the attribution window (default: 30-day click, 1-day view)
  5. Choose counting method: "Every" for purchases, "One" for leads
  6. Assign the conversion action to the relevant campaign

Audience and Retargeting

Outbrain builds audiences based on pixel data and engagement signals.

Pixel-Based Retargeting

Create audiences from users who visited specific pages or fired specific events:

<script>
  // Fire on specific pages to build segment
  obApi('track', 'PAGE_VIEW');
</script>

In the Amplify dashboard under Audiences:

  1. Create a new Custom Audience
  2. Select "Website Visitors" as the source
  3. Define URL rules (contains, equals, regex) to segment visitors
  4. Set the lookback window (1-180 days)
  5. Apply the audience to campaigns as include or exclude targets

Engagement-Based Audiences

Outbrain can also build audiences based on users who engaged with your Outbrain campaigns (clicked recommendations). These are configured directly in the dashboard:

  • Campaign Clickers - Users who clicked any of your Outbrain recommendations
  • Converters - Users who completed a conversion action
  • Lookalike Audiences - Modeled from your converters or high-value visitors, configured at 1%-10% similarity range

CRM Audience Upload

Upload hashed email lists (SHA-256) for audience matching:

  1. Navigate to Audiences > CRM Lists
  2. Upload a CSV with SHA-256 hashed emails (one per row)
  3. Outbrain matches against their user graph
  4. Minimum match threshold: 1,000 users

Server-Side / Amplify API Integration

The Outbrain Amplify API enables programmatic campaign management and reporting.

Authentication

# Get an access token
curl -X POST 'https://api.outbrain.com/amplify/v0.1/login' \
  -H 'Content-Type: application/json' \
  -d '{
    "username": "your_email@example.com",
    "password": "your_password"
  }'

Response:

{
  "OB-TOKEN-V1": "abc123def456..."
}

Use the token in subsequent requests:

# List campaigns for a marketer
curl -X GET 'https://api.outbrain.com/amplify/v0.1/marketers/YOUR_MARKETER_ID/campaigns' \
  -H 'OB-TOKEN-V1: abc123def456...'

Campaign Performance Data

# Get campaign performance report
curl -X GET 'https://api.outbrain.com/amplify/v0.1/reports/marketers/YOUR_MARKETER_ID/campaigns?from=2026-01-01&to=2026-01-31&includeConversions=true' \
  -H 'OB-TOKEN-V1: abc123def456...'

Server-Side Conversion Reporting

Send conversions directly via API when client-side pixel firing is not possible (e.g., offline conversions, call center leads):

# Report a server-side conversion
curl -X POST 'https://tr.outbrain.com/unifiedPixel' \
  -H 'Content-Type: application/json' \
  -d '{
    "marketerId": "YOUR_OB_ADV_ID",
    "event": "Purchase",
    "timestamp": "2026-03-01T14:30:00Z",
    "currency": "USD",
    "orderValue": 149.99,
    "orderId": "ORD-78901",
    "ob_click_id": "v1-abc123..."
  }'

The ob_click_id is required for click-through attribution. Store it server-side when the user lands on your site.


Common Issues

Pixel Not Firing

  • Check that obtp.js loads from amplify.outbrain.com (not blocked by ad blockers or CSP)
  • Verify the advertiser ID matches your Amplify account
  • Ensure the base pixel fires PAGE_VIEW before any conversion events
  • Check for JavaScript errors in the console that may halt execution

Conversions Not Attributed

  • Confirm the ob_click_id parameter is present in the landing page URL
  • Verify the first-party cookie obuid is being set (check Application > Cookies in DevTools)
  • Cross-domain tracking requires the pixel on all domains in the conversion path
  • Check that the attribution window in the dashboard matches your expected conversion lag

Duplicate Conversions

  • Use the orderId parameter on purchase events to deduplicate
  • Ensure the pixel does not fire on page refresh of confirmation pages (use a one-time flag)
  • Check for both pixel and API conversions reporting the same event

Content Security Policy

Add these domains to your CSP if you use one:

script-src: amplify.outbrain.com
img-src: tr.outbrain.com
connect-src: tr.outbrain.com

Platform-Specific Considerations

CPC vs CPA Bidding: Outbrain supports both cost-per-click and cost-per-acquisition bidding. CPA bidding requires at least 10 conversions in the past 7 days for the algorithm to optimize. Start with CPC bidding and switch to CPA once you have sufficient conversion volume.

Click ID Persistence: The ob_click_id parameter is appended only on the initial click-through. If your site strips URL parameters on redirect or uses client-side routing that drops query strings, you will lose attribution. Capture and store the click ID server-side on the landing page.

Smartfeed Widget: Publishers implementing Outbrain's Smartfeed widget use a separate JavaScript snippet (widgets.outbrain.com/outbrain.js). This is the publisher-side code, not the advertiser pixel. Do not confuse the two.

Cross-Device Attribution: Outbrain uses probabilistic matching for cross-device attribution. Accuracy is lower than deterministic methods. If cross-device is critical, supplement with your own user ID matching.

Rate Limits on the Amplify API: The API enforces rate limits of 100 requests per minute per token. Batch reporting queries where possible and implement exponential backoff on 429 responses.