Server-Side Tracking & CAPI
Server-side tracking (also known as Conversions API or CAPI) sends conversion events directly from your server to ad platforms, bypassing browser limitations introduced by iOS 14+, ad blockers, and cookie deprecation. OmniSocial's tracking system gives you a single pixel that fans out events to every destination you configure.
Why Server-Side Tracking Matters
Browser-based pixels are increasingly unreliable:
| Challenge | Impact | Server-Side Solution |
|---|---|---|
| iOS 14+ ATT | Up to 40% of users opt out of tracking | Events fire from your server, not the browser |
| Ad blockers | 30%+ of desktop users block scripts | Server requests are not interceptable by browser extensions |
| Cookie deprecation | Third-party cookies phased out | First-party data hashed and sent directly to platforms |
| ITP / ETP | Safari and Firefox limit cookie lifetime | Server-side events are not affected by browser storage policies |
Combining browser pixels with server-side CAPI gives you deduplicated, high-fidelity conversion data. Ad platforms merge the two signals when both carry the same event ID. The UniPulse SDK gives every event an ID and returns it from omni('track', ...). If you also fire the Meta Pixel yourself, pass that ID as its eventID. For purchases, the ID is purchase: followed by your store's order ID on both the website and the server, so a Purchase reported by both is counted once.
How It Works: Setup Flow
Getting started takes four steps:
- Create a Tracking Pixel -- Go to Analytics > Tracking and click New Pixel. Each pixel gets a unique
pixelIdand API key. - Link Destinations -- Add one or more platforms (Meta, Google, TikTok, GA4, or a custom webhook) and provide the required credentials.
- Install the SDK -- Add the OmniSocial tracking snippet to your website or install the npm package.
- Verify Events -- Use the Real-Time Event Stream to confirm events are flowing.
Tracking Pixels
A tracking pixel is a container that groups destinations and events together under a single API key.
Creating a Pixel
Navigate to Analytics > Tracking > New Pixel and provide:
| Field | Description |
|---|---|
| Name | A descriptive label (e.g., "Main Website") |
| Domain | The domain where the pixel will be installed |
After creation you will receive a pixelId and an API key. The API key authenticates all incoming events.
Managing Pixels
- Regenerate API Key -- If your key is compromised, regenerate it from the pixel settings. The old key is immediately invalidated.
- Delete Pixel -- Removes the pixel, all linked destinations, and historical event data.
Regenerating an API key requires updating the key in your SDK installation. Events sent with the old key will be rejected.
Destinations
Each pixel can fan out events to multiple destinations simultaneously.
Supported Destinations
| Destination | Required Credentials | Events Supported |
|---|---|---|
| Meta CAPI | Pixel ID, Access Token | Purchase, AddToCart, InitiateCheckout, ViewContent, Lead, PageView |
| Google Ads | Customer ID, Conversion Action ID, Developer Token | purchase, add_to_cart, begin_checkout, page_view |
| TikTok Events API | Pixel Code, Access Token | CompletePayment, AddToCart, InitiateCheckout, ViewContent |
| GA4 (Measurement Protocol) | Measurement ID, API Secret | All standard GA4 events |
| Custom Webhook | Endpoint URL, optional secret header | All events forwarded as JSON |
Adding a Destination
- Open your pixel and click Add Destination.
- Select the platform type.
- Enter the required credentials.
- Enable or disable specific event types to forward.
- Click Save & Test to send a test event.
OmniSocial automatically maps your event names to each platform's expected format. For example, a purchase event becomes Purchase for Meta, purchase for GA4, and CompletePayment for TikTok.
Customer Scoring
The tracking system automatically builds customer profiles and assigns quality scores based on behavior.
How Scores Work
Every tracked customer accumulates a score from 0 to 100 based on weighted signals:
| Signal | Weight | Description |
|---|---|---|
| Purchase count | 30% | Number of completed purchases |
| Total revenue | 25% | Lifetime spend |
| Visit frequency | 20% | Number of sessions in the scoring window |
| Recency | 15% | Days since last activity (lower is better) |
| Cart behavior | 10% | Add-to-cart to purchase conversion rate |
Segment Definitions
Customers are automatically placed into segments based on their score and behavior:
| Segment | Criteria | Typical Use |
|---|---|---|
| high_value | Score > 80 | Lookalike audiences, VIP campaigns |
| repeat | Score 60--80, 2+ purchases | Upsell and cross-sell campaigns |
| promising | Score 40--60, recent activity | Nurture sequences |
| at_risk | Score 20--40, declining activity | Win-back campaigns |
| new | First seen < 30 days ago | Welcome sequences |
| churned | No activity in 90+ days | Re-engagement campaigns |
Using Segments for Ad Optimization
Segments are sent alongside conversion events to ad platforms as custom parameters. This allows you to:
- Build lookalike audiences from your
high_valuesegment in Meta Ads Manager. - Set value-based bidding in Google Ads using score-weighted conversion values.
- Exclude
churnedcustomers from prospecting campaigns to reduce wasted spend.
Attribution
The tracking system captures attribution data to connect conversions back to their traffic source.
UTM Parameters
The SDK automatically captures UTM parameters from the landing URL:
| Parameter | Example |
|---|---|
utm_source | facebook |
utm_medium | cpc |
utm_campaign | summer_sale_2026 |
utm_term | running+shoes |
utm_content | video_ad_v2 |
Post Attribution
When a user arrives via a link from one of your social posts, the system matches the click to the originating publication to attribute the conversion to specific content.
Ad Attribution
For paid traffic, the SDK captures platform-specific click identifiers (fbclid, gclid, ttclid) and includes them in server-side events for accurate ad-level attribution.
Conversion Funnel
The attribution engine tracks the full funnel:
PageView --> ViewContent --> AddToCart --> InitiateCheckout --> Purchase
Each step is timestamped and attributed, giving you a clear view of where users drop off.
Real-Time Event Stream
The Event Stream tab shows events as they arrive, in real time. Use it to:
- Verify SDK installation -- Confirm that page views and custom events appear within seconds of triggering them.
- Debug destination delivery -- See which destinations received each event and whether they returned a success or error response.
- Monitor throughput -- Watch event volume during campaign launches or sales events.
Open the Event Stream in a second browser tab while browsing your site to verify tracking end-to-end.
E-Commerce Bridge
If you have connected a store (Shopify, WooCommerce, or EasyOrders), the tracking system automatically generates events from order data:
| Store Event | Tracking Event | Data Included |
|---|---|---|
| Order created | purchase | Order ID, total, currency, items |
| Cart updated | add_to_cart | Product ID, name, price, quantity |
| Checkout started | initiate_checkout | Cart total, item count |
This means you get server-side conversion tracking even if the customer never visits a page with your SDK installed -- the commerce bridge handles it.
- Prepaid orders are reported as a Purchase when the order is placed.
- Cash-on-delivery orders are reported as a Purchase only when the order is delivered, so orders refused at the door never inflate your ad results. Deliveries are picked up automatically when your store syncs, or as soon as you mark an order as delivered.
- Open carts, cancelled and refunded orders are never reported as purchases.
SDK Installation
Option 1: Script Tag
Add this snippet before the closing </body> tag on every page:
Copy the exact snippet from Settings > Tracking > SDK. It already contains your pixel ID and the correct endpoint:
<script src="https://cdn.unipulse.tech/sdk/v1/unipulse-tracking.umd.js"></script>
<script>
omni('init', {
pixelId: 'YOUR_PIXEL_ID',
apiKey: 'YOUR_API_KEY',
endpoint: 'https://api.unipulse.tech/api/v1/tracking/ingest',
autoPageView: true,
consent: 'optional'
});
</script>
Option 2: npm Package
npm install @omnisocial/tracking
import { omni } from '@omnisocial/tracking';
omni('init', 'YOUR_PIXEL_ID', { apiKey: 'YOUR_API_KEY' });
omni('track', 'PageView');
Common Commands
| Command | Description | Example |
|---|---|---|
omni('init', options) | Initialize the SDK | omni('init', { pixelId: 'tp_…', apiKey: '…' }) |
omni('track', event, data) | Track an event. Send the order's real currency and order_id for purchases. | omni('track', 'Purchase', { value: 1500, currency: 'EGP', order_id: '1001' }) |
omni('identify', traits) | Identify a customer | omni('identify', { email: 'user@example.com' }) |
omni('consent', granted) | Set GDPR consent | omni('consent', true) |
GDPR Compliance
When Block events before consent is on, UniPulse drops a visitor's events until that visitor grants consent. Calling omni('consent', 'grant') both stores consent in the browser and records it with UniPulse, so events start flowing immediately. omni('consent', 'revoke') records the withdrawal the same way.
The tracking system includes built-in GDPR tooling:
- Consent Mode -- The SDK only fires events after
omni('consent', true)is called. Before consent, the SDK queues events but does not transmit them. - Data Export -- Request a full export of a customer's tracked data via Settings > Privacy > Data Export.
- Data Erasure -- Request deletion of a customer's data. This removes all events, profile data, and scores, and sends deletion requests to connected platforms that support it (Meta, Google).
Data export and erasure requests are processed within 72 hours. You will receive a confirmation email when complete.
Related Pages
- Dashboard -- Overview of social media performance
- Customer Quality Scoring -- Deep dive into scoring algorithms and segments
- Revenue Attribution -- Track social-to-sales conversions
- Auto-Boost Ads -- Automatically boost high-performing content