PHP SID Tracking in Joomla

Submitted by clicktower on Fri, 09/07/2007 - 19:38.
I've been building sites using Joomla and I've run into a serious problem that I was hoping someone had a solution for. I am unable to integrate the PHP tracking code suggested by Jeremy in his ebook when using Joomla.
I put something like this into the head of my site:
$keyword = $_GET['kw'];
$tracking="{$keyword}";
?>
Then I add this to the end of my affiliate links ?sid=
Then I add the proper code to my tracking URL. I know my code is right because it works on sites I built without Joomla.
Joomla doesn't read it as PHP even though Joomla is written in PHP. Anyone else have this problem or a solution? Tracking works in Wordpress right?

PHP SID Tracking in Joomla
clicktower - tracking works in Wordpress but I do not know Joomla. The only thing I can think of is make sure that nothing comes before your PHP code in the header but you probably already know that.
Re: PHP SID Tracking in Joomla
I think it might depend on where your posting the code. Joomla's text editor may strip the PHP out for security reasons. You may have to go into the database and tweak it?
Welcome to the forums ClickTower - it's been a long time ;)
PHP SID Tracking in Joomla
Jeremy is right. PHP code is not interpreted everywhere in Joomla, especially if you try to add it from the web interface. I'd suggest to put custom-written PHP into either the header module (directly in the code) or into a module of your own - that just takes 3 minutes to make. I've rewritten Joomla installations quite significantly this way.
Also, while this is perhaps not the advice you are looking for.. but as someone who has done a lot with Joomla, i'm a bit mixed regarding its suitability for affiliate marketing. If you like the look a feel of a certain template, and do not want advanced functionality, you may be fine. However, when you want to change things, it may require quite deep PHP knowledge and a lot of work. I did it for some mainly SEO-driven sites, but since my affiliate efforts - much like Jeremy - became about 90% PPC focused, I wanted complete control over everything, very easy customization, and SPEED - Joomla, especially with complex themes, is just too damn slow to make PPC LPs with. So in the end I gave up on Joomla, went and wrote PHP site templates myself completely from scratch :(