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

react-growsumojs

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-growsumojs

Small component to implement GrowSumoJS into your react application

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
158
increased by116.44%
Maintainers
1
Weekly downloads
 
Created
Source

react-growsumojs

Small component to implement GrowSumoJS into your react application

GrowSumoJS is javascript snippet that reads browser cookies and sends signup information back to your GrowSumo account.

Installation

npm i react-growsumojs

or

yarn add react-growsumojs

Use/Example

Initialize the growsumojs into the page you gonna use it, passing your appkey.

import React, { Component } from 'react';
import GrowSumo from 'react-growsumojs';
import logo from './logo.svg';
import './App.css';

class App extends Component {
	componentDidMount() {
		GrowSumo.initialize(your_growsumo_appkey);
	}

	render() {
		return (
			<div className="App">
				<header className="App-header">
					<img src={logo} className="App-logo" alt="logo" />
					<h1 className="App-title">Welcome to React</h1>
				</header>
				<p className="App-intro">
					To get started, edit <code>src/App.js</code> and save to reload.
				</p>
			</div>
		);
	}
}

export default App;

react-growsumojs exposes other 2 methods

setUserInfo: Used to set the user data, this method expect 1 object with 3 properties.

1 - name: Customer Name

2 - email: Customer Email

3 - customerKey: Is a unique string that identifies each customer you send to growsumo.

const customerData = {
    name: 'Joe',
    email: 'joe@duhan.com',
    customerKey: '123'
};

GrowSumo.setUserInfo(customerData);

createSignup: Used to call the growsumojs createSignup. This method accepts a callback function which will be executed when the request is completed.

GrowSumo.createSignup();

or

GrowSumo.createSignup(() => {
  console.log('create signup was called successfully')
});

GrowSumoJS - Docs

https://docs.partnerstack.com/docs/growsumojs

Keywords

FAQs

Package last updated on 13 Mar 2023

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