utm_translit 1.0.0 copy "utm_translit: ^1.0.0" to clipboard
utm_translit: ^1.0.0 copied to clipboard

Build clean UTM-tagged URLs with automatic Cyrillic to Latin transliteration, value normalization and ready channel presets.

utm_translit #

Build clean UTM-tagged URLs with automatic Cyrillic → Latin transliteration, value normalization and ready channel presets. Zero runtime dependencies.

This is the Dart port of the free online UTM generator at nepolyakov.ru. Cyrillic values in UTM tags get percent-encoded into unreadable junk and split your analytics into duplicate channels — this fixes that.

Install #

dependencies:
  utm_translit: ^1.0.0

Usage #

import 'package:utm_translit/utm_translit.dart';

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

  // Channel preset with dynamic placeholders preserved:
  print(buildUtm('https://shop.ru/sale', {...preset('yandex'), 'campaign': 'summer'}));

  // Normalize a single value:
  print(cleanValue('Чёрная Пятница')); // chyornaya_pyatnitsa
}

Options #

buildUtm(url, params, translit: true, lowercase: true, decode: true);

Presets: yandex, google, vk, telegram, email.

License #

MIT © Nikolai Polyakov

0
likes
140
points
0
downloads

Documentation

API reference

Publisher

verified publishernepolyakov.ru

Weekly Downloads

Build clean UTM-tagged URLs with automatic Cyrillic to Latin transliteration, value normalization and ready channel presets.

Homepage
Repository (GitHub)

License

unknown (license)

More

Packages that depend on utm_translit