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

insertly.js

v1.0.1

Published

This script is a tracking script that allows the creation/population of form fields on all forms on a page. It takes a generic list of tracking parameters, like Google Analytics params, and inserts them into form fields.

Downloads

9

Readme

Tracking-Scripts

This script is a tracking script that allows the creation/population of form fields on all forms on a page. It takes a generic list of tracking parameters, like Google Analytics params, and inserts them into form fields.

It will do one of two things for inserting the values, it will either:

  • Look for an existing field with a class set to the parameter name

OR

  • Create a hidden form field with the name set to the parameter name.

##Installation

Installing Insertly.js is a breeze.

CDN:

<script src="https://js.colling.media/insertly.js"></script>

Bower:

bower install insertly.js

NPM:

npm install insertly.js

Yarn:

yarn install insertly.js

##Setup

###Quick and Dirty

a = new Insertly();
a.init();

###Options

#####First Touch Attribution

a.firstTouchAttribution = true; //default: false

First Touch Attribution, while set to true, it will only look for the variables ONE TIME per cookie lifetime. If the cookie exists, it won't overwrite it. If set to false, anytime the parameters are in the URL, it will create the cookies.

#####Cookie Expiration Time

a.cookieExpirationTime = 30; //default: 0

Cookie Expiration Time is how many days you would like the cookies to survive. For instance, if you set it to 10, the cookies will expire in 10 days, unless they are re-written by the script.

NOTE: setting this to 0 will make the cookies session only, meaning when they close the browser, the cookies delete.

#####Debug Mode

a.debugMode = true; //default: false

Debug mode creates the form fields, but leaves them visible, meaning you can read the information in them, allowing you to see what exactly the passing variables could be.

DO NOT LEAVE DEBUG MODE ON WHEN RUNNING SCRIPT ON A PRODUCTION SITE&