// YouMart.Club — Meta Pixel CompleteRegistration Event // Fires when a NEW customer creates a membership account via Ecwid window.addEventListener('load', function() { if (typeof Ecwid === 'undefined') return; Ecwid.OnAPILoaded.add(function() { Ecwid.OnSetProfile.add(function(customer) { if (!customer || !customer.id) return; var storageKey = 'ym_member_' + customer.id; // Only fire once per customer — skips returning logins if (!localStorage.getItem(storageKey)) { if (typeof fbq === 'function') { fbq('track', 'CompleteRegistration', { content_name: 'YouMart.Club Membership', status: true }); } localStorage.setItem(storageKey, '1'); } }); }); });