I'm trying to use javascript to count page views using a third-party company called Omniture. I've been doing it for months by putting the javascript in the showphoto.tmpl template. Works great. But...
Now I need to put in another set of this
js code that is specific to a particular category. I tried this, and it didn't work:
if ($cat == 1070) {
javascript code here
}
The template displayed fine but I saw this at the bottom of the page:
if (1070 == 1070) {}
when i went to that category, and the omniture code showed up properly when i viewed source. So far so good, except for seeing the conditional on the page.
But, I saw this:
if (1036 == 1070) {}
on the page when I went to another category. And the omniture
js code was there too, which is wrong.
So... i think the use of the $cat variable is correct, but the conditional is not peing processed correctly.
What am I doing wrong? And is there some place else I should put that code?
Any help or ideas appreciated!
NOTE: I'm using PhotoPost Pro version 5. Would version 6 help me in any way to do this?