fix sdk api

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-05 21:14:38 +01:00
parent 95408918ab
commit 5f873898e9
16 changed files with 343 additions and 251 deletions

14
packages/sdk-web/cdn.ts Normal file
View File

@@ -0,0 +1,14 @@
// @ts-nocheck
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'),
});
}