interfasys / piwik-yourls

A Piwik plugin for YOURLS
28 stars 10 forks source link

PIWIK-YOURLS

A Piwik plugin for YOURLS

Features

Requirements

Setup

YOURLS

If you want better alert messages, you need to apply this change to your YOURLS installation.

Piwik

Modifications

If you're not happy with the way hits are tracked, just change the way the plugin does it by editing:

    // This shows up in the visitor logs and identify the source of the data
    $pt->setCustomVariable(1, 'App', 'Piwik plugin for YOURLS', 'visit');

    // Some useful variables
    $pt->setCustomVariable(2, 'Domain landed', $domain_landed, 'page');
    $pt->setCustomVariable(3, 'Keyword', $keyword, 'page');

    // Track the visit in Piwik
    $title = yourls_get_keyword_title($keyword);
    @$pt->doTrackPageView($title);

    // The destination URL will show up as an outlink
    @$pt->doTrackAction($destination, 'link');

in plugin.php, function "itfs_piwik_log_request"

Inspiration

License

Copyright 2012 - interfaSys sàrl - www.interfasys.ch

Licensed under the GNU Affero General Public License, version 3 (AGPLv3) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.gnu.org/licenses/agpl-3.0.html

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.