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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-ethical-ad

v0.1.1

Published

The `EthicalAd` component is a React library for embedding ethical, privacy-respecting advertisements into your web applications. It integrates seamlessly with the [EthicalAds](https://ethicalads.io/) platform to display ads that respect user privacy and

Readme

EthicalAd Component

The EthicalAd component is a React library for embedding ethical, privacy-respecting advertisements into your web applications. It integrates seamlessly with the EthicalAds platform to display ads that respect user privacy and avoid tracking.

Features

  • Privacy-Respecting Ads: Displays ads without tracking or compromising user privacy.
  • Customizable: Supports various customization options such as ad type, keywords, styles, and more.
  • Lightweight: Automatically loads the EthicalAds client script only when needed.
  • React-Friendly: Built with React, making it easy to integrate into your React applications.

Installation

Install the package using npm or yarn:

npm install react-ethical-ad
# or
yarn add react-ethical-ad

Usage

Here's an example of how to use the EthicalAd component in your React application:

import React from 'react';
import { EthicalAd } from 'react-ethical-ad';

function App() {
  return (
    <div>
      <h1>Welcome to My App</h1>
      <EthicalAd
        publisher="your-publisher-id"
        type="image"
        keywords={['technology', 'privacy']}
        verbosity="normal"
      />
    </div>
  );
}

export default App;

Props

The EthicalAd component accepts the following props:

| Prop Name | Type | Required/Optional | Description | |---|---|---|---| | publisher | string | Required | The publisher ID for your EthicalAds account. | | type | 'image' or 'text' | Optional | Typeof the ad| | id | string | Optional | A unique ID for the ad container. | | style | React.CSSProperties | Optional | Custom styles for the ad container. | | keywords | string[] | Optional | Keywords to target specific ad categories. | | campaignTypes | Array of 'paid' 'publisher-house' 'community' | Optional | Can only limit not extend from what is allowed | | manual | boolean | Optional | Whether to manually control ad loading. | | verbosity | 'quiet' or 'normal' or 'verbose'| Optional | Specifies the verbosity of the logs | |forceAd | string | Optional | Force a specific ad to display. | | forcedCampaign | string | Optional | Force a specific campaign to display. | | placementBotton | boolean | Optional | Whether to place the ad at the bottom of the container. | | className | string` | Optional | Additional CSS class names for the ad container. |

Development

To build or develop the library locally:

  1. Clone the repository.
  2. Install dependencies:
npm install
  1. Start the development server:
num run dev
  1. Build the library
npm run build

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

Support

For questions or support, feel free to open an issue or contact the maintainers.

Acknowledgments

This library is powered by EthicalAds, a platform for ethical, privacy-respecting advertisements.