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

@go2ge/sdk

v1.2.7

Published

Official TypeScript/Node.js SDK for the Go2 gRPC API

Readme

Go2 SDK for Node.js/TypeScript

npm version Node.js 16+

Official TypeScript/Node.js SDK for the Go2 gRPC API - Smart App Links Platform.

Installation

npm install @go2ge/sdk
# or
yarn add @go2ge/sdk
# or
pnpm add @go2ge/sdk

Quick Start

import { Go2Client } from '@go2ge/sdk';

const client = new Go2Client({ apiKey: 'go2_your_api_key' });

try {
  // Create a smart link
  const link = await client.links.create({
    slug: 'myapp',
    title: 'My Awesome App',
    iosUrl: 'https://apps.apple.com/app/id123456',
    androidUrl: 'https://play.google.com/store/apps/details?id=com.myapp',
    webUrl: 'https://myapp.com',
  });
  console.log(`Created: https://go2.ge/${link.slug}`);

  // Get analytics
  const stats = await client.analytics.getStats(link.id, '7d');
  console.log(`Total clicks: ${stats.totalClicks}`);
} finally {
  client.close();
}

Available Services

Links

Create and manage smart links that redirect users to the right app store.

// List all links
const { links, total } = await client.links.list({ page: 1, perPage: 20 });

// Create a link
const link = await client.links.create({
  slug: 'myapp',
  title: 'My App',
  iosUrl: 'https://apps.apple.com/...',
  androidUrl: 'https://play.google.com/...',
  webUrl: 'https://myapp.com',
  fallbackUrl: 'https://myapp.com/download',
});

// Get a link
const link = await client.links.get('link-id');

// Update a link
const updated = await client.links.update('link-id', {
  title: 'New Title',
  isActive: false,
});

// Delete a link
await client.links.delete('link-id');

Analytics

Access detailed click analytics for your links.

// Get overview stats
const stats = await client.analytics.getStats('link-id', '30d');

// Get timeseries data
const timeseries = await client.analytics.getTimeseries('link-id', '7d');

// Get platform breakdown
const platforms = await client.analytics.getPlatforms('link-id', '30d');

// Get country breakdown
const countries = await client.analytics.getCountries('link-id', '30d', 10);

// Get referrer breakdown
const referrers = await client.analytics.getReferrers('link-id', '30d', 10);

Domains

Add and manage custom domains.

// List domains
const domains = await client.domains.list();

// Add a domain
const domain = await client.domains.create('links.myapp.com');

// Verify a domain
const verified = await client.domains.verify('domain-id');

// Delete a domain
await client.domains.delete('domain-id');

QR Codes

Generate customizable QR codes for your links.

const qr = await client.qr.generate({
  linkId: 'link-id',
  size: 512,
  format: 'png',
  foregroundColor: '#000000',
  backgroundColor: '#FFFFFF',
});
console.log(`QR Code URL: ${qr.url}`);

Integrations

Connect with third-party services (Slack, Discord, Telegram, etc.).

import { IntegrationType } from '@go2ge/sdk';

// List integrations
const integrations = await client.integrations.list();

// Create an integration
const integration = await client.integrations.create({
  type: IntegrationType.SLACK,
  name: 'Marketing Alerts',
  config: { webhookUrl: 'https://hooks.slack.com/...' },
  events: ['click_alert', 'click_milestone'],
});

// Test an integration
const result = await client.integrations.test('integration-id');

// Delete an integration
await client.integrations.delete('integration-id');

Campaigns

Create SMS/Email marketing campaigns with bulk trackable links.

// Create a campaign
const campaign = await client.campaigns.create({
  name: 'Summer Sale 2024',
  baseLinkId: 'link-id',
  type: 'sms',
  utmSource: 'sms',
  utmCampaign: 'summer_sale',
});

// Generate unique links for recipients
const result = await client.campaigns.generateLinks(campaign.id, [
  { identifier: '+1234567890', metadata: { name: 'John' } },
  { identifier: '+0987654321', metadata: { name: 'Jane' } },
]);

// Get campaign stats
const stats = await client.campaigns.getStats(campaign.id);
console.log(`Click rate: ${stats.clickRate}%`);

// Export links
const exportData = await client.campaigns.exportLinks(campaign.id, 'csv');

Error Handling

import {
  Go2Client,
  Go2Error,
  NotFoundError,
  AuthenticationError,
  ValidationError,
  RateLimitError,
} from '@go2ge/sdk';

try {
  const link = await client.links.get('invalid-id');
} catch (error) {
  if (error instanceof NotFoundError) {
    console.log('Link not found');
  } else if (error instanceof AuthenticationError) {
    console.log('Invalid API key');
  } else if (error instanceof ValidationError) {
    console.log(`Validation error: ${error.message}`);
  } else if (error instanceof RateLimitError) {
    console.log('Rate limit exceeded, try again later');
  } else if (error instanceof Go2Error) {
    console.log(`API error: ${error.message}`);
  }
}

Configuration

// Production (default)
const client = new Go2Client({ apiKey: 'go2_xxx' });

// Custom endpoint (for development)
const client = new Go2Client({
  apiKey: 'go2_xxx',
  endpoint: 'localhost:9090',
  insecure: true, // Disable TLS for local dev
});

TypeScript Support

This SDK is written in TypeScript and provides full type definitions.

import type {
  Link,
  LinkStats,
  Campaign,
  Integration,
  Domain,
  QRCode,
} from '@go2ge/sdk';

Documentation

Full API documentation: https://app.go2.ge/docs#sdks

Requirements

  • Node.js 16+
  • TypeScript 4.5+ (for TypeScript users)

License

MIT