function registerListener() { window.wixDevelopersAnalytics.register( 'cf06bdf3-5bab-4f20-b165-97fb723dac6a', (eventName, eventParams, options) => { const XSRFToken = getXSRFTokenFromCookie() fetch( `${window.location.origin}/_serverless/analytics-reporter/facebook/event`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-XSRF-TOKEN': XSRFToken, }, body: JSON.stringify({ eventName, data: eventParams }), }, ); }, ); function getXSRFTokenFromCookie() { var match = document.cookie.match(new RegExp("XSRF-TOKEN=(.+?);")); return match ? match[1] : ""; } } window.wixDevelopersAnalytics ? registerListener() : window.addEventListener('wixDevelopersAnalyticsReady', registerListener);
top of page

Forum Posts

annas tanley
Jul 06, 2022
In Questions & Answers
Are you looking for authentic family law essay help online? Look nowhere else than the Law Essay Writers for accurate and reliable services. They have the best writers who can do your assignment no matter the subject. Trusting anyone with your essay or assignment is hard, but you can choose the writer you want to work with when you have a platform that offers many benefits. What else could you ask for?
0
3
57
annas tanleyannas tanley

annas tanley

More actions
bottom of page