This example is for a HTML website. View this article to see how to setup on your own platform (eg. Webflow, Framer etc.)
<!-- View Content button -->
<button class="action-btn-vc-019-pf">Read Article</button>We recommend using the Visual Tagger as a simpler option to setup tracking - it has the same tracking functionality in a simple widget
Click Here to Learn More About the Visual TaggerIn some scenarios, the Visual Tagger may have certain limitations and you can instead trigger events using "CSS classes" - essentially adding a code snippet to any element on your website so PixelFlow can track it.
Click here to view all methods for triggering events on your website.
You apply special CSS classes to elements on your website so PixelFlow knows what action occurred and what data to extract. Common examples include:
Button clicks for actions like Subscribe or Contact
Form submissions to capture Lead events and user data
eCommerce actions like AddToCart, InitiateCheckout, and Purchase
See the PixelFlow Tracking Playground to explore live examples and test your setup.
Use "CSS classes" differs slightly on each platform. Click here for exact instructions for your own platform
View platform specific instructionsPixelFlow classes fall into three categories:
General - for buttons and interactive elements
Forms - for capturing user data like name, email, and phone
eCommerce - for tracking product details on cart, checkout, and purchase flows
The way you apply classes varies by platform. Check your platform-specific guide before implementing them.
Apply these classes to any button or element to immediately trigger an event to Meta.
Event Name | CSS Class | Used For in Facebook |
|---|---|---|
AddPaymentInfo | | Optimizing payment-related campaigns and retargeting incomplete checkouts. |
AddtoCart | | eCommerce optimization and cart abandonment retargeting. |
AddtoWishlist | | Interest-based targeting and wishlist retargeting. |
CompleteRegistration | | Tracking registration funnels and onboarding campaigns. |
Contact | | Attributing demo requests or support interactions to campaigns. |
CustomiseProduct | | Personalized product and configuration tracking. |
Donate | | Donation tracking and nonprofit campaign optimization. |
FindLocationButton | | Local service ads and location intent tracking. |
FindLocationInput | | Location intent tracking. |
InitiateCheckout | | Checkout intent and cart abandonment optimization. |
Lead | | Lead generation optimization and audience building. |
Purchase | | ROAS calculation and purchase-based audience building. |
Schedule | | Booked meeting optimization. |
SearchButton | | Search intent tracking. |
SearchInput | | Search intent tracking. |
StartTrial | | Trial conversion optimization. |
Subscribe | | Subscription conversion tracking. |
SubmitApplication | | Application funnel tracking. |
ViewContent | | Top-of-funnel engagement tracking. |
This example is for a HTML website. View this article to see how to setup on your own platform (eg. Webflow, Framer etc.)
<!-- View Content button -->
<button class="action-btn-vc-019-pf">Read Article</button>Apply these classes to any form.
Works with the following event types: AddPaymentInfo, CompleteRegistration, Contact, CustomizeProduct, Donate, Lead, PageView, Schedule, StartTrial, SubmitApplication, and Subscribe events.
Important: Add info-frm-cntr-pf to your form container first
Element | CSS Class |
|---|---|
Form container or form element | |
First name input | |
Last name input | |
Full name input | |
Email input | |
Phone input | |
Value or price field | |
This example is for a HTML website. View this article to see how to setup on your own platform (eg. Webflow, Framer etc.)
<!-- Contact form -->
<form class="info-frm-cntr-pf">
<!-- Customer information -->
<input type="text" class="info-cust-full-name-pf" placeholder="Full Name" />
<input type="email" class="info-cust-em-pf" placeholder="Email" />
<input type="tel" class="info-cust-ph-pf" placeholder="Phone (optional)" />
<!-- Message fields -->
<input type="text" placeholder="Subject" />
<textarea placeholder="Your message..."></textarea>
<!-- Submit button -->
<button type="submit" class="action-btn-cntct-003-pf">Send Message</button>
</form>Use these classes to trigger AddToWishList, AddToCart, InitiateCheckout, and Purchase with product data.
eCommerce tracking requires a nested structure. Add the main container first, then product containers, then the individual product detail classes.
Element | CSS Class |
|---|---|
Products list container (add this to the overall products list container before adding the other classes below) | |
Total amount element | |
Add these classes to any element to track it and send along with the event.
Element | CSS Class |
|---|---|
Individual product container (add this to the overall product container before adding the other classes below) | |
Product ID | |
Product price | |
Product quantity | |
After adding classes, test your setup in PixelFlow and confirm the event appears in your logs.
<!-- Checkout container wraps form, order summary, and purchase button -->
<div class="info-chk-itm-ctnr-pf">
<!-- Add Payment Info Form (Optional) -->
<div class="info-frm-cntr-pf">
<!-- Customer information -->
<input type="text" class="info-cust-fn-pf" placeholder="First Name" />
<input type="text" class="info-cust-ln-pf" placeholder="Last Name" />
<input type="email" class="info-cust-em-pf" placeholder="Email" />
<input type="tel" class="info-cust-ph-pf" placeholder="Phone" />
<!-- Payment action -->
<button class="action-btn-pymt-001-pf">Save Payment Method</button>
</div>
<!-- Order summary -->
<div class="info-chk-itm-pf">
<div class="info-itm-id-pf">WH-001</div>
<div class="info-itm-prc-pf">$298.00</div>
<span class="info-itm-qnty-pf">2</span>
</div>
<div class="info-totl-amt-pf">$646.00</div>
<!-- Purchase button is directly inside checkout container -->
<button class="action-btn-plc-ord-018-pf">Complete Purchase</button>
</div>Use these classes to track Search and FindLocation events. Wrap the input and button with the container element, then add the correct classes to each element.
The container class info-srch-ctnr-pf should wrap both your input field and button.
Element | CSS Class |
|---|---|
Search or location container | |
Search input field | |
Search button | |
Find location input | |
Find location button | |
<!-- Input + Button (Horizontal) -->
<div class="info-srch-ctnr-pf">
<input
type="text"
class="action-inpt-srch-014-pf"
placeholder="Search products..."
/>
<button class="action-btn-srch-015-pf">Search</button>
</div>
<!-- Input + Button (Vertical) -->
<div class="info-srch-ctnr-pf" style="display: flex; flex-direction: column; gap: 0.5rem;">
<input
type="text"
class="action-inpt-srch-014-pf"
placeholder="What are you looking for?"
/>
<button class="action-btn-srch-015-pf" style="width: 100%;">
Search Products
</button>
</div>
<!-- Input Only (Enter key triggers search) -->
<div class="info-srch-ctnr-pf">
<input
type="text"
class="action-inpt-srch-014-pf"
placeholder="Search and press Enter..."
/>
</div><!-- Input + Button -->
<div class="info-srch-ctnr-pf">
<input
type="text"
class="action-inpt-loc-016-pf"
placeholder="Enter zip code or city..."
/>
<button class="action-btn-loc-017-pf">Find Stores</button>
</div>
<!-- Input Only (Enter key triggers search) -->
<div class="info-srch-ctnr-pf">
<input
type="text"
class="action-inpt-loc-016-pf"
placeholder="Enter address and press Enter..."
style="width: 100%;"
/>
</div>When you finish setup, use How to Test and Verify Your PixelFlow CAPI Setup to confirm everything is working.