Created
July 3, 2015 01:48
-
-
Save gordjw/9e7cd664021c3fcb5466 to your computer and use it in GitHub Desktop.
Example of adding an analytics event to track WordPress backend usage
This file contains hidden or 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
add_filter( 'tss_analytics_events', 'add_my_analytics_events' ); | |
function add_my_analytics_events( $events ) { | |
$events['publish_post'][] = array( 'post', 'published', function( $args ) { return $args[0]; } ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment