@cux/referrer

<p align="center"> <img src="https://static.cux.io/logo.svg" width="200" alt="Cux.io" /> </p>

Usage no npm install needed!

<script type="module">
  import cuxReferrer from 'https://cdn.skypack.dev/@cux/referrer';
</script>

README

Cux.io


Micro library for parsing a referrer by type

Installation

yarn add @cux/referrer

Usage

import { getReferrer } from '@cux/referrer';

getReferrer('https://google.com/');

You should receive the following object:

{
  type: ReferrerType;
  name: ReferrerName | string;
}

Types of referrers

  • Paid Traffic (Google, Facebook, Bing. Yahoo campaigns)
  • Search (Google, Bing, Yahoo, Baidu, Yandex)
  • Social (Facebook, Twitter, Instagram, Youtube, Linkedin)
  • Organic (direct link)
  • Other