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

ui-tracking

v0.0.0

Published

Contains code related to user analytics and tracking

Downloads

42

Readme

ui-tracking Build Status

The ui-tracking repo contains code related to user analytics and tracking with any number of third-party tracking vendors. It is responsible for:

  • Collecting shared tracking-related information
  • Holding APIs for modules and apps that provide tracking methods
  • Managing third-party tracking code

This code contained within this repository is not meant to be used directly by the public. Rather, it exists as an open repository to further our open source initiatives and to share our patterns and practices around user analytics and behavior tracking.

Requirements

This repository requires Node 7.3.0 and NPM 4.1.1 or higher. The tooling will assert the minimum NPM version required.

Tooling

Tooling is provided by bosun.

For a list of commands, run gulp help.

To specify a module to perform a task for, use the --src flag. eg. --src vendor/waypoints.

Contributing

Publishing Modules

All modules should be published using npm publish. No other commands are necessary. Tests and other tasks will be run as part of the prepublish script.

Gilt Data Team are the gatekeepers of the repo and primary reviewers. Pull Requests shouldn't be merged until a member of Data has had a chance to review.

Publishing should be done from the root directory, but should work as long as the proper path is specified. eg. npm publish src/vendor/waypoints.

Tests

All modules within this repo are required to have assertions to validate their exports.

All tracking.* modules are required to have, at the minimum, tests to validate their exports, as well as validate all event names being sent through Gumshoe.

All tests should be authored with mocha and chai.

Spies are provided through chai-spies. Please reference the github README for chai-spies, as the plugin page has fallen behind the current state of the project.

Module Version Metadata

Modules are no longer required to have $$PACKAGE_VERSION$$ declared in source. The bosun publish lifecycle will inject a metadata module to the end of each file in a module's js directory, prior to publish.

Vendor Modules

Vendor modules (vendor.*) in this repo make use of npm prepublish scripts to automatically wrap the vendor code in gilt.define. Vendor code is stored in a lib directory within a module. Output will be rendered to the js directory for a given module directory.

Module Versions

To query the version of any module published from this repository within a browser, simply require

Owner

Code ownership is shared; the point of a separate repo is so that people who are not front-end engineers can review code easily and see changes when they are made.

Rationale

The reason for this repo is that managing tracking through pubsub, as we have done for several years, is not coupled tightly enough to prevent errors from occurring, and when errors occur, they are painful. Also, it does not provide for non-engineers to look over code easily.

Tree

  • tracking
    • contains tracking modules for various parts of the ecosystem
      • component (maps to a component module)
      • web (maps to an application name)
      • [other] (maps to other named modules)
  • common
    • contains modules which share common functions through the ecosystem
  • tracking_api
    • provides API wrapping and mapping to vendor API

The idea is that applications and modules can track at the point where something occurs, but they are using our own tracking methods and agnostic as to what is done with the tracking calls after they are made. Once the calls get to the tracking modules, they can collect the data together with shared data provided through common.tracking_metadata, and fire off whatever specific third-party calls are necessary.