@segment/analytics.js-integration-tag-injector

The tag-injector analytics.js integration.

Usage no npm install needed!

<script type="module">
  import segmentAnalyticsJsIntegrationTagInjector from 'https://cdn.skypack.dev/@segment/analytics.js-integration-tag-injector';
</script>

README

analytics.js-integration-tag-injector

This integration is called a tag injector so as to not suggest it's as fully-featured as a modern tag manager. But the basic idea is there: this is an analytics.js integration that takes in settings, and creates <script> tags on the page with those settings.

Why does this exist? See:

https://paper.dropbox.com/doc/PRD-Tag-Injector-dNWcO50rHexDvzfbaWNKe