Socket
Socket
Sign inDemoInstall

visitdata

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    visitdata

Get traffic source data like Google Analytics


Version published
Weekly downloads
83
decreased by-29.06%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

visitData

visitData emulates the source, medium, campaign, content and term data just like Google Analytics does it (ga.js).

Since there is no way to extract this information from ga.js directly, you need a library like visitData to do it.

Questions / Contact

If you have any questions for this, drop me an email at ilkkapel@gmail.com

Include from cdn

Here's the file you can include in your web page directly from CDN: https://cdn.jsdelivr.net/npm/visitdata/dist/visitdata.umd.js

Install with npm

npm install visitdata

Build from source code

clone this repository and then

npm install
npm run build

the javascript you need is at dist/visitdata.js

Usage

<script src="https://cdn.jsdelivr.net/npm/visitdata/dist/visitdata.umd.js"></script>
<script>console.log(visitData.get());</script>

visitData.get() will return an object like

{
  "source": "google",
  "medium": "organic"
}

You can also run visitData.rawData() which will return a lot more information

FAQs

Last updated on 05 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc