Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Link click counting? Is this possible somehow?
Hi there,
Is there an existing plugin that can store a numerical value of how many times a link is clicked upon into a table of the txp database, and then call that value back with a txp tag? Similar in function to how the <txp:file_download_downloads /> tag works. The reason being that my client wants to record and display how many times a video is watched, for example. In theory this could be used for any link you wanted to track.
Failing that, I guess a second way to approach this would be to circumvent the file type forms and write directly to the file table downloads column using some php?
Thanks,
Phil
Offline
Re: Link click counting? Is this possible somehow?
Offline
Re: Link click counting? Is this possible somehow?
Thanks,
I’m sure I can make that work – I’ll have to make articles for each of my videos but that is no problem. I’ll give it a whirl.
Cheers,
Phil
Offline
Re: Link click counting? Is this possible somehow?
I’ve tried dzd_counter_view but, for my specific needs, I would prefer a method where a counter is incremented upon clicking a link – probably with an onclick event writing to a custom field in the article. Reason being the target of that link is a video file, not an article which the above plugin kind of requires.
Anyone help?
Offline
Re: Link click counting? Is this possible somehow?
Bump!
Is there a way to increment a value in an article’s custom_field using some php when a certain link is clicked within that article?
Would be great if it could.
Offline
Re: Link click counting? Is this possible somehow?
I havent did it, but a workaround can be to use javascript (like jquery) andcall a page using ajax and in that page use the plugin smd_query to put a right value in a custom_field.
Cheers.
Offline
Re: Link click counting? Is this possible somehow?
The simpliest way to do so is to use a service like bit.ly which does the click counting.
Maybe you can use the bit.ly API via jQuery or Javascript directly inside Textpattern. Or some kind soul offers a TXP plug-in which helps to create bit.ly links.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Link click counting? Is this possible somehow?
OK this might illustrate my needs better, here is where I want to use the view counter. Each of the videos are articles with just a title field, article image, body (the authors name), a URL for the actual video file and a custom field which will hopefully once working will increment when a user watches a video.
I can then take that custom_field value and make lists of most viewed videos from it, or whatever. I will also display a view count next to the authors name.
I need a way of capturing views – the video files that play in a lightbox are not articles or even stored in textpattern so I can’t add TXP tags directly to them, so it would have to be done with either javascript or php writing to the custom_field. Can anyone help me out, I can make small a paypal donation if needs be.
Offline
Re: Link click counting? Is this possible somehow?
Ask Gerhard the developer of glz_custom_fields. I am not using the plug-in so I am not sure what is possible but this plug-in is the preferred swiss army knife for everything concerning custom field(s) extension(s).
Ask over there and you will get an answer :)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline