npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

autochart-tracker

v1.0.6

Published

JavaScript API for tracking visitor activities on automotive websites with Autochart.io

Downloads

11

Readme

autochart-tracker

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

Pre-Requisite

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

Installation

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 b=Array.prototype.slice.call(arguments);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="https://cdn.autochart.io/tracker/v1/autochart.track.min.js";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),window.autochart.init(a)},
/*!
  Replace <YourCustomerAccountIdHere> below with your customer API tracking key
*/
window.autochart.load("<YourCustomerAccountIdHere>");
</script>

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');
acTracker.init('<YourCustomerAccountIdHere>');

Usage

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):

window.AUTOCHART_DISABLED = true;

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.

Support

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


Internal Development

The sections below are for developers working on this library.

Testing

To run tests for this library:

npm start

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