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

@personaxyz/ad-sdk-programmatic

v0.0.4

Published

Persona Ad SDK Programmatic is a JavaScript-based software development kit that enables web app developers to display digital advertisements on their web apps. This SDK provides seamless integration with vanilla JavaScript.

Downloads

8

Readme

Persona Ad SDK Programmatic

Persona Ad SDK Programmatic is a JavaScript-based software development kit that enables web app developers to display digital advertisements on their web apps. This SDK provides seamless integration with vanilla JavaScript.

Integration

The SDK can be integrated in the following way:

  1. Integrating through <script> tags using cdn

1. Integration via script tag

To load the Persona Ad SDK in your app and initialize an ad client, insert the following scripts in the <head> section of your app / page.

<script src="https://cdn.jsdelivr.net/npm/@personaxyz/[email protected]" crossorigin="anonymous"></script>
<script type="text/javascript">
    var personaConfig = {
        apiKey: "XXXX_api_key_staging_XXXX", // An actual API key is generated once you register an app with us.
        environment: "production",
    }
    var sdk = new PersonaAdSDK.PersonaAdSDK(personaConfig);
    var adClient = sdk.getClient()
</script>

Now to render a banner ad, an ad slot needs to be present in the app where the ad will render. For instance, to render a banner ad with 300x250 dimensions , add the following snippet inside the <body> tag of your app.

<div id="my-banner-ad"></div> // The ad will render here
<script>
    adClient.setUserEmail('[email protected]') // If available in your app
    adClient.setWalletAddress("1Lbcfr7sAHT...."); // If available in your app
    adClient.showBannerAd({
        adUnitId: "cf20c750-2fe4-4761-861f-b73b2247fd4d", // An ad unit id is provided by Persona for production environment
        containerId: "my-banner-ad", // HTML element's id where the ad needs to render on the app
        adConfig: {
          dimensions: "300x250",
        },
    })
</script>

Similarly, more banner ads can be rendered using the above snippet with correct adUnitIds and containerId. One such implementation for an ad with 970x90 dimensions is as follows

<div id="my-banner-ad-2"></div> // The ad will render here
<script>
    adClient.setUserEmail('[email protected]') // If available in your app
    adClient.setWalletAddress("1Lbcfr7sAHT...."); // If available in your app
    adClient.showBannerAd({
        adUnitId: "3a094192-4c7b-4761-a50c-bd9b6a67e987", // An ad unit id is provided by Persona for production environment
        containerId: "my-banner-ad-2", // HTML element's id where the ad needs to render on the app
        adConfig: {
          dimensions: "970x90",
        },
    })
</script>

NOTE : Please ensure that the showBannerAd method is called after the HTML element being referred to in the method is rendered on the app.

For the production environment, an app needs to be registered with us which generates different api keys and ad unit ids.

Additional Features

Supported banner Ad Formats

  1. 300x250
  2. 970x90

NOTE: An ad's dimensions can be configured while creating an ad unit