// Helper function to delay opening a URL until a gtag event is sent.
// Works for multiple event types (WhatsApp, Email, etc.)
function gtagSendEvent(url, eventName) {
var callback = function () {
if (typeof url === 'string') {
window.location = url;
}
};
gtag('event', eventName || 'conversion_event_outbound_click', {
'event_callback': callback,
'event_timeout': 2000
});
return false;
}