Here is a patch to add a links_history sub-module. Views data is included.

I'm working on cleaning up an example, but here are the basics of it.
Pass in the link_id to the function "_link_clicked" and link_id, datetime, and user_ip are tracked in the links_history table.

_link_clicked($lid);

I've used this with weblinks:

$link = $node->links_weblink[0];
_link_clicked($link['lid']);

I also used it in a project with a content type where the user is adding a website to a node. When they save the node, the LinkID is calculated and stored in a computed CCK field for later usage.

Coding was sponsored by Web Geeks For Hire.

Hope this helps someone. :)

CommentFileSizeAuthor
0001-Added-links_history-module.patch13.04 KBjarodms
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pyrello’s picture

Subscribing.

scarr’s picture

Subscribing