try out script tag
This commit is contained in:
@@ -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'),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user