Documentation
Product guides, API references, and integration manuals
Welcome to the documentation hub for all products and tools by Piotr Litwa. Use the sidebar to navigate between products, or browse the overview below.
Product Overview
Cookie Banner Pro
GDPR-compliant cookie consent for WordPress with Google Consent Mode v2, cookie scanner, and GTM template export.
Free + PremiumMarketBridge
Sell WooCommerce products across 50+ European marketplaces from one dashboard.
SaaSAI Translator for Polylang
Automatic WordPress post translation using Claude or ChatGPT with Polylang integration.
PluginLitwa Translate
Modular multilingual solution with AI, Gutenberg blocks, and Kadence theme integration.
PluginWP Direct GA4
Lightweight GA4 via Measurement Protocol. 2KB JS, full WooCommerce, $0 cost.
FreeWP Pixel Hub
Universal server-side tracking hub — GA4, Facebook CAPI, TikTok, Pinterest, LinkedIn & more.
PluginFirst-Party Data Proxy
PHP proxy serving tracking pixels from your domain. Bypasses ad blockers.
Self-hostedGTM First-Party Plugin
WordPress plugin to proxy GTM from your own domain. Architecture phase.
In DevelopmentPlatform Integrations
Marketplace apps and plugins for specific e-commerce platforms:
Meta CAPI for Shoper
Server-side Facebook Conversions API. Auto-configured from Shoper Marketplace. EMQ 12–13/13.
Shoper AppCeny Netto
Net price calculator for Shoper. View all products with VAT breakdown, search & filter.
Shoper AppMeta CAPI for WooCommerce
WordPress plugin for server-side Facebook tracking. Auto-registers with Central Hub.
WP PluginCookie Banner Pro
GDPR-compliant cookie consent management for WordPress
Overview
Cookie Banner Pro is a lightweight (~3KB gzipped) WordPress plugin that provides full GDPR/RODO-compliant cookie consent management. It features a customizable frontend banner, automated cookie detection, Google Consent Mode v2 integration, and GTM template generation.
3 Button Modes
Accept All + Reject All + Settings, or simplified 2-button variants.
12 Languages
PL, EN, DE, FR, ES, IT, CS, UK, PT, NL, SV, RO with auto-detection.
Cookie Scanner
Hybrid server-side + client-side detection with 30+ known cookies.
GTM Export
Download ready-to-import GTM container JSON with triggers per category.
Features
Banner Display
- Positions: Bottom, Top, or Center (fullscreen, modal, or bar)
- Layouts: Bar (horizontal strip) or Box (contained)
- Animations: Fade, slide-up, slide-down, bounce, or none
- Customizable: Colors, logo, border radius, font size, custom CSS
- Re-open button: Persistent icon for revisiting preferences
- Accessibility: Full keyboard navigation, Tab/Shift+Tab focus trap, ARIA labels
Cookie Categories
- Default: Necessary (always required), Analytics, Marketing
- Custom: Unlimited user-defined categories
- Multilingual: Name + description in 12 languages
- GCM Mapping: Each category maps to Google Consent Mode parameters
Script Blocking
Pattern-based blocking for 40+ known tracker patterns (Google Analytics, Facebook, LinkedIn, TikTok, Criteo, etc.). Scripts are dynamically activated when categories are granted via the cbp:consent event.
Installation
- Download the plugin ZIP from your account or WordPress.org
- Go to WordPress Admin → Plugins → Add New → Upload Plugin
- Upload the ZIP file and click Install Now
- Activate the plugin
- Navigate to Cookie Banner → Settings → General
- Check Enable Banner and set your Privacy Policy URL
- Save changes — the banner now appears on your site
Configuration
| Tab | Key Options |
|---|---|
| General | Enable/Disable, Position, Layout, Privacy Policy URL, Cookie Name, Cookie Expiry, Consent Version |
| Appearance | Colors (BG, text, buttons), Logo, Button Mode, Border Radius, Animation, Theme Preset, Custom CSS |
| Categories | Add/edit categories, multilingual names + descriptions, Required flag, GCM parameter mapping |
| Texts | Banner title, description, button labels — all in 12 languages |
| Consent Mode | Enable GCM v2, Wait for Update timeout, Ads Data Redaction, URL Passthrough |
| Script Blocking | Enable/Disable, Auto-blocking via output buffer |
| Advanced | Language mode, Analytics toggle, Data Retention Days, Export/Import Settings |
| Premium | License Key, Cross-Domain Sync, Cookie Domain, Allowed Subdomains, Embed Code |
Google Consent Mode v2
Cookie Banner Pro fully supports Google Consent Mode v2. The plugin injects a consent default script at priority 1 in <head> — before GTM or gtag.js loads.
Default State
gtag('consent', 'default', {
'analytics_storage': 'denied',
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'functionality_storage': 'denied',
'personalization_storage': 'denied',
'security_storage': 'granted'
});
Consent Update Flow
- User interacts with banner (Accept All / Reject All / Save Preferences)
- Plugin calls
gtag('consent', 'update', {...})with the user's choices - A
cbp_consent_updateevent is pushed to the dataLayer - A custom
cbp:consentevent is dispatched ondocument
Cookie Format
{
"v": 1,
"cats": {
"necessary": true,
"analytics": false,
"marketing": true
},
"ts": 1708934400000
}
GTM Template Export
The plugin dynamically generates a GTM container JSON based on your configuration:
- A "Cookie Banner Pro" folder grouping all elements
- Main trigger on
cbp_consent_updateCustom Event - Per-category triggers (e.g., "CBP — Analytics Granted")
- Data Layer variables for each GCM parameter
Import Workflow
- Navigate to Cookie Banner → GTM Template in WP Admin
- Click Download GTM Container
- Open Google Tag Manager → Admin → Import Container
- Upload the JSON, choose Merge → Rename
- Publish your GTM workspace
Cookie Scanner
The hybrid cookie detection system combines two approaches:
- Server-side scan: Parses HTTP response
Set-Cookieheaders - Client-side scan: Injected script reads
document.cookiefor 5 minutes
The built-in database recognizes 30+ cookies from Google Analytics, Facebook Pixel, YouTube, Hotjar, HubSpot, WordPress, and WooCommerce with wildcard pattern matching.
Analytics Dashboard
- Summary cards: Accept count, Reject count, Acceptance rate
- Trend graph: Daily accept vs reject vs save over selected period
- Category breakdown: Pie chart of category acceptance rates
- Data retention: Configurable auto-cleanup (GDPR data minimization)
Cross-Domain Sync Premium
Synchronize consent between your WordPress main domain and non-WordPress subdomains.
How It Works
- Banner sets cookie with
domain=.parent-domain.com - Sync JS is served via REST endpoint
/cbp/v1/sync.js?token=XXX - Subdomains embed the sync script in
<head>before GTM - Script reads parent cookie, initializes GCM, fires
cbp_consent_update
Setup
- Activate premium license in Cookie Banner → Premium
- Enable Cross-domain Sync
- Set Cookie Domain:
.yourdomain.com(with dot prefix) - List allowed subdomains (supports wildcards:
*.yourdomain.com) - Copy embed code and paste in
<head>of each subdomain
hash_equals() comparison. Config changes propagate with ~5 minute cache delay.REST API
| Route | Method | Auth | Purpose |
|---|---|---|---|
/cbp/v1/consent | POST | Public (5/min) | Log consent decision |
/cbp/v1/analytics | GET | Admin | Fetch analytics data |
/cbp/v1/license | GET | Admin | License info |
/cbp/v1/scanner/scan | POST | Admin | Trigger server-side scan |
/cbp/v1/scanner/report | POST | Admin | Submit client-side results |
/cbp/v1/scanner/cookies | GET | Admin | List known cookies |
/cbp/v1/sync.js | GET | Token | Sync script for subdomains |
MarketBridge
WooCommerce Multi-Marketplace Distribution
Overview
MarketBridge lets you sell WooCommerce products across 50+ European marketplaces — Amazon, Allegro, eBay, Kaufland, Zalando, and more — from a single WordPress dashboard. It replaces expensive SaaS tools like BaseLinker and ChannelEngine.
50+ Marketplaces
Amazon, Allegro, eBay, Kaufland, Zalando, Fnac, Decathlon, and more across Europe.
Real-time Sync
Stock, price, and order synchronization via Action Scheduler (not WP Cron).
Order Import
Marketplace orders automatically imported back into WooCommerce.
Category Mapping
Map WooCommerce categories to marketplace-specific category trees.
Features & Channels
Supported Channel Types
| Type | Marketplaces |
|---|---|
| REST API | Amazon, Allegro, eBay |
| Mirakl | Fnac, Decathlon, MediaMarkt, and others |
| ZFS | Zalando |
Architecture
Each marketplace implements a ChannelInterface for extensibility. The plugin uses PSR-4 autoloading under the WMM\ namespace.
includes/
├── Core/ Plugin.php, Installer.php, Assets.php
├── Channels/ ChannelRegistry (50 marketplace definitions)
│ ├── Allegro/ (fully implemented)
│ └── GenericChannel.php (placeholder for others)
├── Sync/ SyncManager, PriceSync, StockSync, OrderImport
├── Admin/ SettingsPage, ProductMetaBox, DashboardWidget
└── DB/ ListingsTable, SyncLogTable
AI Translator for Polylang
Automatic WordPress translation powered by Claude & ChatGPT
Overview
Automatically translate WordPress posts and pages using Claude (Sonnet 4, Opus 4, Haiku 3.5) or OpenAI (GPT-4, GPT-3.5), fully integrated with the Polylang multilingual plugin.
Features
- Bulk translation actions from WP admin post list
- Meta field translation (titles, descriptions, SEO fields)
- Taxonomy translation (categories, tags)
- Slug translation (URL-friendly translated slugs)
- Content chunking for large articles
- SEO optimization in translations
- Ajax-powered inline translation in post metabox
AI Providers
| Provider | Models |
|---|---|
| Anthropic (Claude) | Sonnet 4, Opus 4, Haiku 3.5 |
| OpenAI | GPT-4, GPT-3.5-turbo |
Architecture
Namespace: AITP\
includes/
├── translation/ ContentParser, ContentChunker, PromptBuilder
│ ├── TranslationManager, TranslationPost
│ ├── MetaTranslator, TaxonomyHandler, SlugTranslator
│ └── SeoTranslator
├── polylang/ PolylangBridge (integration layer)
├── admin/ SettingsPage, PostMetaBox, BulkActions, AjaxHandler
├── api/ AnthropicProvider
└── utils/ Encryption, Logger
Litwa Translate
Modular multilingual solution with AI, Gutenberg blocks & Kadence integration
Overview
A more modular multilingual solution with AI translations, language management, and Kadence theme integration. Includes custom Gutenberg blocks for language-specific content.
Key Differences from AI Translator
- Requires PHP 8.0+ (vs 7.4+ for AI Translator)
- Custom Gutenberg blocks for language-specific content
- Native Kadence theme integration
- Separate language manager and translation queue system
- More modular architecture with isolated concerns
Architecture
Namespace: LitwaTranslate\
includes/
├── core/ LanguageManager, TranslationQueue
├── api/ AnthropicProvider, OpenAiProvider
├── admin/ Settings, Dashboard
├── blocks/ Custom Gutenberg blocks
└── integration/ Kadence theme integration
WP Direct GA4
Lightweight GA4 tracking via Measurement Protocol
Overview
WP Direct GA4 is a lightweight alternative to GTM Server-Side that costs $0, uses only 2KB JS (vs 90KB for gtag.js), and requires only 2 config fields: Measurement ID and API Secret.
2KB Frontend
Ultra-lightweight tracker. Zero JS for page_view events (server-side).
WooCommerce
Full e-commerce auto-tracking from view_item through purchase to refund.
Consent Mode v2
Supports CookieBot, Complianz, CookieYes, Real Cookie Banner.
Debug Panel
Built-in event log inspector in WP admin for troubleshooting.
Events Reference
Server-side Events (zero JS)
| Event | Trigger |
|---|---|
page_view | Every page load |
login | User login |
sign_up | User registration |
search | WordPress search query |
Frontend Events (2KB JS)
| Event | Details |
|---|---|
scroll | At 25%, 50%, 75%, 90% thresholds |
click (outbound) | External link clicks |
file_download | Common file extensions |
user_engagement | Active time on page |
WooCommerce Tracking
All WooCommerce events are tracked server-side — no additional JS required.
| Event | Description |
|---|---|
view_item | Product page view |
view_item_list | Category/archive page |
add_to_cart | Product added to cart |
remove_from_cart | Product removed from cart |
view_cart | Cart page view |
begin_checkout | Checkout initiated |
add_shipping_info | Shipping method selected |
add_payment_info | Payment method entered |
purchase | Order completed (with items, revenue, tax, shipping, coupons) |
refund | Full or partial refund |
Queue Strategies
Events are sent asynchronously to GA4 using one of three strategies:
- Shutdown hook — fires after response is sent to browser
- WP Cron — batches events for deferred sending
- Action Scheduler — reliable async processing (recommended)
WP Pixel Hub
Universal multi-platform server-side tracking hub
Overview
WP Pixel Hub connects 10 tracking platforms from a single dashboard. Same ultra-lightweight 2KB JS, same WooCommerce auto-tracking, but events are broadcast to all enabled providers simultaneously.
do_action('wpph_track_event', 'event_name', [...]) to send custom events to all active providers.Providers
| Provider | Protocol | Status |
|---|---|---|
| Google Analytics 4 | Measurement Protocol | Ready |
| Facebook / Meta | Conversions API (CAPI) | Ready |
| TikTok | Events API | Ready |
| Conversions API | Ready | |
| Conversions API | Ready | |
| Snapchat | CAPI | Ready |
| Bing / Microsoft UET | Server events | Ready |
| Twitter / X | Conversions API | Ready |
| Google Ads | Conversion tracking | Ready |
Architecture
Each provider implements the ProviderInterface contract. Events flow through an EventBus that broadcasts to all active providers:
Event Collector → Event Bus → [Provider 1, Provider 2, ...]
↓
Queue Manager (per-provider async sending)
First-Party Data Proxy
PHP proxy for first-party tracking — bypass ad blockers, preserve cookies
Overview
A universal PHP proxy (proxy.php) that serves third-party tracking pixels and scripts through your own domain. From the browser's perspective, all requests appear first-party — preserving cookie access and bypassing ad blockers.
Standard: Browser → facebook.com/tr → blocked by adblocker ✗
With proxy: Browser → t.yourdomain.com/proxy.php → facebook.com/tr ✓
Supported Services (15+)
Facebook / Meta
Pixel (GET) and Events API (POST)
Google Tag Manager
JS loader and noscript iframe
Google Analytics 4
Script and collect endpoint
TikTok, LinkedIn, Pinterest
Pixel scripts and event collection
Snapchat, Twitter/X, Bing
Conversion tracking pixels
Clarity, Hotjar
Analytics script loaders
Setup & Deployment
What You Need to Deliver
| Step | Action | Details |
|---|---|---|
| 1 | Create subdomain | e.g., t.yourdomain.com with HTTPS (Let's Encrypt) |
| 2 | Upload proxy.php | Single file to /public_html/proxy.php |
| 3 | Configure .htaccess | Optional — clean URLs + security rules |
| 4 | Update tracking codes | Point your scripts/pixels to the proxy URL |
| 5 | Test & verify | DevTools → Network tab + platform debug views |
Verification Checklist
- Visit
https://t.yourdomain.com/proxy.php— should show JSON with route list - Test
?_route=fb-pixel&id=123— should return transparent GIF (status 200) - Test
?_route=gtm-js&id=GTM-XXXX— should return JavaScript - Open DevTools → Network tab — requests should hit
t.yourdomain.com - Verify in Facebook Events Manager / GA4 DebugView
Routes Reference
| Route | Service | Type | Upstream URL |
|---|---|---|---|
fb-pixel | Facebook Pixel | pixel | facebook.com/tr |
fb-events | Facebook Events API | data | graph.facebook.com |
gtm-js | GTM JS Loader | script | googletagmanager.com/gtm.js |
gtm-ns | GTM Noscript | pixel | googletagmanager.com/ns.html |
ga4-js | GA4 Script | script | googletagmanager.com/gtag/js |
ga4-collect | GA4 Collect | data | google-analytics.com/g/collect |
gads | Google Ads | pixel | googleadservices.com/pagead |
tiktok-js | TikTok Script | script | analytics.tiktok.com |
tiktok-collect | TikTok Events | data | analytics.tiktok.com/api/v2 |
li-pixel | LinkedIn Insight | pixel | px.ads.linkedin.com |
pin-pixel | Pinterest Tag | pixel | ct.pinterest.com |
snap-pixel | Snapchat Pixel | pixel | tr.snapchat.com |
tw-pixel | Twitter/X Pixel | pixel | t.co |
clarity-js | Microsoft Clarity | script | clarity.ms |
hotjar-js | Hotjar | script | static.hotjar.com |
bing | Bing UET | pixel | bat.bing.com |
Integration Examples
Facebook Pixel (noscript)
<!-- Before -->
<noscript>
<img src="https://www.facebook.com/tr?id=111222333&ev=PageView&noscript=1" />
</noscript>
<!-- After -->
<noscript>
<img src="https://t.yourdomain.com/proxy.php?_route=fb-pixel&id=111222333&ev=PageView&noscript=1" />
</noscript>
Google Tag Manager
// Before
j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;
// After
j.src='https://t.yourdomain.com/proxy.php?_route=gtm-js&id='+i+dl;
Google Analytics 4 (standalone)
<!-- Before -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXX"></script>
<!-- After -->
<script async src="https://t.yourdomain.com/proxy.php?_route=ga4-js&id=G-XXXX"></script>
Debugging
Add ?_debug=1 to any proxy request to see diagnostic info: upstream URL, HTTP code, cURL errors, response headers, and first 500 chars of response body.
GTM First-Party Plugin
WordPress plugin to proxy GTM from your own domain
Overview
Instead of loading gtm.js from googletagmanager.com, WordPress serves it from your own domain (e.g., /gtm/gtm.js). This bypasses ad blockers, improves cookie lifespan, and eliminates external DNS lookups.
Standard: Browser → googletagmanager.com → blocked ✗
With plugin: Browser → yoursite.com/gtm/ → WordPress cache → Google (sync every 15min) ✓
Benefits
- GTM container served as first-party resource
- No external DNS lookup for GTM (faster page load)
- WP Cron syncs container every 15 minutes
- Built-in dataLayer push (page data, user data, WooCommerce e-commerce)
- Internal Google URL rewriting
Architecture
includes/
├── class-gtm-proxy.php Serves gtm.js locally
├── class-gtm-rewriter.php Rewrites internal Google URLs
├── class-gtm-snippet.php Injects snippet in <head> + <noscript>
├── class-gtm-sync.php WP Cron synchronization
├── class-datalayer.php Optional dataLayer push
├── class-gtm-fpd-support.php Support system
├── class-gtm-fpd-premium.php Licensing
└── class-gtm-fpd-options.php Settings management
admin/
├── class-admin-settings.php
└── views/
├── settings-page.php
└── support-page.php
Planned Configuration
| Setting | Description |
|---|---|
| GTM Container ID | Your GTM-XXXX identifier |
| Proxy Path | Custom path (default: /gtm/) |
| Sync Interval | 5 min / 15 min / 30 min / 1 hour |
| DataLayer Options | Page data, User data, WooCommerce events |
| License Key | Support & premium features |
Meta CAPI for Shoper
Server-side Facebook Conversions API — installed from Shoper Marketplace
Overview
The Meta CAPI app sends order data from your Shoper store directly to Meta (Facebook) using the Conversions API. This is a server-side integration — data goes from our server to Meta, not from the customer's browser. This means:
- Ad blockers cannot prevent tracking
- Data is more accurate than browser-only Pixel
- You achieve maximum Event Match Quality (EMQ) score of 12–13 out of 13 parameters
- Meta can better attribute conversions to your ads
Server-Side Tracking
Data sent directly from server to Meta — bypasses ad blockers completely.
Auto-Configuration
Webhooks and tracking snippet are registered automatically on install.
EMQ 12–13/13
13 customer data parameters (email, phone, name, address, IP, etc.) for maximum match quality.
Test Mode
Verify events in Meta Events Manager before going live.
Installation
- Go to Shoper Marketplace and find the Meta CAPI app
- Click Install — you will be redirected to authorize the app
- After authorization, the app automatically:
- Registers webhooks on your Shoper store (order events)
- Injects the tracking snippet into your store's frontend
- Open the app from your Shoper admin panel to configure Meta credentials
Configuration
After installation, open the app from your Shoper admin panel. You'll see a settings page with the following fields:
| Field | Where to Find | Required |
|---|---|---|
| Meta Pixel ID | Meta Events Manager → Data Sources → your Pixel → Settings | Yes |
| Meta Access Token | Meta Events Manager → Settings → Conversions API → Generate Access Token | Yes |
| Test Event Code | Meta Events Manager → Test Events tab (e.g. TEST12345) | No (for testing only) |
Status Indicators
The settings page shows real-time status for each component:
| Status | Meaning |
|---|---|
| App Installed | OAuth completed, app has access to your store |
| Webhooks Registered | Order events are being sent to our server |
| Tracking Snippet Active | Frontend tracking is collecting browser data |
| Meta CAPI Configured | Pixel ID and Access Token are saved and valid |
Browser Tracking
The tracking snippet is automatically injected into your store's frontend. It captures:
- _fbp cookie — Meta's browser ID (set by Meta Pixel)
- _fbc cookie — Click ID from Facebook ads (set when visitor comes from an ad)
- UTM parameters — source, medium, campaign, term, content
- Email at checkout — captured when customer fills in the email field (hashed with SHA-256)
This browser data is combined with the server-side order data to achieve maximum Event Match Quality.
Event Match Quality (EMQ)
Meta uses EMQ to measure how well your event data matches Facebook user profiles. Higher EMQ = better ad attribution and lower cost per acquisition.
Parameters Sent
| # | Parameter | Source |
|---|---|---|
| 1 | Checkout form (SHA-256 hashed) | |
| 2 | Phone number | Billing data (normalized +48) |
| 3 | First name | Billing data (lowercase, hashed) |
| 4 | Last name | Billing data (lowercase, hashed) |
| 5 | City | Billing address |
| 6 | State / Region | Billing address |
| 7 | Postal code | Billing address |
| 8 | Country | Billing address (ISO code) |
| 9 | External ID | Customer account ID |
| 10 | Client IP | Server-side capture |
| 11 | User Agent | Server-side capture |
| 12 | _fbp | Browser tracking snippet |
| 13 | _fbc | Browser tracking snippet (when from ad click) |
Testing
- In Meta Events Manager, go to Test Events tab
- Copy the Test Event Code (e.g.
TEST12345) - Paste it in the app settings under "Test Event Code"
- Place a test order in your Shoper store
- Check the Test Events tab in Events Manager — you should see a
Purchaseevent appear within 1–2 minutes - Once confirmed, remove the Test Event Code from settings to go live
Ceny Netto
Net price calculator for Shoper — view all products with VAT breakdown
Overview
Ceny Netto is a simple utility app for Shoper store managers. It displays all your products in a searchable, paginated table with calculated net prices — something Shoper's admin panel doesn't show natively.
Net Price Calculator
Instantly see gross, net, and VAT amount for every product.
VAT Rate Selector
Switch between 23%, 8%, 5%, and 0% (exempt) VAT rates.
Search & Filter
Find products by name or SKU with instant search.
Summary Stats
Total product count, gross sum, net sum, and total VAT at a glance.
Installation
- Go to Shoper Marketplace and find the Ceny Netto app
- Click Install and authorize the app
- Open the app from your Shoper admin panel — no additional configuration needed
Usage
Product Table
The main view shows a paginated table with the following columns:
| Column | Description |
|---|---|
| Product Name | Product title (Polish translation preferred) |
| SKU | Stock keeping unit code |
| Gross Price | Price with VAT (as set in Shoper) |
| Net Price | Calculated: Gross / (1 + VAT rate) |
| VAT Amount | Calculated: Gross − Net |
| VAT Rate | Selected rate (default 23%) |
| Stock | Current stock quantity |
| Status | Active (green) or Inactive (red) |
Controls
- Search box — type to filter products by name or SKU (300ms debounce)
- VAT rate selector — choose 23%, 8%, 5%, or 0% — all prices recalculate instantly
- Pagination — navigate through products (50 per page)
Summary Cards
Above the table, four stat cards show:
- Products — total number of products in catalog
- Gross Total — sum of all gross prices
- Net Total — sum of all net prices
- VAT Total — sum of all VAT amounts
Meta CAPI for WooCommerce
WordPress plugin — server-side Facebook Conversions API for WooCommerce
Overview
The Meta CAPI plugin for WooCommerce sends order data to Meta (Facebook) via the Conversions API. It installs as a standard WordPress plugin and connects your store to the Central Hub backend, which handles the server-side communication with Meta.
Server-Side Tracking
Order data sent from server — ad blockers cannot prevent tracking.
EMQ 13/13
All 13 customer data parameters for maximum match quality.
Auto-Registration
Plugin registers with Central Hub automatically when you save credentials.
3 Order Events
Tracks order creation, payment confirmation, and order completion.
Installation
- Download the central-hub-capi.zip plugin file
- Go to WordPress Admin → Plugins → Add New → Upload Plugin
- Upload the ZIP file and click Install Now
- Activate the plugin
- Navigate to WooCommerce → Central Hub CAPI
Configuration
Go to WooCommerce → Central Hub CAPI in your WordPress admin panel:
| Field | Description | Required |
|---|---|---|
| Hub URL | Central Hub address (default: https://hub.piotrlitwa.com) | Yes (pre-filled) |
| API Key | Auto-generated key used to sign webhooks (read-only) | Auto |
| Meta Pixel ID | Your 15–16 digit Pixel ID from Meta Events Manager | Yes |
| Meta Access Token | Token generated in Meta Events Manager → Conversions API | Yes |
| Test Event Code | Code from Meta Events Manager → Test Events (e.g. TEST12345) | No |
How to Get Meta Credentials
- Open Meta Events Manager (business.facebook.com/events_manager)
- Select your Pixel under Data Sources
- Copy the Pixel ID from the top of the page
- Go to Settings tab → Conversions API section
- Click Generate Access Token and copy it
Auto-Registration
When you save settings with a valid Pixel ID and Access Token, the plugin automatically registers your store with Central Hub. The status section on the settings page shows:
- License status — must be active for events to be sent
- Registration status — confirms Hub connection
- Webhook URL — the endpoint receiving order events
- Store domain — your WooCommerce site URL
Browser Tracking
The plugin automatically injects a lightweight tracking script on your store's frontend. It captures:
- _fbp cookie — Meta's browser ID
- _fbc cookie — Click ID from Facebook ad clicks
- UTM parameters — source, medium, campaign, term, content (persisted in localStorage)
- Page URL — the page where tracking data was collected
Checkout Integration
At checkout, the tracking data is automatically stored with the order via a hidden form field. This happens:
- On initial page load
- On WooCommerce AJAX checkout updates
- On dynamic DOM changes (for custom checkout pages)
Events & Data
The plugin sends webhooks to Central Hub on three WooCommerce events:
| Event | WooCommerce Hook | When It Fires |
|---|---|---|
| Order Created | woocommerce_checkout_order_processed | Customer submits checkout form |
| Payment Complete | woocommerce_payment_complete | Payment gateway confirms payment |
| Order Completed | woocommerce_order_status_completed | Order marked as completed (shipped) |
Data Included in Each Event
- Order data: order ID, status, total, currency, payment method, date
- Customer data: email, phone, first/last name, full billing address, customer ID
- Line items: product ID, name, quantity, price, SKU for each item
- Shipping: method name and cost
- Marketing data: _fbp, _fbc, UTM parameters, referrer URL
- Technical: client IP address, user agent
Testing
- In Meta Events Manager, go to the Test Events tab
- Copy the Test Event Code
- Paste it in your plugin settings under "Test Event Code"
- Place a test order in your WooCommerce store
- Check the Test Events tab in Events Manager — events should appear within 1–2 minutes
- Verify the EMQ score and data parameters
- Remove the Test Event Code from settings when ready to go live
Troubleshooting
| Issue | Solution |
|---|---|
| No events in Events Manager | Check that license is active and all credentials are saved correctly |
| Missing _fbp/_fbc data | Ensure Meta Pixel is also installed on your site (browser-side) |
| Low EMQ score | Make sure checkout form collects full billing address including phone number |
| Registration failed | Verify that hub.piotrlitwa.com is accessible from your server (check firewall) |