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.
Building the script
Running integration tests
To run integration tests (that run in a headless chrome environment for blackbox testing) run
To release a new version of Tracktor follow these steps
npx release-itand follow the prompts to release the tracktor module to npm
analytics.js-integrationsvisual 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
analytics.js-privateto update the version of the visual tagger integration published in step 2 and follow the release train process laid out in "Releasing analytics.js"
Actively monitor the integration dashboard across release tiers until the integration is fully rolled out