@builder.io/partytown
Version:
Relocate resource intensive third-party scripts off of the main thread and into a web worker.
35 lines (30 loc) • 787 B
JavaScript
/**
* Forwards Facebool Pixels main window calls to Partytown's worker thread.
*
* https://developers.facebook.com/docs/facebook-pixel/get-started
*
* @public
*/
const facebookPixelForward = ['fbq'];
/**
* Forwards Freshpaint.io main window calls to Partytown's worker thread.
*
* https://www.freshpaint.io/
*
* @public
*/
const freshpaintForward = [
'freshpaint.addPageviewProperties',
'freshpaint.identify',
'freshpaint.track',
];
/**
* Forwards Google Tag Manager main window calls to Partytown's worker thread.
*
* @public
*/
const googleTagManagerForward = ['dataLayer.push'];
exports.facebookPixelForward = facebookPixelForward;
exports.freshpaintForward = freshpaintForward;
exports.googleTagManagerForward = googleTagManagerForward;
;