-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or requestneeds-triageThis is an un-triaged issueThis is an un-triaged issue
Description
Is your feature request related to a problem? Please describe.
We use es modules for our development without any build tool to process the js files. We are not able to import @webtrekk-smart-pixel/core as es module.
Describe the solution you'd like
We should be able to import the webtrekk-smart-pixel like so.
import webtrekkSmartPixel from '@webtrekk-smart-pixel/core';
const wtSmart = webtrekkSmartPixel.use(window, window.document);Describe alternatives you've considered
We had to load the script directly in index.html file using
<script async src="assets/js/smart-pixel.min.js"></script>Additional context
So we are not able to load @webtrekk-smart-pixel/core in a js file. Hence we had to put initialisation code also in the html file.
<script type="text/javascript">
window.wtSmart = window.wtSmart || [];
window.wtSmart.push(function(wtSmart) {
// set initial tracking config
wtSmart.init.set({
trackId: '###MappIntelligence TrackID###',
trackDomain: '###MappIntelligence TrackDomain###'
});
// send tracking data
wtSmart.track();
});
</script>Please find a plunkr link created which explains the issue.
https://plnkr.co/edit/0yKtACZNqX0kZyVc?open=lib%2Fscript.js

Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestneeds-triageThis is an un-triaged issueThis is an un-triaged issue