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 🙏

© 2026 – Pkg Stats / Ryan Hefner

native-advanced-ad

v0.1.7

Published

Capacitor plugin to show AdMob Native Advanced Ads (Android + iOS) with a React wrapper.

Readme

native-advanced-ad

Capacitor plugin native-advanced-ad — a skeleton plugin that displays AdMob Native Advanced Ads on Android and iOS, with a React wrapper component for Ionic apps.

Status: ready-to-publish skeleton. You must add Google Mobile Ads SDK and finish native configuration (permissions, Pod install, AdMob app id, ATT/GDPR consent) before production.


What is included

  • android/ - Kotlin plugin code + layout XML sample.
  • ios/ - Swift plugin code sample.
  • src/ - TypeScript plugin wrapper and web fallback.
  • dist/ - prebuilt JS + type definitions so this package is publishable immediately.
  • example-react/NativeAd.tsx - React wrapper component that calls the plugin.

Installation

During development you can copy this plugin into your monorepo or publish to npm.

Local install (recommended for testing)

  1. From your capacitor project root:
# copy plugin folder to your app (or use npm pack)
# e.g., from plugin folder:
npm pack /path/to/native-advanced-ad
# then in your app:
npm install /path/to/native-advanced-ad-0.1.0.tgz
npx cap sync

Publish to npm

  1. Make sure package.json has a unique name and updated version.
  2. Login npm login.
  3. npm publish --access public (if scoped package use --access public).

Usage (Ionic React)

import React from 'react';
import { NativeAd } from './components/NativeAd'; // or from 'native-advanced-ad' if published

export function Home() {
  return (
    <>
      <h1>Home</h1>
      <NativeAd adUnitId="ca-app-pub-3940256099942544/2247696110" />
    </>
  );
}

The <NativeAd/> component simply calls the native plugin; the native view is rendered as an overlay by the plugin (not inside the WebView).


Native setup (required)

Android

  1. Add Google Mobile Ads dependency to your app android/app/build.gradle:
implementation 'com.google.android.gms:play-services-ads:22.6.0' // use the latest stable version
  1. Add AdMob App ID in AndroidManifest.xml:
<meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="ca-app-pub-xxxxxxxx~yyyyyyyy" />
  1. Ensure INTERNET permission:
<uses-permission android:name="android.permission.INTERNET"/>
  1. npx cap sync android then open Android Studio and build.

iOS

  1. In ios/Podfile add:
pod 'Google-Mobile-Ads-SDK'
  1. cd ios && pod install
  2. Configure App Tracking Transparency (ATT) if targeting iOS 14+ and using IDFA.
  3. npx cap sync ios and open Xcode to build.

Notes & next steps

  • This package includes a prebuilt dist/ so you can npm install and use immediately.
  • The plugin code is a starting point — you should:
    • Improve error handling and logging for onAdFailedToLoad.
    • Implement ad caching/preloading if desired.
    • Provide configuration options (styling, height, margins).
    • Securely handle user consent (GDPR/CCPA/ATT).
  • The plugin shows a single overlay ad. If you need multiple ad instances or a recyclable pool, extend the native code to manage multiple views.

API

show(options)

  • adUnitId (string) — required — AdMob native ad unit id.
  • position ('top'|'bottom'|'floating') — optional — where to put overlay.
  • top (number) — optional — top offset in px (for floating).

hide()

  • Hides and destroys the active native ad view.

License

MIT