JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q49072F
  • License MIT

Package Exports

  • @visitorquery/react
  • @visitorquery/react/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@visitorquery/react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@visitorquery/react

Use this package to prevent fraud and abuse by visitors hiding behind proxies and VPNs. With a simple call to useVisitorQuery your website or app will be making a request to our servers which will store a value indicating wether the current user is behind a proxy or VPN. To see the response, you will need to issue a GET request to our official API.

Our checks are not list based like other services who iterate over a database of known proxy IP addresses. We are using deep packet inspection to detect, in real time, such traffic which is why the api call must be originating from the client's device/browser. This tool will catch most if not all proxies, VPNs, and Tor traffic - including residential ones.

This plugin requires a valid api key (Public api key) and that you provision a session id to each visitor. To obtain one please visit our website at visitorquery.com and pick a suitable plan.

Example usage on our own website (nextjs), on the checkout page, before openning the payment dialog:

import {useVisitorQuery} from "@visitorquery/react";

export default function LayoutComponent() {
    // visitorquery should be loaded and your visitor assessed
    // to check the result, issue a GET request from your backend
    const visitorQuery = useVisitorQuery({
        // use your project's !!PUBLIC!! api key here
        ApiKey   : process.env.NEXT_PUBLIC_VISITOR_QUERY_API_KEY!,
        SessionId: "unique-session-id-to-later-identify-the-visitor",
    });
}

For more info and up to date documentation, please visit our official page.