25% off ProSNIPC25OFF

Snippet library

WordPress code snippets, ready to use.

707 free & Pro snippets and modules. Copy-paste-ready, or import in one click with SnipCraft.

PHPPro

Meta Pixel WooCommerce Events (AddToCart/Purchase)

Fires Meta Pixel AddToCart (on AJAX add) and Purchase (on order confirmation) events for WooCommerce.

#ecommerce#facebook#meta
PHPPro

WooCommerce GA4 Add-to-Cart and Checkout Events

Fires GA4 add_to_cart and begin_checkout ecommerce events via server-injected scripts; requires gtag.js on the page.

#analytics#ecommerce#events
JavaScriptPro

Track Video Play Events in GA4

Fires GA4 video_play, video_pause, and video_ended events for native HTML5 video elements on the page.

#analytics#engagement#events
JavaScriptPro

Track Form Submissions as GA4 Events

Fires a GA4 form_submit event on every form submission, capturing form ID, class, and action URL.

#analytics#conversion#events
JavaScriptPro

Track Scroll Depth as GA4 Events

Fires a GA4 scroll_depth event when the user reaches 25%, 50%, 75%, and 100% of the page.

#analytics#engagement#events
PHPPro

Google Consent Mode v2 Default Settings

Sets Google Consent Mode v2 default states before any tags fire, denying ad and analytics storage until consent is granted.

#analytics#consent#gdpr
HTML

Google AdSense Auto Ads Code

Loads the Google AdSense Auto Ads script that automatically places and optimises ad units across your site.

#ads#adsense#advertising
HTML

Microsoft Advertising UET Tag

Loads the Microsoft Advertising Universal Event Tracking (UET) tag for Bing Ads conversion tracking.

#advertising#analytics#bing-ads
HTML

Reddit Pixel Base Code

Loads the Reddit Pixel base tag and fires a PageVisit event on every page.

#advertising#analytics#conversion
HTML

X (Twitter) Pixel Base Code

Loads the X (formerly Twitter) Pixel base tag for conversion tracking on all pages.

#advertising#analytics#pixel
HTML

Snapchat Pixel Base Code

Loads the Snapchat Snap Pixel base tag and fires a PAGE_VIEW event on every page.

#advertising#analytics#conversion
HTML

Pinterest Tag Base Code

Loads the Pinterest conversion base tag and fires a page-view event on every page.

#advertising#analytics#conversion
HTML

HubSpot Tracking Code

Loads the HubSpot portal tracking script for analytics and live chat on all pages.

#analytics#crm#hubspot
HTML

Yandex Metrica Tracking Code

Loads the Yandex Metrica counter tag with click map, link tracking, and accurate bounce measurement.

#analytics#heatmaps#metrica
HTML

Matomo Analytics Tracking Code

Loads the Matomo self-hosted analytics tag with page-view and link tracking.

#analytics#matomo#privacy
HTML

Hotjar Tracking Code

Loads the Hotjar behavior-analytics tag for heatmaps, recordings, and surveys.

#analytics#heatmaps#hotjar
HTML

Microsoft Clarity Tracking Code

Loads the Microsoft Clarity heatmap and session-recording tag on every page.

#analytics#heatmaps#microsoft
PHP

Change the Place Order Button Text

Replaces the default 'Place order' label on the WooCommerce checkout submit button with a custom string.

#buttons#checkout#customization
PHPPro

Bulk Delete Orders Tool

Adds a 'Delete Permanently' bulk action to the WooCommerce admin orders screen, supporting both legacy post-based and HPOS order storage.

#admin#bulk-actions#cleanup
PHP

Add an Empty Cart Button

Adds a nonce-protected 'Empty Cart' button to the WooCommerce cart page so customers can clear all items in one click.

#buttons#cart#frontend
PHP

Add a Custom Product Information Tab

Appends an extra 'More Information' tab to the WooCommerce single-product tab row, populated from a custom product meta field.

#customization#display#products
PHPPro

Hide Specific Categories from the Shop Loop

Excludes one or more product category slugs from the WooCommerce shop, archive, and search loops while keeping individual category pages accessible.

#catalog#categories#filtering
PHPPro

Add a Products Column to the Admin Orders List

Inserts a 'Products' column into the WooCommerce orders list screen showing each order's item names and quantities at a glance.

#admin#columns#customization
PHPPro

Register a Custom Flat-Rate Shipping Method

Defines a code-based WooCommerce shipping method with a configurable title and fixed cost, assignable to shipping zones.

#admin#checkout#customization