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

Jessica Milligan
Nov 04, 2022
In General Discussion
Recently I decided to plan a trip to the USA, my friends advised me to use a car rental service. At first I thought that it is not convenient and expensive, but it turned out to be the opposite, I used the service of luxury car rentals pittsburgh at the airport, which saved me a lot of time. In fact, there are cars for absolutely all possibilities, starting from cheap and ending with luxury cars.
0
1
28

Jessica Milligan

More actions
bottom of page