function onChartExported(chartMetadata, format) {
  if (typeof window.gtag === 'function') {
    window.gtag('event', 'chart-export', {
      event_category: chartMetadata.id,
      event_label: format,
    })
  }
}
@param {chartMetadata} chartMetadata
@param {string} format