You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/assets/js/embed.host.js

12 lines
330 B
JavaScript

import iframeResize from 'iframe-resizer/js/iframeResizer'
const iframe = document.querySelector('[plausible-embed]')
const options = {
heightCalculationMethod: 'taggedElement'
}
if (iframe.getAttribute('background')) {
options.bodyBackground = iframe.getAttribute('background')
}
iframeResize(options, '[plausible-embed]')