New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-contlo

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-contlo

SDK for capturing shop events for your app, built using React Native.

  • 1.3.0-beta.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

React Native Contlo

SDK Installation

Install Contlo's React Native plugin using the npm package manager.

$ cd path_to_your_project

Add the contlo plugin from npm

$ npm install react-native-contlo

Please note: if you're using Expo for development, be sure to be using the "bare workflow".

ContloAPI Usage

import { ContloAPI } from 'react-native-contlo'

// Init ContloAPI with your Stores public API key
// call this function in your index.js file
ContloAPI.init({apiKey: '<YOUR_API_KEY>'})

// Set email, phone one of the fields is mandatory for sending a request
ContloAPI.set.userEmail('john@example.com')
ContloAPI.set.userPhone('+912223334444')

// Set methods (optional)
ContloAPI.set.userFirstName('John')
ContloAPI.set.userLastName('Doe')
ContloAPI.set.userCity('bangalore')
ContloAPI.set.userProvince('')
ContloAPI.set.userZip('560010')
ContloAPI.set.userCountry('india')

// Get methods 
ContloAPI.get.userEmail()
ContloAPI.get.userPhone()
ContloAPI.get.userFirstName()
ContloAPI.get.userLastName()
ContloAPI.get.userCity()
ContloAPI.get.userProvince()
ContloAPI.get.userZip()
ContloAPI.get.userCountry()

// Events Template
// Template for sending any custom/user Events to contlo (events)
// {
//   "event": "<event_key>",
//   "email": "john@example.com",
//   "phone_number": "+912223334444",
//   "properties": {
//     "key1": "<key1>",
//     "key2": <key2>,
//   }
// }

// Template Profile Identification (create/set customer profile)
// {
//   "custom_properties": {
//     "property1": "<value1>",
//     "property2": "<value2>",
//   },
//   "first_name": "John",
//   "last_name": "Doe",
//   "email": "john@example.com",
//   "phone_number": "+12223334444",
//   "country": "india",
//   "zip": "560010",
//   "city": "bangalore"
// }

// If you don't want to send customProperties just pass in an empty object {}

// Send methods (async methods) - return type promise
ContloAPI.send.event({event: event, properties: properties})
ContloAPI.send.profile({customProperties: customProperties})

Keywords

FAQs

Package last updated on 29 Nov 2022

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