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

getit-sdk

v1.0.13

Published

Getit sdk plugin. Used to provide an ad for your dapp.

Downloads

1,218

Readme

Getit ad plugin

Installation

To get started with the getit ad plugin you need to download it from npm or yarn.

npm install getit-sdk
yarn add getit-sdk

Usage

Once the package is in your project, simply import it from your folder

import { GetitAdPlugin } from "getit-sdk";

Then insert the Getit plugin whereever you see fit. Note that, for maximum compatibility, we now use 728x90 banners for desktop and 270x90 for mobile screens.

<GetitAdPlugin
    apiKey="xxx_xxx_xxx"
    walletConnected={address ? address : ""}
    isMobile={false | true}
    slotId="number as string"
/>

These 4 params are required:

  1. apiKey - will be given to you by the Getit team, it should be stored in privately.
  2. walletConnected - here you should pass the connected wallet's address in the Ethereum format. Or nothing if the wallet is not connected.
  3. isMobile - this is optional param. If set to true, the ad request will always return a banner of the mobile format, regardless of the actual user's device type. Can be useful if the mobile banner formats fit your desktop UI better.
  4. slotId - the enumerator for the banner. If you are using multiple banners the number should be incremented by +1 for each next banner.

That's it. Once the plugin is installed, and you are activated within our system, you will start receiving ads to display to each user visiting your site.

Important! If something went wrong while getting ad, ad container height automatically will be set to 0, so be aware of this.

Clicks tracking

To track clicks on ad banners, we are using POST request and generating a redirect URL:

const urlToRedirect = redirect +
    "?utm_campaign=" +
    campaign_name +
    "&" +
    "utm_content=" +
    bannerName +
    "&" +
    "utm_source=" +
    "getit",
  1. redirect - this is the URL of the advertiser's website
  2. campaign_name - this is the name of the ad campaign the clicked banner belongs to
  3. utm_content - name of the banner a user clicked
  4. utm_source - Getit as the ad network which the ad is associated with

This allows our advertisers to measure the performance of their campaigns with us better and with more details.