Socket
Book a DemoInstallSign in
Socket

@ventrane/react-va

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ventrane/react-va

React Ventrane Analytics

1.0.9
latest
Source
npmnpm
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

react-va

React Ventrane Analytics Module

npm version npm downloads

This is a JavaScript module that can be used to include Ventrane Analytics tracking code in a website or app that uses React for its front-end codebase.

If you use react-va too, we'd love your feedback. Feel free to file issues, ideas and pull requests against this repo.

Installation

With npm:

npm i @ventrane/react-va

Usage

  • Initializing VA:

Pass the initialize method where it will be accessible to all your pages. For example: App.js

import { initialize } from '@ventrane/react-va';

initialize('Va-905cb');
  • Track Page Views
import { pageView } from '@ventrane/react-va';
const pagePath = window.location.pathname + window.location.search;
const accessId = get accessId from your Project Ventrane Analytics Dashboard;
const APIKey = get APIKey from your Project Ventrane Analytics Dashboard;

pageView(pagePath, accessId, APIKey);
  • Track clicks
import { click } from '@ventrane/react-va';
const accessId = get accessId from your Project Ventrane Analytics Dashboard;
const APIKey = get APIKey from your Project Ventrane Analytics Dashboard;

click(buttonName, accessId, APIKey);

API

initialize(platformName)

VA must be initialized using this function before any of the other tracking functions will record any data. The platform Name can be seen under Configuration Keys in your Project's Ventrane Analytics Dashboard.

Development

Submitting changes/fixes

Follow instructions inside CONTRIBUTING.md

Keywords

react

FAQs

Package last updated on 25 May 2021

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.