Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2016
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    301 redirects delete GCLID parameter

    Hello,

    First of all, I must confess I have very little/no idea of coding.
    The problem I have is that no data is passing from Google Adwords to Google Analitics because there are 301 redirects on my Wordpress site that delete the GCLID parameter. I have tested (as google says) adding ?gclid=TeSter-123 to my url and ?gclid=TeSter-123 does not remain, so the problem is there.
    I have searched here in CodingForum but I have been not able to find a good solution. I have learned that something has to be modified on the server/htaccess file in order to pass the GCLID value. That is why I copy you the code to see if somebody can find a solution or something to change.
    Thanks a lot for your help and sorry for my little knowledge about it.


    <IfModule mod_rewrite.c>
    #Prevents garbled chars in cached files if there is no default charset.
    AddDefaultCharset utf-8

    #Cache rules:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTPS} on
    RewriteRule .* - [E=WRDFNC_HTTPS:_https]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* - [E=WRDFNC_ENC:_gzip]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{HTTPS} off
    RewriteCond %{QUERY_STRING} ^(?:\d+=\d+)?$
    RewriteCond %{REQUEST_URI} (?:\/|\.html)$ [NC]

    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|wf_logout|wordpress_logged_in|wptouch_switch_toggle|wpmp_switcher) [NC]

    RewriteCond %{REQUEST_URI} \/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)(.*)$
    RewriteCond "%{DOCUMENT_ROOT}/wp-content/wfcache/%{HTTP_HOST}_%1/%2~%3~%4~%5~%6_wfcache%{ENV:WRDFNC_HTTPS}.html%{ENV:WRDFNC_ENC}" -f
    RewriteRule \/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)(.*)$ "/wp-content/wfcache/%{HTTP_HOST}_$1/$2~$3~$4~$5~$6_wfcache%{ENV:WRDFNC_HTTPS}.html%{ENV:WRDFNC_ENC}" [L]
    </IfModule>

  2. #2
    New to the CF scene
    Join Date
    May 2016
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    Nobody can help?
    Thanks


    Quote Originally Posted by Cuborama View Post
    Hello,

    First of all, I must confess I have very little/no idea of coding.
    The problem I have is that no data is passing from Google Adwords to Google Analitics because there are 301 redirects on my Wordpress site that delete the GCLID parameter. I have tested (as google says) adding ?gclid=TeSter-123 to my url and ?gclid=TeSter-123 does not remain, so the problem is there.
    I have searched here in CodingForum but I have been not able to find a good solution. I have learned that something has to be modified on the server/htaccess file in order to pass the GCLID value. That is why I copy you the code to see if somebody can find a solution or something to change.
    Thanks a lot for your help and sorry for my little knowledge about it.


    <IfModule mod_rewrite.c>
    #Prevents garbled chars in cached files if there is no default charset.
    AddDefaultCharset utf-8

    #Cache rules:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTPS} on
    RewriteRule .* - [E=WRDFNC_HTTPS:_https]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* - [E=WRDFNC_ENC:_gzip]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{HTTPS} off
    RewriteCond %{QUERY_STRING} ^(?:\d+=\d+)?$
    RewriteCond %{REQUEST_URI} (?:\/|\.html)$ [NC]

    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|wf_logout|wordpress_logged_in|wptouch_switch_toggle|wpmp_switcher) [NC]

    RewriteCond %{REQUEST_URI} \/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)(.*)$
    RewriteCond "%{DOCUMENT_ROOT}/wp-content/wfcache/%{HTTP_HOST}_%1/%2~%3~%4~%5~%6_wfcache%{ENV:WRDFNC_HTTPS}.html%{ENV:WRDFNC_ENC}" -f
    RewriteRule \/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)(.*)$ "/wp-content/wfcache/%{HTTP_HOST}_$1/$2~$3~$4~$5~$6_wfcache%{ENV:WRDFNC_HTTPS}.html%{ENV:WRDFNC_ENC}" [L]
    </IfModule>


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •