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

monetize-this

v0.0.32

Published

Monetize any web extension audience, empower free product development.

Downloads

68

Readme

Monetize-This: Effortlessly Monetize Any Free Browser Extension

Discord Monetize-This

Monetize-This is an npm package that seamlessly transforms any extension into a Honey-like platform, allowing you to effortlessly monetize your website. Please note: This project is actively under development, so breaking changes, bugs, and other hiccups are possible. However, we’d love for you to join us in making free extensions profitable for everyone!

📌 Installation & Prerequisites

To use Monetize-This, your extension needs storage and tabs permissions. storage is required to avoid remonetizing tabs repeatedly, and tabs facilitates reading URLs.

Add the following to your manifest.json:

{
  "permissions": ["storage", "tabs"]
}

When developer stores ask for permission justification, this explanation works well: This is required for https://github.com/dougwithseismic/monetize-this to function properly in order to monetize my app.

// TODO: Add specific text templates for storage & tabs permissions explanations. PRs welcome!

🚀 Getting Started

Quick Start Checklist

  1. Star this repo!
  2. Join the Discord and say hi: https://discord.gg/gimme
  3. Get set up!

Install Monetize-This

npm install monetize-this

Import and Initialize

To obtain an API key, email [email protected] before deploying to production. Without it, we won't be able to link sales to your account!

In your background script:

import MonetizeThis from 'monetize-this';

const monetizeThis = new MonetizeThis({
    apiKey: 'your-api-key',
    options: {
        mode: 'auto', // Options: 'auto' to monetize all tabs, 'manual' to manually call monetizeTab().
        enabled: true,
        ignoreList: ['example.com', 'another-domain.com'],
    },
});

monetizeThis.enable(); // Enables monetization

What Happens After Enabling?

Once enabled, Monetize-This interacts with the gimme server (our community cashback tool) to see if a URL can be monetized via an affiliate link. If a monetizable link is found, it will open in a background tab, then close once loaded. Purchases made afterward are attributed to your API key, resulting in commissions.

📜 API Methods

isMonetizable(url: string): Promise<boolean>

Checks if a URL can be monetized.

const canBeMonetized = await monetizeThis.isMonetizable('https://www.amazon.com');

monetizeTab(url: string): Promise<void>

Monetizes a tab by initiating monetization through the service worker.

await monetizeThis.monetizeTab('https://www.amazon.com');

🔄 Custom Hooks

Extend functionality with custom lifecycle hooks at different stages of monetization.

Available Hooks

  • onEnable - Triggered when monetization is enabled.

    monetizeThis.listeners.onEnable(() => {
        console.log('Monetization enabled!');
    });
  • onDisable - Triggered when monetization is disabled.

    monetizeThis.listeners.onDisable(() => {
        console.log('Monetization disabled!');
    });
  • beforeTabUpdate - Triggered before a tab update.

    monetizeThis.listeners.beforeTabUpdate((props) => {
        console.log('Before tab update', props);
    });
  • afterTabUpdate - Triggered after a tab update.

    monetizeThis.listeners.afterTabUpdate((props) => {
        console.log('After tab update', props);
    });
  • beforeMonetizeTab - Triggered before a tab is monetized.

    monetizeThis.listeners.beforeMonetizeTab(({ url }) => {
        console.log(`Before monetizing tab with URL: ${url}`);
    });
  • afterMonetizeTab - Triggered after a tab is monetized.

    monetizeThis.listeners.afterMonetizeTab(({ url, success }) => {
        console.log(`After monetizing tab with URL: ${url}. Success: ${success}`);
    });

Removing Hooks

Hooks return a function for removing listeners.

const removeListener = monetizeThis.listeners.beforeMonetizeTab(({ url }) => {
    console.log('About to monetize URL:', url);
});

// Remove listener when done
removeListener();

🛣️ Roadmap

Monetize-This has an ambitious roadmap, and here are some planned features:

  • Store Discounts - getAllDiscounts(url) for obtaining active discount codes for a given URL.
  • Search Engine Augmentation - Enhancements to search results, reminding users to support your extension.
  • Dashboards & Self-serve - Simplifying onboarding through gimme.
  • Ads & Targeting - Non-intrusive ad placements to boost extension revenue.
  • Web Component Templates - Quickly integrate discount features with a single function.

Got an idea? Contact [email protected] or create an issue on this repo. We’re open to collaborations!

❓ FAQ

How many stores can be monetized?

Currently, around 10,000 stores globally, with more added every day. Major stores like Amazon, Target, and Walmart are already available for private onboarded users.

📚 Documentation

We’re working on complete documentation—in the meantime, feel free to reach out with any questions.

🙏 Contributing

We’re actively looking for beta testers. If you’re interested in trying Monetize-This and providing feedback, we’d greatly appreciate it. Report bugs or suggest improvements through our issue tracker.

📧 Contact

Questions or suggestions? Email Doug Silkstone at [email protected].

📃 License

Monetize-This is MIT licensed.

⭐️ Show Your Support

If this project has helped you, please give us a ⭐️!


Happy monetizing! 💰