Skip to main content

Embedding Calendly in Wix Site

Create a container box in Wix and change the ID to handlCalendly

After that, open the page velo section and copy paste this

import wixWindowFrontend from 'wix-window-frontend';
$w.onReady(function () {
	$w("#handlCalendly").customClassList.add("calendly-inline-widget")
	wixWindowFrontend.postMessage('HandLCalendly');
})

And finally in global settings, go to Custom Code section and copy paste the code below:

window.onmessage = function(event) {
  if (event.data == 'HandLCalendly'){
	setTimeout(function(){
        Calendly.initInlineWidget({
            url: 'https://calendly.com/YOUR_LINK/30min',
            parentElement: document.getElementById('handlCalendly'),
            utm: {
                utmCampaign: typeof HandL == 'object' && HandL.getAll()['utm_campaign'] || "",
                utmSource: typeof HandL == 'object' && HandL.getAll()['utjm_source'] || "",
                utmMedium: typeof HandL == 'object' && HandL.getAll()['utm_medium'] || "",
                utmContent: typeof HandL == 'object' && HandL.getAll()['utm_content'] || "",
                utmTerm: typeof HandL == 'object' && HandL.getAll()['utm_term'] || ""
            }         
       });
	}, 1000);
 }
};