Welcome Guest, Not a member yet? Register   Sign In
Google Analytics & Codeigniter
#21

[eluser]scubasean[/eluser]
We ended up reverting to version 1.5.4 of CI which works with Google Adwords.

Thanks for all the help Randy! Much appreciated!

Sean
#22

[eluser]Unknown[/eluser]
I'm having this same issue and I've read all the forum threads and it looks like it should be as simple as changing two config options:

Code:
$config['uri_protocol']    = "PATH_INFO";
$config['enable_query_strings'] = TRUE;

This works on my home installation, but not on HostGator. It just sends any url straight to the root url. HG, like DreamHost, needs to have the question mark in .htaccess:

Code:
RewriteRule ^(.*)$ index.php?/$1 [L]

Before I make the config changes above query strings are just ignored on all subpages, but it will 404 on the root url.

I know the problem stems for the .htaccess rule, but I don't know what to do about that. Any help would be great. As you can imagine, my clients would really like to have Google AdWords work on their sites.
#23

[eluser]robmcm[/eluser]
I got mine working by making the changes to the config, but not adding the ? to the htaccess file.

How www.example.com/?gclid=null works and so do all my default pages and sub pages

Hopes this helps so more people with the google adwords gclid and codeigniter!
#24

[eluser]BrianDHall[/eluser]
I believe if you create a route rule that looks for a ? as the first character and reroute it to the default controller, it will work. I have to get down to work on something else so I haven't tested it, but I don't know why it wouldn't work just fine.
#25

[eluser]Aidy[/eluser]
I'm having the same problem and am contemplating just keeping google auto tags turned off.

But echoing what Lone and Brian have said would it not just be possible to change the permitted uri characters in the config file and then setup a route. I have given it a try but i'm still 404.

Could it be that my regular expressions are wrong? I'm not so good with them! Or is it something else. Here is my code

config.php
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-\?=';

routes.php
Code:
$route['\?(gclid=)[a-zA-Z0-9]*'] = "home";

Also does it compromise security at all allowing '?' in the url's?
#26

[eluser]Aidy[/eluser]
I now have a project that really needs this functionality, can anyone help with my question above? Thanks
#27

[eluser]derekmichaeljohnson[/eluser]
Having the same issue with HostGator.

Code:
$config['uri_protocol']    = "PATH_INFO";
$config['enable_query_strings'] = TRUE;

A URL like www.domain.com/about/?foo=4849 works fine on our local linux box, but when uploaded to HostGator it throws a 404.

Anyone solve this yet??
#28

[eluser]derekmichaeljohnson[/eluser]
I hate to bump posts, but I really need a solution here.
#29

[eluser]taewoo[/eluser]
i am having the same issue - details here

Gosh, i wish someone would come up with a .htaccess that works with both URI and query string. ;/
#30

[eluser]darrenfauth[/eluser]
Glad I found this older post. I just realized we had blown through $175 on Adwords and all clicks were 404 due to the additional values Google was adding to the url.

The solution that worked right away for me was the one offered by Nikhil Vijayan (that seemed to get overlooked by other posters)...

In application/config/config.php make these changes:

Code:
$config['uri_protocol']    = "PATH_INFO";

Code:
$config['enable_query_strings'] = TRUE;

Our site is hosted on Media Temple dv.

I didn't have to mess with anything in the .htaccess

The only things I am doing in it is: get rid of index.php and rewrite www to no www

Hope this helps




Theme © iAndrew 2016 - Forum software by © MyBB