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

gomarketme-react-native

v6.0.1

Published

Affiliate Marketing for React Native and Expo iOS and Android apps.

Readme

npm package License: MIT

GoMarketMe is an affiliate marketing platform for mobile apps, with affiliate attribution, referral codes, and purchase reporting for iOS and Android.

Installation

npm

npm install [email protected]

Yarn

yarn add [email protected]

pnpm

pnpm add [email protected]

Usage

GoMarketMe takes only a few lines to set up.

Step 1: Initialize

Import gomarketme-react-native and initialize the SDK with your GoMarketMe API key:

import { useEffect } from 'react';
import GoMarketMe from 'gomarketme-react-native';

useEffect(() => {
  void GoMarketMe.initialize('API_KEY');
}, []);

Replace API_KEY with your actual GoMarketMe API key. You can find it during onboarding or in Profile > API Key.

Step 2: Sync Purchases (optional but recommended)

GoMarketMe automatically detects and reports purchases. We also recommend manually syncing after react-native-iap, expo-iap, RevenueCat, Adapty, or another provider confirms a successful purchase. Call it before finishing the transaction if your purchase library controls that step:

await GoMarketMe.syncAllTransactions();

Step 3: Include iOS Consumable History (optional)

If your iOS app sells consumable in-app purchases, add this key to your app's Info.plist:

<key>SKIncludeConsumableInAppPurchaseHistory</key>
<true/>

That's it! GoMarketMe will automatically attribute and report affiliate sales in real time to your dashboard and your affiliates' dashboards.

Optional features

Step 4: Referral Codes

Referral codes work alongside affiliate links when a link isn't practical, such as in conversations, podcasts, videos, events, or print.

GoMarketMe UI: Add the remotely configured referral-code trigger to your component tree:

import { GoMarketMeReferralCodeTrigger } from 'gomarketme-react-native';

<GoMarketMeReferralCodeTrigger />

Enable and customize its text, colors, typography, and layout in GoMarketMe Referral Code settings.

Custom UI: If your app provides its own code-entry interface, redeem the code after initialization:

const data = await GoMarketMe.redeemReferralCode('ASHLEY10');

Redemption throws GoMarketMeReferralCodeError. Use code for messages or UI behavior; the enum distinguishes invalid, expired, inactive, malformed-response, request, network, timeout, initialization, and unknown errors. rawCode, statusCode, and isRetryable are available for logging and retry decisions.

import {
  GoMarketMeReferralCodeError,
  GoMarketMeReferralCodeErrorCode,
} from 'gomarketme-react-native';

try {
  await GoMarketMe.redeemReferralCode(code);
} catch (error) {
  if (error instanceof GoMarketMeReferralCodeError &&
      error.code === GoMarketMeReferralCodeErrorCode.InvalidCode) {
    showError('That referral code is not valid.');
  }
}

Placement: Put the referral-code entry point on the first screen users see after installing the app, ideally during onboarding or immediately afterward.

Learn more about Referral Codes.

Step 5: Programmatic Affiliate Marketing

Programmatic Affiliate Marketing lets your app personalize the user experience based on the affiliate and campaign that referred the user. For example, you can customize onboarding, paywalls, offers, or in-app content.

When attribution exists—after initialization detects an affiliate link or after a referral code is successfully redeemed, either programmatically or through GoMarketMe's UI—GoMarketMe.affiliateMarketingData is populated.

If your app needs the attribution data immediately after initialization, await it first:

await GoMarketMe.initialize('API_KEY');

const data = GoMarketMe.affiliateMarketingData;

The returned data includes:

{
  "campaign": {
    "id": "campaign-id",
    "name": "Creator campaign",
    "status": "active",
    "type": "affiliate",
    "publicLinkUrl": null, // null unless this is a public campaign
    "metadata": {
      // Optional campaign-level properties configured in GoMarketMe
    }
  },
  "affiliate": {
    "id": "affiliate-id",
    "firstName": "Ashley",
    "lastName": "Creator",
    "countryCode": "US",
    "instagramAccount": "",
    "tiktokAccount": "",
    "xAccount": ""
  },
  "affiliateCampaign": {
    "metadata": {
      // Optional affiliate-level properties for this campaign configured in GoMarketMe
    }
  },
  "saleDistribution": {
    "platformPercentage": "10",
    "affiliatePercentage": "20"
  },
  "affiliateCampaignCode": "affiliate-campaign-code",
  "deviceId": "device-id",
  "offerCode": null, // null unless this is an offer-code campaign
  "referralCode": "ASHLEY10" // null unless attribution used a referral code
}
  • campaign.metadata is configured under Campaign detail > Advanced > Campaign-level metadata.
  • affiliateCampaign.metadata is configured under Campaign detail > Affiliates > Invite or edit affiliate > Advanced > Affiliate-level metadata for this campaign.

Every property shown above is present when attribution exists. Optional values are undefined when they do not apply. The configurable metadata objects are always present and are empty when no metadata is configured; GoMarketMe returns their free-form contents without interpreting them. If no attribution exists, affiliateMarketingData is null or undefined.

Learn more about Programmatic Affiliate Marketing.

Platform requirements

| Platform | Support | Notes | |---|---:|---| | iOS | ✅ | StoreKit 2, requires iOS 15+ | | Android | ✅ | Requires Android API 23+ | | Expo Go | ❌ | Native modules are not supported | | Expo development build | ✅ | Full support | | Bare React Native | ✅ | Full support |

IAP provider compatibility

| Provider | Support | Notes | |---|---:|---| | react-native-iap | ✅ | Full support | | expo-iap | ✅ | Full support | | RevenueCat | ✅ | Supports Apple and Google IAPs | | Adapty | ✅ | Supports Apple and Google IAPs |

GoMarketMe works alongside react-native-iap, expo-iap, RevenueCat, Adapty, and other IAP providers.

Resources

Support

For integration support, contact [email protected] or visit https://gomarketme.co.