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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ember-cli-ga

v0.1.4

Published

Google Analytics universal analytics addon for ember-cli

Readme

ember-cli-ga

About

simple google analytics addon

Installation

npm install --save-dev ember-cli-ga

Usage

Step 1

In your config/environment.js, you need to do some basic setup:

if (environment === 'development') {
  ENV.GA = {
    UA_CODE: "your UA code here" // where UA code looks something like: UA-00000000-1
  }
}

Step 2

If you're using ember-content-security-policy (and if you're using ember-cli, you probably are) you'll need to make some changes to your content security policy. Open up your config/environment.js and put this in your ENV hash:

contentSecurityPolicy: {
  'default-src': "'none'",
  'script-src': "'self' https://www.google-analytics.com/analytics.js http://www.google-analytics.com/analytics.js",
  'font-src': "'self'",
  'connect-src': "'self' https://www.google-analytics.com http://www.google-analytics.com",
  'img-src': "'self' https://www.google-analytics.com http://www.google-analytics.com",
  'style-src': "'self'",
  'media-src': "'self'"
}

Step 3

Open router.js and add this at the top:

import pageview from './mixins/analytics-pageview';

Then, where you declare your router, change it to look like this:

var Router = Ember.Router.extend(pageview, {
  .
  .
  .
});

(pageview is the mixin that sends a page view on every route change).

Step 4

Verify everything is working by opening up your google analytics page, clicking on "Real Time" > "Overview", and navigating around your site. You should see events coming in.