npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

utm-translit

v1.0.0

Published

Build clean UTM-tagged URLs with automatic Cyrillic transliteration and value normalization. Zero dependencies, works in Node.js and the browser.

Readme

utm-translit

Build clean UTM-tagged URLs with automatic Cyrillic → Latin transliteration and value normalization. Zero dependencies. Works in Node.js and the browser.

npm version license zero dependencies

Marketers who run ads in CIS markets hit the same problem: Cyrillic values in UTM tags get percent-encoded into unreadable junk (utm_campaign=%D0%90%D0%BA%D1%86%D0%B8%D1%8F), inflating reports with duplicate channels. utm-translit solves it the way the free online UTM generator at nepolyakov.ru does — transliterate, lowercase, strip unsafe characters, and assemble a clean link.

This package is the open-source core of that tool. Prefer a no-install UI? Use the live UTM generator.

Why

  • Clean analytics data. Летняя Акцияletnyaya_akciya, not %D0%9B....
  • No duplicate channels. Forces lowercase, because CPC and cpc are two different sources in Yandex.Metrica / GA4.
  • Safe by default. Spaces → _, unsafe chars removed, dynamic placeholders like {campaign_id} and {keyword} preserved.
  • Tiny. Zero dependencies, ~3 KB, runs anywhere URL exists.

Install

npm install utm-translit

Usage

const { buildUtm, cleanValue, preset } = require('utm-translit');
// ESM: import { buildUtm } from 'utm-translit';

buildUtm('example.com', {
  source: 'yandex',
  medium: 'cpc',
  campaign: 'Летняя Акция',
});
// → https://example.com/?utm_source=yandex&utm_medium=cpc&utm_campaign=letnyaya_aktsiya

// Presets for common channels
buildUtm('https://shop.ru/sale', { ...preset('yandex'), campaign: 'summer' });
// → https://shop.ru/sale?utm_source=yandex&utm_medium=cpc&utm_campaign=summer&utm_term={keyword}

// Just normalize a single value
cleanValue('Чёрная Пятница'); // → 'chyornaya_pyatnitsa'

Options

buildUtm(url, params, {
  translit: true,   // transliterate Cyrillic (default true)
  lowercase: true,  // force lowercase (default true)
  decode: true,     // human-readable output (default true)
});

Presets

yandex, google, vk, telegram, email — see PRESETS.

CLI

npx utm-translit example.com -s yandex -m cpc -c "Летняя Акция"
# → https://example.com/?utm_source=yandex&utm_medium=cpc&utm_campaign=letnyaya_aktsiya

npx utm-translit example.com --preset yandex --campaign summer_sale

Run npx utm-translit --help for all flags.

Browser

<script type="module">
  import { buildUtm } from 'https://unpkg.com/utm-translit/src/index.mjs';
  console.log(buildUtm('example.com', { source: 'telegram', medium: 'social' }));
</script>

API

| Function | Description | | --- | --- | | buildUtm(url, params?, options?) | Assemble a UTM-tagged URL. Preserves existing query params, adds https:// if missing, skips empty values. | | cleanValue(str, options?) | Normalize one value: lowercase → transliterate → strip unsafe chars. | | preset(name) | Get a mutable copy of a channel preset. |

Transliteration standard

The mapping follows the same marketing-oriented standard used by the UTM link standard guide (ё → yo, ж → zh, х → kh, ц → ts, щ → sch, …). Soft/hard signs are dropped.

Related

License

MIT © Nikolai Polyakov