top of page
bottom of page
document.addEventListener('click', function(e) {
var link = e.target.closest('a[href*="Ask%20Your%20Boss"]');
if (link) {
fbq('trackCustom', 'EmployerEmail_Click');
}
});
document.addEventListener('click', function(e) {
var link = e.target.closest('a[href*="Special%20Rate"]');
if (link) {
fbq('trackCustom', 'SpecialRate_Click');
}
});
window.addEventListener('message', function(event) {
if (event.data && event.data.eventType === 'ORDER_COMPLETED') {
var total = event.data.totalPrice || 0;
var originalTotal = event.data.originalTotal || total;
var discountPercent = originalTotal > 0 ? ((originalTotal - total) / originalTotal) * 100 : 0;
if (discountPercent >= 50) {
fbq('trackCustom', 'FriendsFamily_Purchase', {
value: total,
currency: 'USD',
discount_percent: Math.round(discountPercent)
});
} else if (total > 0) {
fbq('trackCustom', 'PaidTicketPurchase', {
value: total,
currency: 'USD'
});
} else {
fbq('trackCustom', 'FreeTicketIssued');
}
}
});
if (window.location.pathname === '/tickets') {
fbq('trackCustom', 'TicketPageView');
}
if (window.location.pathname.includes('event-details')) {
fbq('trackCustom', 'CheckoutStarted');
}
// This one needs to be attached to the form submit confirmation on /lead specifically
fbq('trackCustom', 'NewsletterSignup');