Socket
Socket
Sign inDemoInstall

@segment/utm-params

Package Overview
Dependencies
6
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @segment/utm-params

Parse a URL, returning all UTM parameters.


Version published
Weekly downloads
41K
decreased by-29.83%
Maintainers
1
Install size
317 kB
Created
Weekly downloads
 

Readme

Source

utm-params

CircleCI Codecov

Parse a URL, returning all UTM parameters.

Installation

$ npm install @segment/utm-params

API

utm(querystring : string)

utm('?utm_source=google&utm_medium=medium&utm_term=keyword&utm_content=some%20content&utm_campaign=some%20campaign&utm_test=other%20value');
{
  "source": "google",
  "medium": "medium",
  "term": "keyword",
  "content": "some content",
  "name": "some campaign",
  "test": "other value"
}

###utm.strict(querystring : string)

Will only return the 5 Google Analytics spec'd utm params

utm.strict('?utm_source=google&utm_medium=medium&utm_term=keyword&utm_content=some%20content&utm_campaign=some%20campaign&utm_test=other%20value');
{
  "source": "google",
  "medium": "medium",
  "term": "keyword",
  "content": "some content",
  "name": "some campaign"
}

Keywords

FAQs

Last updated on 17 Jun 2016

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