Created
October 12, 2012 23:19
-
-
Save tollmanz/3882202 to your computer and use it in GitHub Desktop.
Refresh Google Analytics Data on an Interval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function zt_schedule_ga_refresh() { | |
if ( ! wp_next_scheduled( 'zt-refresh-top-posts' ) | |
wp_schedule_event( time(), 'zt-refresh-top-posts' ); | |
add_action( 'zt-refresh-top-posts', 'zt_refresh_top_posts' ); | |
} | |
add_action( 'init', 'zt_schedule_ga_refresh' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment