Skip to main content

Console Logger

The Pixel Manager Console Logger is a powerful real-time debugging tool that helps you troubleshoot tracking issues, verify pixel data, and monitor your store's conversion tracking setup directly from your browser's developer console.

Quick Enable

Add ?pmwloggeron to any page URL to enable the Console Logger for your entire session.

Console Logger Example

What is the Console Logger?

The Console Logger provides complete visibility into the Pixel Manager's internal operations by outputting detailed information to your browser's developer console. This allows you to:

  • Debug tracking issues - See exactly when events fire and what data they contain
  • Verify pixel setup - Confirm that pixels receive the correct data
  • Monitor consent status - Track consent changes in real-time
  • Diagnose performance - Identify slow script loads or API failures
  • Test custom code - Validate event filters and customizations

How It Works

The Console Logger hooks into Pixel Manager's event processing pipeline and outputs diagnostic information at each step:

  1. Event Detection - Logs when tracking events are triggered (add to cart, purchase, etc.)
  2. Data Processing - Shows the event data being prepared for each pixel
  3. Pixel Execution - Outputs the actual data sent to each advertising platform
  4. System Monitoring - Tracks script loading, API calls, and consent changes

Enabling the Logger

Add ?pmwloggeron to any page URL:

https://yoursite.com/product/example/?pmwloggeron

This enables logging for your entire browser session until you:

  • Add ?pmwloggeroff to any URL, or
  • Clear your browser's session storage

Why this method?

  • Quick and easy for testing
  • No admin access required
  • Session-based (persists across pages)
  • Safe for production sites (only affects your browser)

Disabling the Logger

Add ?pmwloggeroff to any URL:

https://yoursite.com/?pmwloggeroff

What Gets Logged

1. Plugin Version & Status

When the page loads, you'll see the Pixel Manager version and configuration:

Pixel Manager for WooCommerce: pro | distro: fms | active license: yes | version: 1.42.10

Version Info Breakdown:

  • pro or free - Your license tier
  • distro: fms - Distribution channel (Freemius or WooCommerce Marketplace)
  • active license - License validation status (Pro only)
  • version - Current plugin version

2. Tracking Events

Every user interaction that triggers a tracking event is logged with complete data:

Example: Add to Cart Event

Pixel Manager: pmw:add-to-cart event fired {
event: Event {},
product: {
id: 123,
name: "Blue T-Shirt",
price: 29.99,
quantity: 1,
category: "Clothing/Men"
}
}

All Tracked Events:

  • pmw:page-view - Page view tracking
  • pmw:view-item - Product page viewed
  • pmw:view-category - Category page viewed
  • pmw:search - Search performed
  • pmw:add-to-cart - Product added to cart
  • pmw:remove-from-cart - Product removed from cart
  • pmw:select-item - Product clicked/selected
  • pmw:add-to-wishlist - Product added to wishlist
  • pmw:begin-checkout - Checkout started
  • pmw:add-payment-info - Payment method selected
  • pmw:place-order - Order placement initiated
  • pmw:purchase - Order completed
  • pmw:login - User logged in

3. Pixel-Specific Tracking Calls

See the exact data sent to each advertising platform:

Example: Facebook Pixel AddToCart

Pixel Manager: Facebook Pixel: AddToCart event sent {
event_name: "AddToCart",
event_id: "wpm_1234567890_abcd",
event_source_url: "https://yoursite.com/product/example/",
user_data: {
em: "7d8c3e9a...", // hashed email
ph: "4f9b2c1d...", // hashed phone
client_user_agent: "Mozilla/5.0...",
fbc: "fb.1.1234567890123.AbCdEf...",
fbp: "fb.1.1234567890123.1234567890"
},
custom_data: {
content_ids: ["123"],
content_name: "Blue T-Shirt",
content_type: "product",
value: 29.99,
currency: "USD"
}
}

4. Script Loading Status

Monitor pixel library loading success and failures:

Success:

Pixel Manager: Successfully loaded primary script: https://connect.facebook.net/en_US/fbevents.js

Fallback:

