TehShrike / add-affiliate-querystring

Given a user-entered URL, add your own affiliate code to the querystring.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't throw errors on bad urls (just returns them without modification)

Will only apply changes on the domain/host you specify.

Usage

var createAdderFunction = require('./')
var addAffiliateCode = createAdderFunction('shoppingsite.com', 'code', 'my-money-making-code')

addAffiliateCode('http://shoppingsite.com/thing') // => 'http://shoppingsite.com/thing?code=my-money-making-code'

addAffiliateCode('http://google.com/thing') // => 'http://google.com/thing'

License

WTFPL

About

Given a user-entered URL, add your own affiliate code to the querystring.


Languages

Language:JavaScript 100.0%