Good evening!
This question is more for curiosity.
I have a page in php that displays certain topics from a phpbb forum. Among the stored data is the path (url) of the topic, which comes in http://meusite.com.br/forum/viewtopic.php?f=yy&t=xx
format. For the little bit that I know, f
and t
are GET requests.
I want to concatenate the Google Analytics parameters in this string (which I could do without checking for integrity simply by adding% with%), but then I was thinking: what if I change the link structure (type via url_rewrite)? Or if for some reason both formats (with / without GET) are stored by PHPBB? Some links would obviously be broken (by "opening" the part of the request using an & instead of a?), And so would need a check.
What I want to do is simply check this string if there are GET variables like these (in case I ever change the layout of the URLs and so the links do not break) and, depending on whether or not they exist, add a &utm_blablabal...
or &
before the Analytics parameters. Basically an "integrity check".
Thanks for the help, and sorry if I was not clear.