Pixel Manager: Loading fallback script: https://cdn.example.com/fbevents.js
Pixel Manager: Successfully loaded fallback script

Failure:

Pixel Manager: Both primary and fallback scripts failed to load.

Common causes:

  • Ad blockers preventing script loads
  • CORS policy blocking external resources
  • Network connectivity issues
  • Incorrect pixel configuration

5. IP Detection & Geolocation

When server-to-server tracking is enabled, the logger shows IP detection:

Pixel Manager: Testing the IP address of the browser because one or more 
server-to-server APIs are enabled and require the browser IP.

Pixel Manager: Fetching IP from cloudflare using IP version v4
Pixel Manager: Retrieved the IP address 123.45.67.89 from cloudflare which took 234 ms

Pixel Manager: Retrieved the browser geo location from the cache: {
country: "US",
region: "CA",
city: "San Francisco"
}

IP Detection Services:

  • Cloudflare (primary)
  • ipify.org (fallback)
  • Local timezone estimation (fallback)

Monitor consent status and updates:

Facebook Consent Mode:

Pixel Manager: Facebook Consent Mode updated: {
ad_user_data: "granted",
ad_personalization: "granted"
}

Google Consent Mode:

Pixel Manager: Google Consent Mode updated: {
ad_personalization: "granted",
ad_storage: "granted",
ad_user_data: "granted",
analytics_storage: "granted",
functionality_storage: "granted",
personalization_storage: "granted",
security_storage: "granted",
wait_for_update: 500
}

CMP Detection:

Pixel Manager: Cookiebot CMP consent detected
Pixel Manager: Consent state: {
marketing: true,
statistics: true,
preferences: true
}

7. REST Endpoint Availability

Check WordPress REST API accessibility:

Pixel Manager: REST endpoint is not available. Using admin-ajax.php instead.

This warning indicates:

  • Security plugin blocking REST API
  • Server configuration restricting endpoints
  • Automatic fallback to admin-ajax.php (slower but functional)

Common Use Cases

Debugging Missing Events

Problem: Add to cart events not appearing in Facebook

Solution:

  1. Enable Console Logger with ?pmwloggeron
  2. Click "Add to Cart" button
  3. Check console for event log:
Pixel Manager: pmw:add-to-cart event fired {product: {...}}

Diagnosis:

  • ✅ Event logged, but no Facebook output → Check Facebook pixel configuration or consent
  • ❌ No event logged → JavaScript error or theme compatibility issue
  • ✅ Event logged + Facebook output → Check Facebook Events Manager for data

Verifying Pixel Data Accuracy

Problem: Wrong product price sent to Google Ads

Solution:

  1. Enable Console Logger
  2. View product page or add to cart
  3. Compare event data with pixel output:
// Event data
Pixel Manager: pmw:add-to-cart event fired {
product: { price: 29.99 } // Correct price
}

// Google Ads output
Pixel Manager: Google Ads: add_to_cart event sent {
value: 34.99 // Wrong price!
}

Diagnosis:

  • Prices differ → Check if you have custom filters modifying price
  • Check plugin settings for conversion value calculation method

Testing Event Filters

Problem: Custom event filter not working

Solution:

View before/after data in console:

// Original event
Pixel Manager: pmw:purchase event fired {
order_total: 100.00
}

// After your filter (if working)
Pixel Manager: Facebook Pixel: Purchase event sent {
value: 90.00 // Your 10% discount applied ✓
}

If values match but shouldn't, your filter hook might not be working.

Problem: Pixels not firing after accepting cookies

Solution:

  1. Reject all cookies
  2. Enable Console Logger
  3. Accept marketing cookies
  4. Check for consent update logs:
Pixel Manager: Google Consent Mode updated: {
ad_storage: "granted", // Should be "granted" after accepting
analytics_storage: "granted"
}

If consent shows "denied" after accepting:

  • Cookie consent plugin misconfigured
  • JavaScript conflict between CMP and Pixel Manager
  • Cookie banner not properly integrated

Troubleshooting the Logger

Logger Not Outputting Anything

Check 1: Verify URL Parameter

Make sure ?pmwloggeron is in your URL and the page has been refreshed.

