[thelist] PHP - Making All Links Unique (even to same page)

Mark MacInnes mark.macinnes at gmail.com
Tue Jan 15 05:44:13 CST 2008


My development team has developed our own CMS over the past year or so.
We've been asked by the Internet Marketing guys this morning to make every
single link on a page unique, even if they're going to the same page, for
tracking in Google Analytics etc. I'm not looking for code or anything, just
wondering what ideas people think are the best.

So far, this is the only idea I've come up with:
- When a page is created, append '_nav' to menu links, '_bc#LinkNo#' to body
content links (whereby #LinkNo# would be replaced by a unique number for the

But I feel a little uneasy with it as it would make the links a little messy
- we use URL Rewriting to try to make friendly links, and now we might be
chucking in some extra characters for no benefit to user or search engine.

Your thoughts would be much appreciated.


Mark A. MacInnes

It only takes a click a day to help:

More information about the thelist mailing list