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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-hubspot-sdk

v1.0.4

Published

React Native bridge for HubSpot Live Chat SDK, providing easy integration for iOS and Android

Readme

React Native HubSpot SDK

React Native bridge for HubSpot Live Chat SDK, providing easy integration for iOS and Android platforms.

Features

  • 🚀 Easy integration with HubSpot Live Chat
  • 📱 Cross-platform support (iOS & Android)
  • 🔧 TypeScript support
  • 🎯 Simple API with Promise-based methods
  • 👤 User identification and chat properties
  • 🔐 Secure authentication with identity tokens

Installation

npm install react-native-hubspot-sdk
# or
yarn add react-native-hubspot-sdk

iOS Setup

  1. Add the following to your ios/Podfile:
pod 'react-native-hubspot-sdk', :path => '../node_modules/react-native-hubspot-sdk'
  1. Run pod install:
cd ios && pod install

Android Setup

  1. The package will be automatically linked with React Native 0.60+

  2. Make sure your android/build.gradle has the following configuration:

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://www.jitpack.io" }
    }
}

Usage

Basic Setup

import HubspotSdk from 'react-native-hubspot-sdk';

// Configure the SDK (call this once in your app)
await HubspotSdk.configure();

// Open chat with a specific tag
await HubspotSdk.openChat('your-chat-tag');

User Identification

// Identify user with identity token
await HubspotSdk.identify('user-identity-token', '[email protected]');

Setting Chat Properties

The setProperties method handles platform differences automatically:

// For iOS - use array format
const iosProps = [
  { name: 'user_type', value: 'premium' },
  { name: 'subscription_plan', value: 'pro' }
];

// For Android - use object format
const androidProps = {
  user_type: 'premium',
  subscription_plan: 'pro'
};

// The SDK handles platform differences automatically
await HubspotSdk.setProperties(iosProps); // Works on both platforms
await HubspotSdk.setProperties(androidProps); // Works on both platforms

Logout

// Logout current user
await HubspotSdk.logout();

API Reference

configure(): Promise<void>

Configures the HubSpot SDK. Call this method once when your app starts.

openChat(tag: string): Promise<void>

Opens the HubSpot chat interface with the specified chat flow tag.

Parameters:

  • tag (string): The chat flow tag configured in your HubSpot dashboard

identify(identityToken: string, email?: string): Promise<void>

Identifies the current user with HubSpot.

Parameters:

  • identityToken (string): User identity token from your authentication system
  • email (string, optional): User's email address

setProperties(props: ChatProperties): Promise<void>

Sets chat properties for the current conversation.

Parameters:

  • props (ChatProperties): Properties to set
    • iOS: Array of { name: string, value: string } objects
    • Android: Object with string key-value pairs
    • The SDK automatically handles platform differences

logout(): Promise<void>

Logs out the current user from HubSpot chat.

TypeScript Support

This package includes TypeScript definitions. Import types as needed:

import HubspotSdk, { ChatProperty, ChatProperties, HubspotSdkInterface } from 'react-native-hubspot-sdk';

const properties: ChatProperties = [
  { name: 'user_type', value: 'premium' }
];

await HubspotSdk.setProperties(properties);

Author

DevSon [email protected]

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.