@segment/tracktor

Tracktor is a standalone script that pairs with the Segment Visual Tracker to instrument tracking into websites.

Usage no npm install needed!

<script type="module">
  import segmentTracktor from 'https://cdn.skypack.dev/@segment/tracktor';
</script>

README

Tracktor

Tracktor is a standalone script that pairs with the Segment Visual Tracker to instrument tracking into websites.

It takes the tagger's tracking instrumentation specs and binds to a subset of dom element events. When the event is fired, the tracking event is sent to the website's instrumented AJS tracker.

Trying it out

You can develop on Tracktor easily by using the sample application.

yarn start

Building the script

yarn build:tracktor

Running integration tests

To run integration tests (that run in a headless chrome environment for blackbox testing) run

yarn test

Release

To release a new version of Tracktor follow these steps

  1. Run npx release-it and follow the prompts to release the tracktor module to npm

  2. Publish analytics.js-integrations visual tagger integration by updating the tracktor version of the visual tagger integration hosted in the analytics.js-integrations repo to reflect the version published in step 1 and running npm publish

  3. PR analytics.js-private to update the version of the visual tagger integration published in step 2 and follow the release train process laid out in "Releasing analytics.js"

  4. Actively monitor the integration dashboard across release tiers until the integration is fully rolled out