utmify

1.0.1 • Public • Published

utmify Build Status

Generate a UTM parameter object from individual properties (e.g. campaign)

Install

$ npm install --save utmify

Usage

var utmify = require('utmify')
 
utmify({campaign: 'foo', content: 'bar'})
//=> {utm_campaign: foo, utm_content: 'bar'}

API

utmify(params) -> object

params

Required
Type: object

A list of UTM parameters. Allowed keys are:

  • campaign
  • source
  • medium
  • content
  • term

These keys will be prefixed with utm_. Any other keys will be stripped from the output. Falsy values will also be stripped.

License

MIT © Ben Drucker

Readme

Keywords

Package Sidebar

Install

npm i utmify

Weekly Downloads

7

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bendrucker