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

@selinarnd/selina-attribution

v1.3.3

Published

Module to accept traffic with marketing identifiers and keep them for later use

Downloads

22

Readme

Selina Attribution Module

The goal is to be able to know the history of all the user visits once he makes a booking or other significant events. The module would be responsible to capture and calculate marketing parameters and identifiers for every user session in an array / local storage (each session is added to the array).

Parameters

| Parameter | Type | Origin | Description/Example | |-------------|--------|---------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------| | visitDate | string | GMT date/time of the entry to the website | | | campId | number | Get from URL query string camp_id | This is the campaign identifier in the back office.Example: http://selina.com/?camp_id=123 | | utmSource | string | Get from URL query string utm_source | http://selina.com/?utm_source=GoogleExamples: Google/Facebook/NomadicMatt | | utmCampign | string | Get from URL query string utm_campaign | | | utmContent | string | Get from URL query string utm_content | | | utmTerm | string | Get from URL query string utm_term | | | gclid | string | Get from URL query string gclid | | | fbclid | string | Get from URL query string fbclid | | | gaId | string | Get from first party cookie created by google analytics | The cookie name is _ga | | userAgent | string | Take from the http header | The full as-is user agent string, where it exists | | referrer | string | Taken from the browser referrer | | | landingPage | string | Page in which the visitor starts his session | | | campData | json | Taken from the query string as is, if it’s a valid json | E.g https://www.selina.com/?camp_data=%7B%22campaign%22%3A%22google%20black%20friday%22%2C%20%22affiliate_name%22%3A%22buba%22%7D |

Extra parameters

The module will add in the response any value data in: window._selinaAttributionConfig.extraParams = {...}

Storage

The module will try to use 'localStorage' ('sessionStorage' if it isn't available), it can be overrided with any compatible method in: window._selinaAttributionConfig.storage

Methods

SelinaAttribution module expose these methods to the console:

getAllTouchpoints

Return the object with an array of all the user touchpoints formated.

getCurrentTouchpoint

Return the current visit list of parameters formated.

Development

Build

npm i
npm run build

Test

npm i
npm run test

Git

Commit

This project use the conventional change log and the angular commit format to automatically generate the changelog file, to help the developers to follow the convetion we use commitizen throught the command:

npm run commit

if you are contributing this project please use this instead of git commit

Auto fix linter errors:

Before each commit a pre hook check with eslinter the changed files in the commit, if you get an linter error you can try to autofixed with:

npm run fixlint

Contributing

Before contribute please check our contributing guidelines