node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



A client-side JavaScript API for tracking automotive website events with


Login to the Autochart portal and get the Tracking Key from your account's settings page.


Hosted CDN

This is the recommended approach if you are building the tracking implementation yourself rather than having the Autochart dev team implement it for you.

Add the following snippet immediately before the closing </head> tag on each page of your site. It will download the autochart.track.min.js file asynchronously from the Autochart CDN (so it will be fast and won't block your page from loading in the meantime). Make sure to update <YourCustomerAccountIdHere> with your account's Tracking Key.

<script type="text/javascript">
window.autochart=window.autochart||[],window.autochart.methods=["init","page","trackVehicleView","trackSearch","trackVisitIntent","tag","trackLead","trackLeadForm","trackVehicleAction","trackFinance","ready","trackLeadFormAspNet"],window.autochart.factory=function(a){return function(){var;return b.unshift(a),window.autochart.push(b),window.autochart}};for(var i=0;i<window.autochart.methods.length;i++){var method=window.autochart.methods[i];window.autochart[method]=window.autochart.factory(method)}window.autochart.load=function(a){var b=document.createElement("script");b.type="text/javascript",b.async=!0,b.src="";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),window.autochart.init(a)},
  Replace <YourCustomerAccountIdHere> below with your customer API tracking key

As an NPM module (advanced)

To reference the library as part of a commonjs style package, first install it:

npm install autochart-tracker --save

then import it:

var acTracker = require('autochart-tracker');


Add calls to autochart.track* functions to send event data to Autochart.

Disabling Tracking

If you need to disable tracking on a website which already has Autochart tracking hooks in place, you should insert the following line of code at the top of your tracking snippet (as the first line inside your <script> tag):


This will prevent any events from being sent to the Autochart servers.

Developer Guide

Check out the wiki for more details on building a tracking implementation with Autochart.


If you need help with anything, drop us an email at and we'll be happy to help out.

Internal Development

The sections below are for developers working on this library.


To run tests for this library:

npm start

Open browser to http://localhost:8080/test. This will run the mocha tests in the browser.