Event Tracking via Classes

Table of Content

Table of Content

Table of Content

How to Track Website Elements via Classes

A list of different classes to apply to elements to assign specific events to them

By default PixelFlow tracks Page View event on any page load. If you want to track more events, there are two ways to do this:

  1. Use Event URL tracking - assign a URL to a specific event

  2. Tag elements on your website - use the below "classes" to assign tags to elements on your website so PixelFlow knows what was clicked

A common example is tracking a Subscribe event when user clicks on a specific button on your website.

Another use case is to track a Lead event when user fills out a form on your website and submits it.

Below is an explanation of which classes to apply to different elements on your website:

  • Add General events classes to buttons or interactive elements to initiate the event.

  • Add Form events classes to form elements, like user name, email etc. to extract that information from the form and add it to the event payload.

  • Add Purchase events classes to elements on your cart, checkout or order confirmation page etc. to extract product information from the elements and add it to the event payload. Relevant for the following events: Add To Wish List, Add To Cart, Initiate Checkout and Purchase

Please note - there are different ways to apply these classes depending on your platform:

Instructions for Each Website Platform

These classes are for reference - please read the documentation for your platform first:

General Event Classes

AddPaymentInfo

Subscribe

action-btn-pymt-001-pf
action-btn-sub-002-pf

Contact

InitiateCheckout

action-btn-cntct-003-pf
action-btn-buy-004-pf

AddtoCart

AddtoWishlist

action-btn-cart-005-pf
action-btn-wl-006-pf

CompleteRegistration

CustomiseProduct

action-btn-reg-007-pf
action-btn-cstm-008-pf

Donate

Lead

action-btn-don-009-pf
action-btn-lead-011-pf

StartTrial

SubmitApplication

action-btn-trial-012-pf
action-btn-submit-013-pf

SearchInput

SearchButton

action-inpt-srch-014-pf
action-btn-srch-015-pf

FindLocationInput

FindLocationButton

action-inpt-loc-016-pf
action-btn-loc-017-pf

Purchase

ViewContent

action-btn-plc-ord-018-pf
item action-btn-vc-019-pf


eCommerce Events Classes Document

To enrich eCommerce event data you can add the following additional classes to elements on your website in order to provide further data to Meta. Commerce events require multiple nested classes to track item information.

Apply these classes to the elements on your cart, checkout or order confirmation page to trigger the following events: Add To Wish List, Add To Cart, Initiate Checkout and Purchase.

(REQUIRED) Add this to the overall main/parent container containing all the products and a button

info-chk-itm-ctnr-pf

Add this to the total amount (if exists):

info-totl-amt-pf

(REQUIRED) Add this to the individual product container containing all the product information

info-chk-itm-pf

Add this to the product id. Please note:

  • make sure it is a valid id, which corresponds to the product id in your CMS / database and Meta Product Catalog (if applicable)

  • you can add a hidden field with product id if you do not want your users to see it, but still want to track it.

info-itm-id-pf

Add this to the product price:

info-itm-prc-pf

Add this to the product quantity:

info-itm-qnty-pf


Form Event Classes

Form events track form submissions and capture form field values. Add these classes to form elements and input fields - can be used with AddPaymentInfo, CompleteRegistration, Lead, StartTrial, Subscribe, Contact and SubmitApplication events to further enrich the data. Note: if you are adding value classes for name, email etc. you must add necessary classes to container or form.

Apply this class to the form container or the form element:

Apply this to a value or price:

info-frm-cntr-pf
info-val-pf

Apply this to the first name input:

Apply this to the email input:

info-cust-fn-pf
info-cust-em-pf

Apply this to the last name input:

Apply this to the phone input:

info-cust-ln-pf
info-cust-ph-pf

Apply this to the search/location input:


info-srch-ctnr-pf


PixelFlow

·

©

2025

All rights reserved

PixelFlow

·

©

2025

All rights reserved

PixelFlow

·

©

2025

All rights reserved