Events
To gather the necessary data for displaying performance on the dashboard, use the ftltag()
function to send events.
Parameters of ftltag()
event
type: string
This parameter indicates that you are sending an event.
event_type
type: string
This specifies the type of event you want to send. There are two types of events.
event_data
type: object
This is an object that contains all the necessary data based on the event type.
Data differs depending on the event type.
Here’s an example for the cart
event:
debug
type: boolean
This parameter is for developers during implementation. When set to true
, it enables logging in the console for debugging purposes.
Types of Events
Event: cart
This event should be sent when a product is added to the cart.
Data to Include
product_id
type: string
This is the identifier for the product. It should match the identifier used in the product feed and widget attributes.
size
type: string
This indicates the size selected by the customer. Use uppercase letters or numbers.
Event: transaction_end
This event should be sent when an order is completed. Ensure that this event is sent only after the transaction is confirmed. All products included in the purchase should be listed in the products
array.
Example:
Data to Include
order_id
type: string
This is the identifier for the order.
products
type: Product[]
This is a list of products that were purchased.
Product Structure
total_price
type: number
This represents the total amount for the order, including taxes and shipping costs, as paid by the customer.