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

pathforajs

v0.9.11

Published

Javascript SDK for engagaging and converting prospects into customers on your website with lightweight nurture apps

Readme

Build Status

Pathfora.js

Lightweight library for displaying widgets on your website. Integrates with your Lytics account for tracking user actions, and conditionally displaying widgets based on user segment. For more info, and full configuration examples please check wiki pages.

General Usage

  1. Add lytics tracking tag https://activate.getlytics.com/#/documentation/jstag_anon into your website, and import pathfora.js file.
```html
<html>
    <head>
        <title>Pathfora example</title>
    </head>
    <body>
        <h1>This is example usage of Pathfora SDK</h1>
        <div>
            <p>Page content<p>
        </div>
        <script src="https://api.lytics.io/api/tag/XXXXXXXXXXX/lio.js"></script>
        <script src="js/pathfora.js"></script>
        <script src="js/example_widget.js"></script>
    </body>
</html>
```
  1. Define and initialize your widgets inside example_widget.js ```javascript // Lytics Customer ID, use your ID from Lytics account settings here var lyticsID = 1234
var promoWidget = new pathfora.Message({
    layout: "modal",
    msg: "Welcome to our website"
});

var subscribe = new pathfora.Subscription({
    layout: "bar",
    msg: "Signup to get updates right into your inbox"
});


// Initialization
pathfora.initializeWidgets([promoWidget, subscribe], lyticsID);
```

Targeting example

Example usage of lytics segments, for displaying message conditionally specific target users

var message1 = new pathfora.Message({
    msg: "Welcome to our site",
    layout: 'modal'
});

var message2 = new pathfora.Message({
    msg: "Nice to see you again",
    layout: 'modal'
});

var message3 = new pathfora.Message({
    msg: "Hi, please check our new stuff",
    layout: 'modal'
});

var widgets = {
    targeted: [{
        segment: 'smt_new',
        widgets: [message1]
    },{
        segment: 'subscriber',
        widgets: [message2]
    },{
        segment: 'all',
        widgets: [message3]
    }]
};

// Please set your Lytics Id below
var lyticsId = 1234;

pathfora.initalizeWidgets(widgets, lyticsId);

Widgets

There are 3 types of widgets available - message, form and subscription.

Widgets are displayed in one of following layouts:

  • Modal - covering entire screen.

  • Slideout - sliding from left or right side of a screen.

  • Folding - stays always on the screen. Not available in message widgets.

  • Bar - positioned on top or bottom of a page. Scrolling with page, or stays at place. Not available on form widgets.

  • Button - simple call for action. Allows chaining other widgets for example opening modal. Requires widget type to be message.

All widgets are available in following color themes:

  • Default
  • Light
  • Dark
  • Custom - allows specifying custom colors for all widget elements.

Message/Promo

Used for displaying messages to user. Optional action button allows running callback function or opening links.

required params:

msg: [string]
layout: ['modal' | 'slideout' | 'button' | 'bar']

Email form

Simple contact form for writing email messages. Sent emails are stored on your Lytics stream.

required params:

msg: [string]
layout: ['modal' | 'slideout' | 'folding']

Subscription

Subscription widget. Subscribed emails are available in Lytics stream.

required params:

msg: [string]
layout: ['modal' | 'slideout' | 'folding' | 'bar']