Check 2: Hard Refresh

After adding ?pmwloggeron:

  • Windows/Linux: Ctrl + Shift + R
  • Mac: Cmd + Shift + R

Check 3: Console Filters

Make sure console isn't filtered:

  • Clear any text in filter box
  • Enable all log levels (Info, Warnings, Errors)

Check 4: JavaScript Errors

Look for JavaScript errors before Pixel Manager loads:

  • Fix any blocking errors first
  • Check for theme/plugin conflicts

No Pixel-Specific Logs Appearing

Possible Causes:

1. Pixel Not Enabled

  • Go to WooCommerce → Settings → Pixel Manager
  • Verify pixel is enabled with correct credentials

2. Consent Not Granted

  • Check consent logs in console
  • Verify cookie consent banner is configured correctly
  • Test with consent mode disabled temporarily

3. Event Not Firing

  • Look for pmw:event-name logs
  • If no event log appears, the event itself isn't triggering
  • Check WooCommerce compatibility

4. JavaScript Conflict

  • Temporarily disable other plugins
  • Switch to default WooCommerce theme
  • Check browser console for errors

Too Much Console Output

Solution 1: Use Console Filters

Filter by specific pixel:

Pixel Manager:.*Facebook

Filter by event type:

Pixel Manager:.*purchase

Solution 2: Clear Console Regularly

console.clear()

Or use keyboard shortcut:

  • Windows/Linux: Ctrl + L
  • Mac: Cmd + K

Solution 3: Focus on Specific Pages

Only enable logger on pages you're testing:

  1. Add ?pmwloggeron on test page
  2. Complete your test
  3. Add ?pmwloggeroff when done

Performance Considerations

Impact on Site Speed

Console Logging Overhead:

  • Minimal when enabled via URL parameter (session-based)
  • Only affects browsers with logger enabled
  • No server-side performance impact
  • No impact on actual tracking accuracy

Production Usage:

  • ✅ Safe: URL parameter (?pmwloggeron)
  • ✅ Only enable when debugging
  • ✅ Disable after troubleshooting

FAQ

Q: Does the Console Logger slow down my site?

A: No significant impact when enabled via URL parameter. It only outputs to the browser console and doesn't affect actual page load speed or tracking accuracy.


Q: Can customers see the debug logs?

A: No. Console logs are only visible in the browser's developer tools, which typical customers don't open. However, don't enable globally on production to avoid any potential data exposure.


Q: Does enabling the logger track more data?

A: No. The logger only displays data that's already being processed by the Pixel Manager. It doesn't create, modify, or send any additional tracking data.


Q: Can I filter what gets logged?

A: The Console Logger outputs all activity (all-or-nothing). Use your browser's console filter feature to focus on specific events or pixels.


Q: How long does ?pmwloggeron stay active?

A: It remains active for your entire browser session until you:

  • Add ?pmwloggeroff to any URL
  • Clear session storage manually
  • Close the browser (session ends)

Q: Can I use the Console Logger in incognito mode?

A: Yes. Add ?pmwloggeron to the URL in your incognito window. This is actually recommended for testing to avoid cached data.


Q: Does the logger work with AJAX add to cart?

A: Yes. The Console Logger tracks all events regardless of whether they're triggered by page loads or AJAX requests.


Q: Can I see historical logs?

A: No. Console logs are cleared when you refresh the page. To preserve logs:

  • Enable "Preserve log" in Chrome DevTools
  • Save console output before refreshing

Summary

The Console Logger is an essential tool for:

Debugging - Quickly identify why events aren't firing or pixels aren't loading
Verification - Confirm correct data is sent to advertising platforms
Monitoring - Track consent changes and system status in real-time
Testing - Validate custom filters and configuration changes

Quick Start Checklist:

  1. ✅ Add ?pmwloggeron to any URL
  2. ✅ Open browser DevTools (F12)
  3. ✅ Switch to Console tab
  4. ✅ Perform action (add to cart, checkout, etc.)
  5. ✅ Review console output for tracking data
  6. ✅ Add ?pmwloggeroff when finished

Make more money from your ads with high-precision tracking