惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
D
Docker
J
Java Code Geeks
腾讯CDC
Blog — PlanetScale
Blog — PlanetScale
G
Google Developers Blog
M
MIT News - Artificial intelligence
L
LangChain Blog
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
博客园 - Franky
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
N
Netflix TechBlog - Medium
B
Blog RSS Feed
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Clean UTM links with Cyrillic transliteration (and a zero...
Николай Поляков · 2026-06-21 · via DEV Community

Николай Поляков

If you run ads in CIS markets, you have seen this in your analytics reports:

utm_campaign=%D0%90%D0%BA%D1%86%D0%B8%D1%8F

That is a Cyrillic UTM value (Акция) percent-encoded into garbage. It splits one campaign into unreadable duplicates and makes grouping impossible. I kept solving this — and a few other small marketing-math problems — over and over, so I extracted the logic into two tiny, zero-dependency packages.

1. utm-translit — clean UTM builder

npm: utm-translit · also on pub.dev as utm_translit for Dart/Flutter.

It does three things every UTM value needs: lowercase (analytics are case-sensitive, CPCcpc), transliterate Cyrillic (Акцияaktsiya), and strip unsafe characters while keeping dynamic placeholders like {keyword}.

const { buildUtm, preset } = require('utm-translit');

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

buildUtm('https://shop.ru/sale', { ...preset('yandex'), campaign: 'summer' });
// keeps {keyword} placeholders intact

There is a CLI too:

npx utm-translit example.com -s yandex -m cpc -c "Летняя Акция"

2. np-marketing-metrics — the formulas, once

npm: np-marketing-metrics. Pure functions for the metrics every marketing dashboard recomputes: ad performance, ROMI/ROAS, social engagement, and A/B incrementality with real statistical significance.

const { adMetrics, romi, incrementality } = require('np-marketing-metrics');

adMetrics({ impressions: 10000, clicks: 200, cost: 4000, conversions: 20 });
// { ctr: 2, cpc: 20, cpm: 400, cpa: 200, cr: 10 }

romi({ visits: 1000, conversions: 50, cost: 10000, revenue: 30000 });
// { romi: 200, roas: 3, cr: 5, drr: 33.33…, profit: 20000, cpa: 200 }

incrementality({ n1: 10000, c1: 600, n2: 10000, c2: 500, confidence: 95 });
// two-proportion z-test: p-value, confidence interval, verdict, iROAS

The incrementality function uses a proper two-proportion z-test (with normCDF/invNormCDF helpers exported), so you get a p-value and confidence interval, not just a lift number.

Why I built these

They are the open-source cores of the free marketing engineering tools I maintain — the web versions if you prefer a UI are the UTM generator and the ROMI calculator. Returning plain numbers (not formatted strings) keeps the libraries locale-agnostic.

Both are MIT, zero-dependency, and tested. Issues and PRs welcome.

Author: Nikolai Polyakov — performance marketing & analytics.