Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-segment

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-segment

Native Wrapper around Segment's SDK

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
2
Weekly downloads
 
Created
Source

react-native-segment

Native Wrapper around Segment's SDK

This implementation automatically comes with Segment's Google Analytics client side integration.

Usage

var segment = require('react-native-segment');

var debug = true;
segment.setupWithConfiguration('YOUR WRITE KEY', debug);

segment.identify('myUserId', {firstName: 'name'});
segment.track('Purchased Item', {itemId: 123});
segment.screen('Viewed Login');
segment.alias('myNewUserId');
segment.reset();

Installation

npm install --save react-native-segment
cd node_modules/react-native-segment
pod install

Modifications to your React Native XCode Project

  • Drag and Drop /node_modules/react-native-segment/RNSegment/RNSegment.xcodeproj into the Libraries folder of your project in XCode (as described here)
  • Drag and Drop the RNSegment's libRNSegment.a from its Products folder into your project's target's "Linked Frameworks and Libraries" section (again, as described here)
  • Similarly, Drag and Drop /node_modules/react-native-segment/Pods/Pods.xcodeproj into the Libraries folder of your project
  • Drag and Drop the Pod's libAnalytics.a and libSegment-GoogleAnalytics.a into your project's target's "Linked Frameworks and Libraries" section
  • Drag and Drop /Libraries/Pods.xcodeproj/Pods/GoogleAnalytics/Frameworks/libGoogleAnalytics.a into the root of your project
  • Add the following path to your project's "Library Search Paths"
"$(SRCROOT)/../node_modules/react-native-segment/Pods/GoogleAnalytics/Libraries"
  • Add the following Linked Frameworks and Libraries to your project: "CoreData.framework", "CFNetwork.framework", "libsqlite3.tbd", "libz.tbd"

Keywords

FAQs

Package last updated on 28 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc