@vizertech/nextjs-capi
Version:
NextJS 13 Wrapper for fb pixel and capi for graph v17.0 API
46 lines (45 loc) • 1.13 kB
TypeScript
export type FacebookEvent = {
event_name: FB_EVENTS;
event_time?: number;
action_source?: "website";
event_id?: string;
event_source_url?: string;
currency?: 'mxn';
custom_data?: {
content_type?: 'product_group';
currency?: 'MXN';
value?: number;
contents?: ContenidoCompra[];
};
user_data?: {
client_ip_address?: string;
ct?: string[];
external_id?: string[];
fn?: string[];
ph?: string[];
zp?: string[];
client_user_agent?: string;
st?: string[];
country?: string[];
em?: string[];
fbc?: string;
fbp?: string;
};
test_event_code?: string;
};
export declare enum FB_EVENTS {
ADD_TO_CART = "AddToCart",
ADD_TO_WISHLIST = "AddToWishlist",
COMPLETE_REGISTRATION = "CompleteRegistration",
CONTACT = "Contact",
FIND_LOCATION = "FindLocation",
PURCHASE = "Purchase",
SEARCH = "Search",
LEAD = "Lead",
VIEW_CONTENT = "ViewContent"
}
export type ContenidoCompra = {
id: number;
quantity: number;
item_price: number;
};