2012-11-05 3 views
0

www.domain.com/sample-post/처럼 워드 프레스에서 퍼머 링크 구조를 사용하고 있지만, 자연스럽게 모든 매개 변수를 차단합니다.Wordpress에 Google의 utm_source 변수를 추가하는 방법은 무엇입니까?

나는 실제로 일부 소스를 추적하기 위해 일부 링크에 Googles ?utm_source= 변수를 추가하려고하지만 Wordpress는이를 차단하고 내 로그에 /none 출력과 함께 404 오류가 발생합니다.

어떻게 해결할 수 있습니까?

+0

가 어떻게이 당신의 영구 링크 구조 WP-관리자에서 정의한 않는 동일한 URL을보고 계속 따라

지금 당신은이 http://mysite.net/index.html#utm_source=Source&utm_medium=email&utm_campaign=Name

같은 utm_source를 매개 변수를 태그 할 수 있습니까? '.htaccess' 재 작성을 게시 할 수 있습니까? – doublesharp

답변

0
# Block the include-only files. 
RewriteEngine On 
RewriteBase/
# RewriteRule ^wp-admin/includes/ - [F,L] 
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] 
RewriteRule ^wp-includes/theme-compat/ - [F,L] 

# Preventing Directory Listing, Leads to Block and 403 and 401 
Options -Indexes 

# BEGIN WordPress 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 

# uploaded files 
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] 

# add a trailing slash to /wp-admin 
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] 

RewriteCond %{REQUEST_FILENAME} -f [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule^- [L] 
RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L] 
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L] 
RewriteRule . index.php [L] 
# END WordPress 

하이 ,

내가 퍼머 구조

1

대신 사용하는 등 domain.com/sample-post/ 사용하고? #를 사용하여 utm_source 값을 전달하도록 선택할 수 있습니다.

이렇게하려면이 추적 코드를 _trackPageview 위의 추적 코드에 추가하십시오. _gaq.push ([ '_ _ setAllowAnchor', true]); 서버 WP에 전달 # 밤은 후 데이터가

+0

aweeeeesome! 정말 고마워! – Boxhorn

관련 문제