Taboola Event Tracking
Overview
Taboola uses the Taboola Pixel for conversion tracking, audience building, and campaign optimization across its native advertising network. As a content discovery platform, Taboola's tracking enables measurement of user engagement, content consumption, and conversion actions driven by native ads placed on premium publisher sites.
Standard Events
Taboola supports standard events for various business objectives:
Ecommerce Events
- Purchase - Transaction completed
- Add to Cart - Product added to cart
- View Content - Product or content page viewed
- InitiateCheckout - Checkout process started
Lead Generation Events
- Lead - Form submission or contact
- Complete Registration - Account signup
- Subscribe - Newsletter or service subscription
- Contact - Contact form submission
Engagement Events
- Page View - Standard page visit
- Search - Site search performed
- Download - File or content download
- Video View - Video content watched
Custom Events
- Custom - Business-specific conversion actions
Custom Events
Creating Custom Conversions
Define custom conversion tracking:
// Custom event
_tfa.push({
notify: 'event',
name: 'custom_event_name',
revenue: 25.00,
currency: 'USD',
orderid: 'CUSTOM_12345'
});
Event Parameters
Add custom parameters to events:
_tfa.push({
notify: 'event',
name: 'purchase',
revenue: 99.99,
currency: 'USD',
orderid: 'ORDER_12345',
// Custom parameters
category: 'electronics',
customer_type: 'returning',
promo_code: 'SAVE20'
});
Ecommerce Events
Purchase Tracking
Complete purchase implementation:
<!-- Taboola Pixel Base Code (on all pages) -->
<script type='text/javascript'>
window._tfa = window._tfa || [];
window._tfa.push({notify: 'event', name: 'page_view', id: PIXEL_ID});
!function (t, f, a, x) {
if (!document.getElementById(x)) {
t.async = 1;t.src = a;t.id=x;f.parentNode.insertBefore(t, f);
}
}(document.createElement('script'),
document.getElementsByTagName('script')[0],
'//cdn.taboola.com/libtrc/unip/PIXEL_ID/tfa.js',
'tb_tfa_script');
</script>
<!-- Purchase Event (on confirmation page) -->
<script type='text/javascript'>
window._tfa = window._tfa || [];
window._tfa.push({
notify: 'event',
name: 'make_purchase',
id: PIXEL_ID,
revenue: 149.99,
currency: 'USD',
orderid: 'ORDER_12345'
});
</script>
Shopping Funnel Events
Track complete customer journey:
// View Content
_tfa.push({
notify: 'event',
name: 'view_content',
id: PIXEL_ID,
content_type: 'product',
content_id: 'SKU_123'
});
// Add to Cart
_tfa.push({
notify: 'event',
name: 'add_to_cart',
id: PIXEL_ID,
revenue: 99.99,
currency: 'USD',
content_id: 'SKU_123'
});
// Initiate Checkout
_tfa.push({
notify: 'event',
name: 'initiate_checkout',
id: PIXEL_ID,
revenue: 149.99,
currency: 'USD'
});
// Purchase
_tfa.push({
notify: 'event',
name: 'make_purchase',
id: PIXEL_ID,
revenue: 149.99,
currency: 'USD',
orderid: 'ORDER_12345'
});
Conversion Tracking
Implementation Methods
1. Taboola Pixel (JavaScript)
Standard implementation:
<!-- Universal Pixel Code -->
<script type='text/javascript'>
window._tfa = window._tfa || [];
window._tfa.push({notify: 'event', name: 'page_view', id: YOUR_PIXEL_ID});
!function (t, f, a, x) {
if (!document.getElementById(x)) {
t.async = 1;t.src = a;t.id=x;f.parentNode.insertBefore(t, f);
}
}(document.createElement('script'),
document.getElementsByTagName('script')[0],
'//cdn.taboola.com/libtrc/unip/YOUR_PIXEL_ID/tfa.js',
'tb_tfa_script');
</script>
<!-- Event Tracking -->
<script type='text/javascript'>
_tfa.push({
notify: 'event',
name: 'make_purchase',
id: YOUR_PIXEL_ID,
revenue: 99.99,
currency: 'USD',
orderid: 'ORDER_12345'
});
</script>
2. Google Tag Manager
Deploy via GTM:
Base Tag:
<!-- GTM Custom HTML Tag - All Pages -->
<script type='text/javascript'>
window._tfa = window._tfa || [];
window._tfa.push({notify: 'event', name: 'page_view', id: {{Taboola Pixel ID}}});
!function (t, f, a, x) {
if (!document.getElementById(x)) {
t.async = 1;t.src = a;t.id=x;f.parentNode.insertBefore(t, f);
}
}(document.createElement('script'),
document.getElementsByTagName('script')[0],
'//cdn.taboola.com/libtrc/unip/{{Taboola Pixel ID}}/tfa.js',
'tb_tfa_script');
</script>
Conversion Event:
<script type='text/javascript'>
window._tfa = window._tfa || [];
_tfa.push({
notify: 'event',
name: 'make_purchase',
id: {{Taboola Pixel ID}},
revenue: {{Transaction Value}},
currency: 'USD',
orderid: {{Transaction ID}}
});
</script>
3. Server-Side Tracking
For server-to-server conversions:
import requests
# Server-side conversion
conversion_data = {
"pixel_id": "YOUR_PIXEL_ID",
"event_name": "make_purchase",
"user_id": "USER_12345",
"revenue": 99.99,
"currency": "USD",
"order_id": "ORDER_12345",
"timestamp": "2025-01-15T10:30:00Z"
}
headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json"
}
response = requests.post(
"https://api.taboola.com/1.0/conversions",
json=conversion_data,
headers=headers
)
Offline Conversions
API Upload
Upload offline conversions via Taboola API:
// Node.js example
const axios = require('axios');
const offlineConversion = {
pixel_id: 'YOUR_PIXEL_ID',
event_name: 'make_purchase',
conversion_time: '2025-01-15T10:30:00Z',
revenue: 149.99,
currency: 'USD',
order_id: 'OFFLINE_ORDER_12345',
user_identifiers: {
email: hashEmail('customer@example.com'),
phone: hashPhone('+15551234567')
}
};
const response = await axios.post(
'https://api.taboola.com/1.0/conversions',
offlineConversion,
{
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
}
);
CRM Integration
Connect CRM for offline tracking:
- Capture Taboola click ID from URL
- Store in CRM with customer record
- Export conversions with click IDs
- Upload via Taboola API
Attribution
Attribution Windows
Taboola uses standard attribution:
Default Windows:
- Post-click: 30 days
- Post-view: 1 day
Customizable:
- Configure in campaign settings
- Set per conversion goal
Attribution Models
Taboola uses last-touch attribution:
- Last Taboola click gets credit
- Post-view conversions for impressions
Content Performance
Track which content drives conversions:
- Article/video performance
- Headline effectiveness
- Thumbnail impact
- Publisher placement analysis
Debugging & Validation
Browser DevTools
Verify pixel implementation:
// Check if Taboola pixel loaded
if (typeof _tfa !== 'undefined') {
console.log('Taboola Pixel loaded');
console.log('Pixel queue:', _tfa);
} else {
console.error('Taboola Pixel not found');
}
Network Tab:
Platform Validation
Verify in Taboola Ads platform:
- Navigate to Tracking > Pixels
- Select your pixel
- Review activity and events
- Check for errors or warnings
Common Issues
Pixel not firing:
- Verify pixel ID is correct
- Check tfa.js loads successfully
- Ensure _tfa array exists before events
- Test without ad blockers
Conversions not tracking:
- Verify event name format
- Check revenue is numeric
- Confirm orderid for deduplication
- Review attribution window settings
Best Practices
Implementation
- Install pixel on all pages for complete tracking
- Use GTM for easier management
- Include orderid for deduplication
- Pass revenue values for optimization
- Test thoroughly before launch
Content Strategy
- Test different headlines to improve CTR
- Use high-quality thumbnails for engagement
- Match content to landing page
- Create native-feeling content
- Test different publishers for performance
Data Quality
- Pass accurate revenue for value optimization
- Use consistent currency codes
- Include order IDs for all purchases
- Track micro-conversions for audiences
- Regular pixel audits for accuracy
Optimization
- Use CPA bidding for conversion goals
- Create audiences from converters
- Exclude recent converters from acquisition
- Test different creatives systematically
- Optimize by publisher performance
Reporting
- Track content performance metrics
- Segment by device and location
- Analyze time to conversion patterns
- Monitor publisher quality regularly
- Export data for deeper analysis