Giter VIP home page Giter VIP logo

sniper-link's Introduction

npm npm GitHub Sponsors

sniper-link (under development)

What is a sniper link? Let growth.design explain:

A Sniper Link is a special link that makes it easier for new users to confirm their email after a signup. It typically simulates an inbox search, which minimizes distractions while leading users to the inbox of their email service provider detected on signup.

With Sniper Links, your new users will only see YOUR confirmation email in their inbox, nothing else. It works even if you landed in their spam.

This onboarding technique was coined by Dan Benoni in 2019.

Feature Support Table

Gmail Outlook Yahoo Proton iCloud
Account scope
From filter
Spam piercer
Time frame (days)
Time frame (hours)

Legend:

  • ✅ = Supported by this provider and the script
  • *️⃣ = Supported by the provider, but not by the script as yet

Installation

Using the node package manager of your choice, either

yarn add sniper-link or npm install sniper-link

Usage

Subject to change while this script is in an alpha version. Currently it builds three versions:

  • A node version in dist/node/index.js
  • Web esm for React/Svelte etc dist/web/esm.js
  • Web IIFE for native and legacy js dist/web/iife.js

Feature Support Table

Expects Required? Notes
email String (email) ✅ Yes User's email inbox to search.
from String Sender's email address. Can be an email, or partial match.
forceProvider String ('google', 'yahoo', 'microsoft', 'proton', 'icloud') Optional override to skip email provider being detected from the provided string. Useful for when you already know [email protected] is using G-Suite under the hood, possibly via a MX lookup.
daysAgo Number Sent within the last 'x' days
hoursAgo Number Sent within the last 'y' hours. See note below.
  • You cannot use a combination of daysAgo and hoursAgo. If hoursAgo are specified, they will be used in preference.
  • Yes, you could use forceProvider to make [email protected] to open mail.google.com -- that's on you.

Example

A node.js example

const buildUrl = require('sniper-link/dist/node');

console.log(
  buildUrl({
    email: '[email protected]',
    from: '@userfront.com',
    daysAgo: 1,
  }),
);

// Logs the following
// {
//   provider: 'google',
//   link: 'https://mail.google.com/mail/u/[email protected]/#search/from%3A(@userfront.com)+in%3Aanywhere'
// }

Roadmap

  • Return Android and iOS links with app protocols?
  • Add a subject/keyword filter (very low priority)?
  • Consider more popular non-western email providers

Development

Run either npm run build or yarn build to output to the dist folder

Testing

Run npm run test or yarn test to run tests via Jest. --watch flag supported.


Disclaimer

I am in no way affiliated with the team at growth.design, I am merely a fan. All credit goes to Dan Benoni for the idea.

sniper-link's People

Contributors

taitems avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

aomini

sniper-link's Issues

Add support for a `provider` property

Passing in a provider property should skip any domain checking. This allows this script to work with pre-flight checks such as MX lookups which reveal [email protected] is using Google Apps, and should therefore be deep linked to the google domain.

Add support for hour handling

Only two providers will support this, but one of them is Gmail, which handles something like 30-40% of all email campaigns, and something like 80% of all growth.design customers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.