New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

visitdatajs

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

visitdatajs

Get traffic source data like Google Analytics

  • 1.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

VisitDataJS

visitdata.js 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.js 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

Package last updated on 05 Mar 2024

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