Changeset 2453 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php
- Timestamp:
- 02/03/2016 10:10:15 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php
r2352 r2453 51 51 } 52 52 add_action( 'login_init', 'wporg_login_replace_css' ); 53 54 /** 55 * Add Google Analytics tracking to login pages. 56 */ 57 function wporg_login_analytics() { 58 ?> 59 <script type="text/javascript"> 60 var _gaq = _gaq || []; 61 _gaq.push(['_setAccount', 'UA-52447-1']); 62 _gaq.push(['_setDomainName', 'wordpress.org']); 63 _gaq.push(['_trackPageview']); 64 (function() { 65 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 66 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 67 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 68 })(); 69 function recordOutboundLink(link, category, action) { 70 _gaq.push(['_trackEvent', category, action]) 71 setTimeout('document.location = "' + link.href + '"', 100); 72 } 73 </script> 74 <?php 75 } 76 add_action( 'wp_footer', 'wporg_login_analytics' );
Note: See TracChangeset
for help on using the changeset viewer.