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

cordova-plugin-google-ump

v1.0.0

Published

ionic wrapper for google ump sdk

Readme

cordova-plugin-google-ump

This plugin is an Ionic Cordova wrapper for the Google UMP SDK. Google UMP (User Messaging Platform) SDK is used for asking users in the European Economic Area (EEA) for permission to display personalized ads or

News

Version 1.0.0 / 2020-09-11: Initial plugin release.

Installation

ionic cordova plugin add cordova-plugin-google-ump

Ionic Include

Include the plugin in your app.module.ts

...

import {Consent} from '../../plugins/cordova-plugin-google-ump/www/consent-typescript-wrapper';

...

@NgModule({
  ...

  providers: [
    ...
    Ump
    ...
  ]
  ...
})
export class AppModule { }
})

Funding Choices Settings

In order to use Google UMP SDK, you need to link your Admob account to Funding Choices (https://fundingchoices.google.com) and create EU Consent & IDFA messages for your app

Supported Platforms

  • Android (Coming soon)
  • iOS

Methods

  • ump.verifyConsent
  • ump.forceForm

consent.verifyConsent

Should be called on every app start. Checks and returns a consent status. If the user has not made any consent decision yet, it will display the appropriate consent form for EEA users. For IOS 14+ users will be asked for the AppTrackingTransparency permission after.

Params

verifyConsent(isAgeConsent :boolean, isDebug :boolean) :Promise<ConsentResult>
  • isAgeConsent: If set to true, on the dialog is shown an option to the user, where he can choose to buy an ad-free pro version.
  • isDebug: If set to true, the device acts like it is in the EEA, even if it is not.

Result

interface ConsentResult {
	consent: boolean; // true if given consent / false other
 dialog
	hasShownDialog: boolean; // if false, user already made a decision earlier and there was no need to show the dialog
}

Example (Ionic)

this.ump.verifyConsent(true, false)
			.then((result) => {
				console.log(result);
			})
			.catch((error) => {
				console.log(error);
			});

Example (Cordova)

window['Ump'].verifyConsent(isAgeConsent, isDebug,
				function(result) {/* do something with the result */},
				function(error) {/* handle the error case */}
			);

consent.forceForm

Method to change the made decision later. This option should be offered to the user in the settings, that he can change his decision at any time. This method has no check if a user is really in the EEA or not, the dialog is shown to every user. Use method verifyConsent on load to see if the user needs to see a form or not

Params

forceForm() :Promise<ConsentResult>

Result

interface ConsentResult {
    consent: boolean; // true if given consent / false other
 dialog
    hasShownDialog: boolean; // in this case always true
}

Example (Ionic)

this.ump.forceForm()
			.then((result) => {
				console.log(result);
			})
			.catch((error) => {
				console.log(error);
			});

Example (Cordova)

window['Ump'].then(
				function(result) {/* do something with the result */},
				function(error) {/* handle the error case */}
			);

iOS specific issues

When installing the plugin on iOS it will download the Google UMP SDK and install it as a CocoaPod. It will also create a yourprojectname.xcworkspace file. To build your project for iOS you will need to open the .xcworkspace file in XCode and build it there, the command line build does not work correctly with workspaces instead of projects.