Note that we key this table by the URL on our server rather than by a page ID. Note further that this local URL does not include the beginning / (a legacy from the old days but I guess it is OK). This enables page authors to build pages without being aware of the internalcreate table clickthrough_log ( local_url varchar(400) not null, foreign_url varchar(300) not null, -- full URL on the foreign server entry_date date, -- we count referrals per day click_count integer default 0 );
page_id
by which our system might know the comments or
links associated with a page. Here's what a link out reference looks
like:
This is a reference on the page http://www.photo.net/photo/where-to-buy, sending readers over to http://www.bhphotovideo.com/.<a href="/ct/photo/where-to-buy?send_to=http://www.bhphotovideo.com/">B&H Photo</a>
For legacy sites that used to log clickthroughs with my old system, there is a parameter in the ad.ini file that lets you specify a custom regular expression to permit old-style references that include a realm, e.g.,
Here's the necessary magic from my ad.ini file:<a href="/ct/philg/photo/where-to-buy?send_to=http://www.bhphotovideo.com/">B&H Photo</a>
[ns/server/photonet/acs/click] CustomREGEXP=/ct/philg/(.+)$