How can I set up these goals?

I want to track clicks on two types of links. They are both external links that are masked via htaccess so they actually appear as internal links.

The first type of link is
The second is

I have tried every combination possible in setting up a goal yet no combination works at tracking clicks on these links.

Can anyone help? Is this even possible?

Thanks for looking

Something like the following:

function linkClick(linkType, linkLocation)
    if(linkType == 'randomnumber')
        _paq.push(['trackGoal', 1]);
    if(linkType == 'randomcharacters')
        _paq.push(['trackGoal', 2]);
    window.location = linkLocation;
    return true;

<a href="javascript:void(0)" onclick="linkClick('randomnumber', '')"></a>
<a href="javascript:void(0)" onclick="linkClick('randomcharacters', '')"></a>

Thanks for the reply Valdor

Although where it says ‘randomnumbers’ and ‘randomcharacters’ they really are random as they are generated dynamically by a script and change often.

But all I want to do is set up a goal to track a click up to the the /click.php and the /click/ parts…

I did realize that. You would have to supply the random numbers and/or characters as appropriate. I just put them in the code as placeholders. The code wasn’t meant to be taken verbatim but as an abstract of how to do it. I would expect that the function would need to change as well as the parameters sent but the code shows how you would conditionally track different goals.

If that wasn’t what you were asking then please elaborate.