Outbrain Event Tracking | Blue Frog Docs

Outbrain Event Tracking

Complete guide to Outbrain Pixel and conversion tracking

Outbrain Event Tracking

Overview

Outbrain uses the Outbrain Pixel for conversion tracking, audience building, and campaign optimization across its content discovery network. As a native advertising platform, Outbrain's tracking enables measurement of user engagement with recommended content and conversion actions driven by native ads on premium publisher sites.

Standard Events

Outbrain supports standard events for various objectives:

Ecommerce Events

  • Purchase - Transaction completed
  • Add to Cart - Product added to cart
  • View Content - Product or content page viewed

Lead Generation Events

  • Lead - Form submission
  • Complete Registration - Account signup
  • Subscribe - Newsletter subscription

Engagement Events

  • Page View - Standard page visit
  • Custom - Business-specific events

Custom Events

Creating Custom Conversions

Define custom conversion tracking:

// Custom event
obApi('track', 'Custom Event Name', {
  orderValue: 25.00,
  currency: 'USD',
  orderId: 'CUSTOM_12345'
});

Event Parameters

Add parameters to events:

obApi('track', 'Purchase', {
  orderValue: 99.99,
  currency: 'USD',
  orderId: 'ORDER_12345',
  // Custom parameters
  category: 'electronics',
  customerType: 'returning'
});

Ecommerce Events

Purchase Tracking

Complete purchase implementation:

<!-- Outbrain Pixel Base Code (on all pages) -->
<script type="text/javascript">
  !function(_window, _document) {
    var OB_ADV_ID = 'YOUR_ADVERTISER_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>

<!-- Purchase Event (on confirmation page) -->
<script type="text/javascript">
  obApi('track', 'Purchase', {
    orderValue: 149.99,
    currency: 'USD',
    orderId: 'ORDER_12345'
  });
</script>

Shopping Funnel Events

Track complete customer journey:

// View Content
obApi('track', 'View Content', {
  contentId: 'SKU_123',
  contentType: 'product'
});

// Add to Cart
obApi('track', 'Add to Cart', {
  orderValue: 99.99,
  currency: 'USD',
  contentId: 'SKU_123'
});

// Purchase
obApi('track', 'Purchase', {
  orderValue: 149.99,
  currency: 'USD',
  orderId: 'ORDER_12345'
});

Conversion Tracking

Implementation Methods

1. Outbrain Pixel (JavaScript)

Standard implementation:

<!-- Universal Pixel Code -->
<script type="text/javascript">
  !function(_window, _document) {
    var OB_ADV_ID = 'YOUR_ADVERTISER_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>

2. Google Tag Manager

Deploy via GTM:

Base Tag:

<!-- GTM Custom HTML Tag - All Pages -->
<script type="text/javascript">
  !function(_window, _document) {
    var OB_ADV_ID = '{{Outbrain Advertiser 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>

Conversion Event:

<script type="text/javascript">
  obApi('track', 'Purchase', {
    orderValue: {{Transaction Value}},
    currency: 'USD',
    orderId: {{Transaction ID}}
  });
</script>

Offline Conversions

Server-Side Tracking

Upload offline conversions:

import requests

# Offline conversion
conversion_data = {
    "advertiser_id": "YOUR_ADVERTISER_ID",
    "event_name": "Purchase",
    "order_value": 149.99,
    "currency": "USD",
    "order_id": "OFFLINE_ORDER_12345",
    "timestamp": "2025-01-15T10:30:00Z"
}

headers = {
    "Authorization": f"Bearer {access_token}",
    "Content-Type": "application/json"
}

response = requests.post(
    "https://api.outbrain.com/amplify/v1/conversions",
    json=conversion_data,
    headers=headers
)

Attribution

Attribution Windows

Outbrain uses standard attribution:

Default Windows:

  • Post-click: 30 days
  • Post-view: 1 day

Attribution Models

Last-touch attribution:

  • Last Outbrain click gets credit
  • Post-view for impressions

Debugging & Validation

Browser Console

Verify pixel implementation:

// Check if Outbrain API loaded
if (typeof obApi !== 'undefined') {
  console.log('Outbrain Pixel loaded');
  console.log('Advertiser ID:', obApi.marketerId);
} else {
  console.error('Outbrain Pixel not found');
}

Platform Validation

Verify in Outbrain dashboard:

  1. Navigate to Conversion Tracking
  2. Select your pixel
  3. Review activity and events

Best Practices

Implementation

  1. Install pixel on all pages
  2. Use GTM for management
  3. Include orderId for deduplication
  4. Pass accurate values for optimization
  5. Test thoroughly before launch

Content Strategy

  1. Create engaging headlines to improve CTR
  2. Use compelling images for native ads
  3. Match content to landing page
  4. Test different publishers for performance
  5. Optimize by placement performance

Optimization

  1. Use CPA bidding for conversions
  2. Create audiences from converters
  3. Test different creatives systematically
  4. Exclude recent converters
  5. Monitor content performance
// SYS.FOOTER