Changeset 200932
- Timestamp:
- 02/02/2010 03:00:22 AM (15 years ago)
- Location:
- woopra/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
woopra/trunk/inc/frontend.php
r200926 r200932 69 69 function init() { 70 70 wp_enqueue_script( 'woopra-tracking', $this->plugin_url() . '/js/jquery.tracking.js', array('jquery'), '20100201', true ); 71 wp_localize_script( 'woopra-tracking', 'woopraFrontL10n', array( 72 'subDomainTracking' => $this->get_option('sub_domain'), 73 ) 74 ); 71 72 // Set jQuery Options 73 if ( $this->get_option('use_subdomain') ) 74 $_woopra_localize[] = array('rootDomain' => $this->get_option('sub_domain') ); 75 76 if ( $this->get_option('use_timeout') ) 77 $_woopra_localize[] = array('setTimeoutValue' => ($this->get_option('timeout')*1000) ); 78 79 // Output jQuery Options 80 wp_localize_script( 'woopra-tracking', 'woopraFrontL10n', $_woopra_localize ); 75 81 } 76 82 … … 103 109 echo "\r\n<!-- Woopra Analytics Code -->\r\n"; 104 110 echo "<script type=\"text/javascript\">\r\n"; 105 echo "jQuery.trackWoopra( );\r\n";111 echo "jQuery.trackWoopra();\r\n"; 106 112 echo "</script>\r\n"; 107 113 -
woopra/trunk/js/jquery.tracking.js
r200926 r200932 55 55 * 56 56 */ 57 $.trackWoopra = function( ) {57 $.trackWoopra = function() { 58 58 var script; 59 59 60 var src = 'http://static.woopra.com/js/woopra.v2.js'; 60 61 61 62 function _woopra_track() { 62 63 if ( woopraTracker != undefined ) { 63 if ( woopraFrontL10n.subDomainTracking ) { 64 woopraTracker.setDomain( woopraFrontL10n.rootDomain ); 65 debug('Woopra Root Domain: ' + woopraFrontL10n.rootDomain); 64 if ( woopraFrontL10n != undefined ) { 65 if ( woopraFrontL10n.rootDomain != null ) { 66 woopraTracker.setDomain( woopraFrontL10n.rootDomain ); 67 debug('Woopra Root Domain: ' + woopraFrontL10n.rootDomain); 68 } 69 if ( woopraFrontL10n.setTimeoutValue > 0 ) { 70 woopraTracker.setIdleTimeout( woopraFrontL10n.setTimeoutValue ); 71 debug('Woopra Idle Timeout: ' + woopraFrontL10n.setTimeoutValue + 'ms'); 72 } 66 73 } 74 75 76 67 77 woopraTracker.track(); 68 78 debug('Woopra is loaded.');
Note: See TracChangeset
for help on using the changeset viewer.