MarkTag for WooCommerce

Description

MarkTag for WooCommerce is a reliable tracking plugin that uses a hybrid architecture (JavaScript + PHP) to capture customer behavior and send events to the MarkTag analytics platform. Perfect for e-commerce stores looking to optimize their marketing campaigns with accurate event tracking.

Key Features

  • Hybrid Architecture: JavaScript for view events, PHP for action events (maximum reliability)
  • Complete Event Tracking: ViewItem, ViewCart, AddToCart, RemoveFromCart, BeginCheckout, Purchase
  • Tag ID Support: Unique identifier for each store sent with every event
  • Easy Configuration: Simple settings page in WordPress Admin (Settings MarkTag)
  • Session Management: UUID-based session tracking with sessionStorage
  • First-Party Cookies: Manages muid cookie with 1-year expiry for accurate user tracking
  • Marketing Attribution: Automatically captures Facebook Pixel, TikTok, Google Analytics cookies
  • International Phone Formatting: Phone number validation with E.164 formatting
  • Customer Data Persistence: Stores email and phone in localStorage for cross-session tracking
  • Rich Product Data: Captures product variants, categories, SKU, pricing
  • Complete Order Tracking: Full purchase data including shipping, tax, and order details
  • WooCommerce HPOS Compatible: Fully compatible with High-Performance Order Storage
  • Works with All Themes: Compatible with classic themes, block themes, and WooCommerce Blocks

How It Works

  1. Install and activate the plugin
  2. Go to Settings MarkTag and enter your Tag ID
  3. The plugin automatically starts tracking customer behavior
  4. Events are sent to MarkTag platform for analysis and optimization

Event Types Tracked

  • ViewItem: When customers view product pages (JavaScript)
  • ViewCart: When customers view their shopping cart (JavaScript)
  • AddToCart: When items are added to cart (PHP – works with all themes)
  • RemoveFromCart: When items are removed from cart (PHP)
  • BeginCheckout: When customers start the checkout process (JavaScript)
  • Purchase: When orders are completed with full transaction details (PHP)

Why Hybrid Architecture?

This plugin uses both JavaScript and PHP for maximum reliability:

  • JavaScript Layer: Handles view events (ViewItem, ViewCart, BeginCheckout), cookie management, session tracking, and marketing pixel capture
  • PHP Layer: Handles action events (AddToCart, RemoveFromCart, Purchase) using native WooCommerce hooks for 100% reliability

This approach ensures tracking works with all WooCommerce setups including WooCommerce Blocks, classic themes, AJAX add-to-cart, and form-based add-to-cart.

Privacy & GDPR

This plugin tracks customer behavior including email addresses and phone numbers from checkout forms. Ensure your privacy policy covers this data collection. All tracking respects user consent and follows WordPress best practices.

Developer Friendly

  • Clean, well-documented code
  • Plain JavaScript (no build tools required)
  • WordPress coding standards compliant
  • Uses native WooCommerce hooks
  • Simple, maintainable architecture

Privacy Policy

This plugin tracks customer behavior including:
* Page views and product interactions
* Email addresses and phone numbers from checkout forms
* Marketing cookies (Facebook Pixel, TikTok, Google Analytics)
* Session data and user identifiers

All data is sent to the MarkTag platform for analytics purposes. Ensure your privacy policy covers this data collection and complies with applicable privacy regulations (GDPR, CCPA, etc.).

Support

For support, please:
* Visit our documentation: https://docs.markopolo.ai
* Email: support@markopolo.ai
* GitHub Issues: https://github.com/markopolo-inc/woocommerce-tracking-plugin/issues

Installation

Automatic Installation

  1. Go to WordPress Admin Plugins Add New
  2. Search for “MarkTag for WooCommerce”
  3. Click “Install Now” and then “Activate”
  4. Go to Settings MarkTag to configure

Manual Installation

  1. Download the plugin zip file
  2. Go to WordPress Admin Plugins Add New Upload Plugin
  3. Choose the zip file and click “Install Now”
  4. Click “Activate Plugin”
  5. Go to Settings MarkTag to configure

After Installation

  1. Navigate to Settings MarkTag
  2. Enter your Tag ID (get this from your MarkTag dashboard)
  3. Optionally customize the Webhook URL (default works for most users)
  4. Click Save Settings
  5. Test by browsing your store and checking the browser’s Network tab for events

FAQ

Does this plugin require WooCommerce?

Yes, WooCommerce must be installed and activated for this plugin to work. The plugin will show an admin notice if WooCommerce is not active.

Where do I get my Tag ID?

Your Tag ID is provided by MarkTag when you create an account. It’s a unique UUID that identifies your store. Contact MarkTag support if you need help finding it.

Where are events sent?

Events are sent to the MarkTag ingestion endpoint at https://mtag.markopolo.ai/mark. You can customize this URL in the plugin settings if needed.

Does this track personal information?

Yes, the plugin tracks email addresses and phone numbers from checkout forms, along with standard marketing cookies. Ensure your privacy policy covers this data collection and complies with GDPR/privacy regulations in your region.

Is this compatible with WooCommerce HPOS?

Yes! The plugin is fully compatible with WooCommerce High-Performance Order Storage (HPOS) and declares compatibility with custom order tables and cart/checkout blocks.

Will this slow down my site?

No. The plugin uses asynchronous JavaScript and the keepalive fetch API to send events without blocking page loads. The tracking script is lightweight and optimized for performance.

Can I customize the events or data sent?

Yes! The plugin provides WordPress hooks and filters for developers to customize event data. Check the documentation on GitHub for details.

Does this work with AJAX add to cart?

Yes! The plugin automatically detects WooCommerce AJAX add-to-cart events and tracks them properly.

How do I test if it’s working?

  1. Open your WooCommerce store in a browser
  2. Open DevTools (F12) Network tab
  3. Browse products, add to cart, checkout
  4. Look for POST requests to mtag.markopolo.ai/mark
  5. Check the payload includes your tag_id and event data

Reviews

There are no reviews for this plugin.

Contributors & Developers

“MarkTag for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Initial release
  • Complete event tracking: ViewItem, ViewCart, AddToCart, RemoveFromCart, BeginCheckout, Purchase
  • Tag ID support for unique store identification
  • Settings page for easy configuration
  • Session tracking with UUID
  • First-party cookie management (muid)
  • Marketing attribution cookie capture (Facebook, TikTok, Google Analytics)
  • International phone number formatting with E.164 support
  • Email and phone persistence across sessions
  • WooCommerce HPOS compatibility
  • Settings link on plugins page
  • Full product and order data capture