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

@evolv-delivery/metrics

v1.4.3

Published

Allows Metrics (audience attributes and events) to be populated/emitted from dom, query parameters, datalayer, cookie, local storage, and session storage.

Downloads

243

Readme

Metrics

The Metrics integration allows metrics (audience attributes and events) to be populated/emitted from dom, query parameters, datalayer, cookie, local storage, session storage, and more.

Why

The goal of the Metrics integration is to provide a central location where both audience attributes and events can be defined declaritively in a robust way that can be used to specify full funnel progression metrics across experiments.

Setup in the Evolv Manager

Adding an integration to the Evolv Manager

Configuration Concepts

The configuration json supports the creation of metrics through a hierarchical structure that provides both inheritance and filtering/conditions.

Inheritance

Inheritance is the idea of passing down common information (defined as attributes) to decendents of the current metric. The decendents can override the inherited attributes (and this is needed if you want to use Conditions). The mechanism of a metric passing inherited values is through the use of the apply attribute. When apply is present, the current metric is classified as an Abstract Metric.

Conditions

If a metric and all of its decendents should only be applied when a condition is met, you can use the when attribute to conditionally filter whether the children should be evaluated.

Configuration Organization

The intent of the configuration json is to capture all metrics that will be captured as audience values or events. Each of these is referenced as a metric.

Metrics

Each metric can contain the following attributes:

  • when - is used to specify that the metric (or sub-metrics) have to meet the condition before they are to be applied
  • tag - specifies what the metric will be reported as (event id for action event and audience attribute for action bind)
  • source - specifies where to get the audience attribute or event critera
  • key - specifies where to get the value in the source
  • action - is either event or bind (bind is used if action is not specified)
  • type - is used when action is bind to convert the type to
  • apply - indicates that the current metric is abstract and its content should be passed to the metrics in the apply array
  • value - Specifies an explicit value when using action bind
  • storage - specifies that the value of a bind action should be cached for reference on downline pages
  • map - specifies value options when the value extracted needs further mapping
  • default - specifies the value to bind to a metric when it is unable to find the value indicated by key
  • poll - allows the system to wait for some period of time and continue trying to extract a value
  • extract - provides mechanism to extract out values from an object or element
  • combination - allows two numeric values to be used in calculation of value

Abstract Metrics

If a metric has an apply attribute, then it is an abstract metric and its attributes are only to provide interited values to the metrics in its apply section. An abstract metric is never applied to the page directly. However, if its children override the source and key, the parent's source and key must be validated/available before the children are evaluated.

SPA

All metrics will be refreshed and reapplied when a history.pushstate is invoked if it is indicated in the Evolv snippet.

More Information