ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Google Adwords query string breaking my pages

August 13, 2010 12:42pm

Subscribe [8]
  • #1 / Aug 13, 2010 12:42pm

    We have set up landing pages for Google Adword campaigns, like this:
    http://www.autosafe.org/index.php/adwords/clutch-replacement

    But for some reason Google is adding a query string to the links from it’s Ads. Like this:
    http://www.autosafe.org/index.php/adwords/clutch-replacement/?gclid=CJH_pbyLpaMCFeT92AodHG8uvQ

    As you can see, that page doesn’t load anymore, and defaults to the site homepage content.

    How can we work around this?

  • #2 / Aug 13, 2010 8:30pm

    Brandon Jones

    5500 posts

    IC360,

    1. Which version and build are you on?
    2. Have you tried disabling Strict URLs?

  • #3 / Aug 16, 2010 6:22am

    Strict URLs are already switched Off.
    I’m on version 2.0.2 Public Beta

  • #4 / Aug 16, 2010 5:49pm

    Ingmar

    29245 posts

    Is it an option to upgrade to 2.1? Just so we’re all on the same page in terms of code.

  • #5 / Aug 17, 2010 8:08am

    Yup sure thing.
    Have just upgraded to v 2.1.
    Still having the same problem.
    It’s a weird one… any ideas?

  • #6 / Aug 17, 2010 10:46pm

    Brandon Jones

    5500 posts

    IC360,

    There’s a pretty detailed thread tackling this which might help.

    One of the first tests it mentions is to try setting your 404 page to None and see if that changes anything.

  • #7 / Aug 19, 2010 11:30pm

    Yes I did see this post… but I’m slightly confused.
    If we use the htaccess file to change the URL of the page that is displayed, wont this prevent Google from using the gclid reference for its intended tracking?

    There are Adwords linked to these landing pages, with specific tracking requirements, so we don’t want to lose this tracking data.

  • #8 / Aug 20, 2010 2:47pm

    Ingmar

    29245 posts

    If we use the htaccess file to change the URL of the page that is displayed, wont this prevent Google from using the gclid reference for its intended tracking?

    You’d have to give this a try. If I remember correctly EE doesn’t allow question marks in the URL.

  • #9 / Sep 03, 2010 10:21am

    Unfortunately I don’t really know enough about htaccess files to work out how to do it.
    The other post, focuses on how to sort this out for the homepage.
    My pages are further down into the site than that.

    This URL:
    http://www.autosafe.org/index.php/adwords/clutch-replacement/?gclid=CJH_pbyLpaMCFeT92AodHG8uvQ

    Should look like this:
    http://www.autosafe.org/index.php/adwords/clutch-replacement/

    Anyone able to help me get the htaccess file to deal with this?

    Thanks a lot.

  • #10 / Sep 03, 2010 11:23am

    Ingmar

    29245 posts

    Unfortunately server side rewrites are somewhat outside the scope of regular Tech Support. Let me move this to the CodeShare Corner for your for some additional community support.

  • #11 / Nov 30, 2010 4:23pm

    This problem has resurfaced and I’m really hoping someone can help me get the htaccess file fixed so the page still loads correctly if the Adwords query string is added.

    This is what the page should look like:
    http://www.myfavouritegarage.com/index.php/adwords/clutch-replacement

    This is what’s called from Google Adwords:
    http://www.myfavouritegarage.com/index.php/adwords/clutch-replacement/?gclid=COyV1byPpaMCFYiX2Aod5TIG5w
    As you can see it defaults to the site homepage.

    ‘adwords’ is a template.
    ‘clutch-replacement’ is an entry ‘title_url’ (of which there are many others).

    Is this possible to get sorted my modifying the htaccess file?

  • #12 / Sep 13, 2011 6:05am

    andrew_spl

    71 posts

    Hi, has anyone found a fix for this? Other than creating a htaccess rewrite? I’m using a Windows server so using one of those is not so straight forward.

    Thanks

    Andrew

  • #13 / Sep 13, 2011 6:18am

    I never found a solution.
    Have given up, unless anyone else can come up with a genius idea (or EllisLabs can fix it).

  • #14 / Sep 13, 2011 6:28am

    andrew_spl

    71 posts

    Shame, but thanks for letting me know.

  • #15 / Nov 03, 2011 12:42pm

    siffring

    147 posts

    Adding this to my .htaccess file fixed this issue for me. Your mileage may vary.

    # Catch incoming Google campagins
    RewriteCond %{REQUEST_URI} ^/$
    RewriteCond %{QUERY_STRING} ^(gclid=*)
    RewriteRule ^(.*)$ /index.php?/$1 [L]
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases