try out script tag

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-05 22:09:07 +01:00
parent ceee19bc36
commit fb18e49078
5 changed files with 14 additions and 10 deletions

View File

@@ -5,10 +5,10 @@ import { MixanWeb as Openpanel } from './index';
const el = document.currentScript;
if (el) {
window.openpanel = new Openpanel({
url: el?.getAttribute('url'),
clientId: el?.getAttribute('client-id'),
clientSecret: el?.getAttribute('client-secret'),
trackOutgoingLinks: !!el?.getAttribute('track-outgoing-links'),
trackScreenViews: !!el?.getAttribute('track-screen-views'),
url: el?.getAttribute('data-url'),
clientId: el?.getAttribute('data-client-id'),
clientSecret: el?.getAttribute('data-client-secret'),
trackOutgoingLinks: !!el?.getAttribute('data-track-outgoing-links'),
trackScreenViews: !!el?.getAttribute('data-track-screen-views'),
});
}