Z
Z
ZolanPro2014-10-20 15:37:25
htaccess
ZolanPro, 2014-10-20 15:37:25

Wordpress strips UTM tags. How to fix?

When following a link with UTM tags, they are cut off.
For example with:
dome.zone/?utm_source=1&utm_medium=2&utm_campaign=3
Redirects to
dome.zone
htaccess:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2014-10-22
@HeadOnFire

It is quite possible that a redirect (301/302) occurs, so the tags are lost. You can check it in Firebug / Chrome Dev Tools. In RewriteRule, something like this [NC,QSA,R=301,L] should help (I haven't worked with Apache for a long time, so I need to try).
The url setting can also affect - the use of a slash at the end. If the links generated by WP do not have a slash, then a redirect will occur to the same address, only with a slash at the end. This is where parameter loss comes in. Useful info here and here .
And there is another caveat - WordPress doesn't really like any _GET parameters other than those registered with add_query_var(). But I do not think that this is the problem - he should not cut them off.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question