Plugin Directory

Changeset 201175

Timestamp:
02/02/2010 08:39:29 PM (15 years ago)
Author:
ShaneF
Message:

updated, not yet working fully.

Location:
woopra/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • woopra/trunk/inc/frontend.php

    r201072 r201175  
    5757       
    5858        /**
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
    5976         * Tracking User Information
    6077         */
     
    7087        wp_localize_script( 'woopra-tracking', 'woopraFrontL10n', $this->local['woopra-tracking'] );
    7188       
    72         /**
    73          * WordPress Woopra Event Tracking
    74          */
    75         if ( $this->get_option('track_events') ) {
    76             //  Set jQuery Events Options
    77             if ( $this->enabled_event('image') )
    78                 $this->create_localize( array('trackImage' => 'true', 'trackImageTitle' => __('Image Viewed')), 'woopra-events' );
    79            
    80             if ( is_array($this->local['woopra-events']) )
    81                 wp_enqueue_script( 'woopra-events', $this->plugin_url() . '/js/jquery.events.js',       array('jquery', 'woopra-tracking'), '20100201', true );
    82             wp_localize_script( 'woopra-events', 'woopraEventsL10n', $this->local['woopra-events'] );
    83         }
     89
    8490    }
    8591   
     
    105111     */
    106112    function enabled_event($event) {
     113
     114
     115
    107116        if ( !empty($this->options['events'][$event]) )
    108117            return $this->options['events'][$event];
  • woopra/trunk/js/jquery.events.js

    r201078 r201175  
    11jQuery(document).ready(function() {
     2
     3
     4
     5
     6
    27       
     8
     9
     10
    311    if ( woopraEventsL10n.trackImage ) {
    412        /**
     
    1422        };
    1523       
    16         jQuery("a:notexternal > img").each(function(i) {
     24        jQuery("a:notexternal > img").each(function(i) {
    1725            jQuery(this).trackEvent({
    1826                title : woopraEventsL10n.trackImageTitle,
     
    2230    }
    2331   
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
    2460});
  • woopra/trunk/js/jquery.tracking.js

    r201102 r201175  
    2727(function($) {
    2828
    29     /**
    30      *
    31      */
    32     $.trackWoopra = function(woopra_data) {
     29   
     30    /**
     31     * Debug Information
     32     */
     33    $.woopraDebug = function (message) {
     34        if (typeof console != 'undefined' && typeof console.debug != 'undefined' && $.fn.trackEvent.defaults.debug) {
     35            console.debug(message);
     36        }
     37    }; 
     38   
     39    /**
     40     *
     41     */
     42    $.trackWoopra = function (woopra_data) {
    3343        var script;
    3444        var src  = 'http://static.woopra.com/js/woopra.v2.js';
     
    5464        }
    5565       
    56         _load_woopra = function() {
     66        _load_woopra = function() {
    5767            $.ajax({
    5868                type: "GET",
     
    107117         *
    108118         */
    109         return this.each( function() {
     119        return this.each( function() {
    110120            var element = $(this);
    111121            var parent = $(element).parent();
     
    174184            return text_or_function;
    175185        };
     186
    176187    };
    177188   
    178     /**
    179      * Debug Information
     189    /*
     190     *
    180191     */
    181192    function debug(message) {
    182         if (typeof console != 'undefined' && typeof console.debug != 'undefined' && $.fn.trackEvent.defaults.debug) {
    183             console.debug(message);
    184         }
    185     };
     193        $.woopraDebug(message);
     194    }
    186195   
    187196    /**
Note: See TracChangeset for help on using the changeset viewer.