Closed Hedes-Productions closed 1 year ago
Looks like the bug is here https://github.com/DavidWells/analytics/blob/698def152b6eb352d0421442bd95329d03fcdd9d/packages/analytics-plugin-segment/src/browser.js#L176
There must be no other scripts on your page it can find to attach the script script after.
Temp fix add <script>/*empty comment*/</script>
to the head of your DOM.
Will need to harden the script injection mechanism in a follow PR addressing these https://github.com/search?q=repo%3ADavidWells%2Fanalytics%20parentNode&type=code
Thanks for the quick answer. That's very helpful.
Analytics package version - 0.8.7 Other Packages - @analytics/segment (version - 1.1.4)
So Im using @analytics/segment to send events to the segment data source. I faced two issues when Im using this package.
Error -