A
A
Alexander Lebedev2014-06-11 12:31:14
htaccess
Alexander Lebedev, 2014-06-11 12:31:14

How to hide utm tags with .htacess?

Situation: contextual advertising with links that include a lot of utm-tags; format - site.ru?utm_source=xxx&utm_medium=xxx#ankorname etc.
Problem: when switching from advertising, the user sees a long, ugly link; I also need it to see only the link of the page itself.
Thoughts: purely theoretically, you can redirect from any link with ?utm to a link without ?utm (kill everything after ?), but at the end of the link, anchors #xxx periodically come across , and you don’t want to erase them + I don’t know if it can Whether Yandex.Metrica recognizes UTM links if they are immediately redirected.
Question: how to redirect from utm links to a link without utm while preserving anchors#xxx at the end of the link, and so that the metric has time to recognize utm before the redirect?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question