- Content .- Fans (10) .- Knowledge Base (1) . 

Shorty Tracking


ownCloud Productivity

Score 75%
Version Control:  Link
Blog:  Link
Minimum required   ownCloud 5
Downloads:  6898
Submitted:  Jul 18 2012
Updated:  Nov 16 2013


This Shorty Tracking package implements an app for the ownCloud web application. It plugs into another app, the Shorty package and enhances that with additional features:
- detailed tracking of all clicks refering to Shortys
- visualization of all clicks registered for a Shorty

The app does not register any own settings or preference dialog nor a separate navigation entry. Instead it adds an additional action icon (sparkline) to every Shorty that exists in the main Shorty app.

As written many times before I can not invest the time to maintain these apps any longer. I asked several times for others to step forward, for active users to contribute, for interested people to fix small issues, all without success. The apps code lives on github inside the owncloud repositories, everyone is able and welcome to contribute. However there is another catch:

owncloud version 6 is approaching. Once more it is incompatible to prior versions in more aspects than expected. This is why the Shorty app will not be usable in owncloud anymore. I spend some time investigating what changes might be required and had to admit that because of layout changes all of the dialog templates and styles will have to be reimplemented. This is a time consuming thing because of the limited area available and the requirement to maintain backwards compatibility for at least version 5. As said before: I myself cannot invest that time.

I am sorry to say so, but without contributions and without the owncloud team itself jumping in:


* Mon Aug 05 2013 Christian Reiner: version 0.1.16
Fix automatic deactivation of app if the main app is deactivated.
* Thu May 23 2013 Christian Reiner: version 0.1.15
Registration of plugin abstract as expected since Shorty version 0.3.26.
* Tue Apr 30 2013 Christian Reiner: version 0.1.14
Don't store a requests IP Adress in case name resolution fails.
Fixed column filter in list of clicks.
* Wed Mar 20 2013 Christian Reiner: version 0.1.13
Allow direct activation in ownCloud5 based installations.
* Sun Feb 09 2013 Christian Reiner: version 0.1.12
Widened maximum width of click list to prevent a broken layout.
* Mon Jan 07 2013 Christian Reiner: version 0.1.11
Use svg version of icons where applicable.
Some style fixes expecially to better support MS IE browsers.
* Mon Dec 31 2012 Christian Reiner: version 0.1.10
Changed supported OC version to 4.9 (OC-4.5).
Support for the postgresql database engine.
Several style and layout fixes, especially for webkit based browsers.
Enhanced visualization of filter capabilities inside the list of clicks.
* Thu Nov 29 2012 Christian Reiner: version 0.1.9
Added an enhancement to the list of clicks:
- hovering over entry details highlights other entries sharing the same value.
- clicking entry detail accepts its value as filter expression for its column.
Fixed usage of remote queries offered by this app.
Some fixes to the internal documentation.
* Fri Nov 16 2012 Christian Reiner: version 0.1.8
Changed visualization of access times in list and details.
* Wed Nov 01 2012 Christian Reiner: version 0.1.7
Support for remote queries via Shortys public service.
* Tue Oct 09 2012 Christian Reiner: version 0.1.6
Switched layout of list of clicks to liquid style.
Switched apps activation requirement to OC version 5 (to satisfy OCs stupid compatibility check).
A few optical enhancements.
* Mon Sep 13 2012 Christian Reiner: version 0.1.5
Internal corrections required by changes in the upcoming OC5 release.
Internal rename from 'shorty-tracking' to 'shorty_tracking'...
* Mon Aug 06 2012 Christian Reiner: version 0.1.4
Fixed filtering of list of clicks by time column.
Fixed reset of counters in sparklines when switching between lists.
Fixed close button on lists of clicks.
Internal code and namespace changes to match the OC Code of Conduct.
* Thu Jul 26 2012 Christian Reiner: version 0.1.3
A sparkline giving an impression of a Shortys usage.
* Tue Jul 24 2012 Christian Reiner: version 0.1.2
Use OCs CSRF protection framework for ajax requests.
Fixed a few compatibility issues with OC5-pre versions.
* Wed Jul 18 2012 Christian Reiner: version 0.1.1
Fixed database issues when used under mysql engines.
Added dialog showing the details of a single tracked click.
Some ui / usability enhancements
* Sun Jul 15 2012 Christian Reiner: version 0.1.0.
Initial implementation, basic things working but lacks features.

Send to a friend
Other  Apps  from arkascha
Report inappropriate content


 Praise and possible enhancement

 by jaketehcatuk on: Sep 5 2013
Score 50%

Great product - does what I want really well.

One question for you though. I use OwnCloud behind a reverse proxy and as such, the IP address reported by shorty is the proxy, not the client. The proxy does send through 'X_FORWARDED_FOR HTTP' - where in the code would I need to update the logging to get the correct IP address?

As an aside, even though I registered with Google, I couldn't get Shorty to use the Google API - kept on erroring with: -
Call to undefined function curl_init() at shorty/lib/backend.php

Reply to this


 Thanks and first replies...

 by arkascha on: Sep 5 2013
Score 50%

Thanks for praise and interest :-)

The error message you get when trying to access google as a backend suggests that you lack phps curl extension. The app relies on that extension for network communication with remote backends. Unfortunately owncloud still does not provide any means to test/take care of requirements and dependencies for apps. Two possible solutions:
1.) (preferred) install the extension. It is more or less a standard extension these days, nothing fancy.
2.) a fallback solution could be implemented as an alternative for systems where that curl extension is not available.
The problem with option 2: I currently cannot invest time into these apps. The code is hosted inside ownclouds github repositories though, so anyone can contribute! Maybe you want to give it a try?

To your first question...
I am not absolutely sure, but I understand your situation as follows: your owncloud installation is accessed via that reverse proxy in all cases, so when managing your collection of Shortys and when resolving shortened links. Your problem: the Shorty-Tracking plugin records the resolution requests, but monitors the internal proxy address as requester instead of the real clients address.
Indeed the app currently does not consider such a situation. The idea simply never occurred to me, though it actually is a pretty common setup...
Indeed the implementation would have to get extended here. Instead of "just" reading and archiving the requesting ip address it should evaluate an existing proxy trail which might actually contain several proxy steps. however things are one step more complicated: the app is only a plugin for the main Shorty app, and the archived information is actually prepared inside that main app (where the request occurs) and handed over as part of the internal plugin interface. So actually not this app, but the main Shorty app would have to be extended... Take a look the file replay.php, lines 100ff inside that app. You can see how the record ist constructed that is later handed over to this tracking plugin.
Again: the code lives inside ownclouds github repositories, so any extension you implement would be a welcome contribution to the apps!

Both apps live inside this sub repository of owncloud:
Form that repository, implement your contributions and send a pull request!

Reply to this



 by jaketehcatuk on: Sep 5 2013
Score 50%

Thanks for the quick reply :)

I've had a look at relay.php and made a quick change to lines 100 and 101 to use 'HTTP_X_FORWARDED_FOR' instead of 'REMOTE_ADDR' and I now get the correct client IP address :).

Obviously, the quick hack of my installation has solved my problem which I am happy about. It has been a long time since I did PHP programming, but I will have a look to see what I can do with providing a more elegant solution based on evaluating what's coming through in the headers.

Reply to this

Add commentBack

 Who we are
Add App
Public API
Legal Notice
Report Abuse

Copyright 2011-2014 Team  
All rights reserved. is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.