Welcome Guest, Not a member yet? Register   Sign In
Be careful when using Adwords with CodeIgniter (gclid=)
#1

[eluser]Stu Green[/eluser]
Hey all

Just to warn you when using Google Adwords make sure you disable the Analytics tracking code or it will add a...

?gclid=

...string to your URLs which is BAD in CI. What happens is the controller breaks because it can't find that page, so you get a 404.

I didn't know and paid nearly £100.00 for click-throughs that were going to a 404 error.

Fortunately I complained and got my money back (thanks Google). But I'm just warning you all in case!

Thanks
#2

[eluser]xwero[/eluser]
a simple way to prevent it is to set the uri_protocol to path_info and CI will not see the query string part of the url.

I started a discussion to chance the default uri_protocol setting because one of the reasons is that many web services use query strings to pass information.
#3

[eluser]Stu Green[/eluser]
Yes they do. I didn't know about this thanks for the link!
#4

[eluser]migsy[/eluser]
great, I also lost a bit of money because of this issue.

nice that CI has looked into this problem and fixed it... not.
#5

[eluser]n0xie[/eluser]
It's not a problem. It's a server setting.
#6

[eluser]coldfire82[/eluser]
[quote author="xwero" date="1236920644"]a simple way to prevent it is to set the uri_protocol to path_info and CI will not see the query string part of the url.

I started a discussion to chance the default uri_protocol setting because one of the reasons is that many web services use query strings to pass information.[/quote]

I just found this thread after creating mine at http://ellislab.com/forums/viewthread/156684/

What if I have to use the querystring part and it is NECESSARY?

Another thing, I set the uri_protocol to path_info

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

But, error

Code:
A PHP Error was encountered

Severity: Warning

Message: include(application/controllers/<GoogleAdWordCode>.php) [function.include]: failed to open stream: No such file or directory

Filename: codeigniter/CodeIgniter.php

Line Number: 135

Any working solutions to workaround the google ad with CI ?

-
Thanks
#7

[eluser]Vince Stross[/eluser]
Changing the uri_protocol to PATH_INFO did the trick for me - thanks xwero!




Theme © iAndrew 2016 - Forum software by © MyBB