diff --git a/partials/content-cover-book-header.php b/partials/content-cover-book-header.php index 5b08d7dab..38ccb9f8d 100644 --- a/partials/content-cover-book-header.php +++ b/partials/content-cover-book-header.php @@ -70,7 +70,7 @@ // add_filter('pressbooks_download_tracking_code', function( $tracking, $filetype ) { // return "_gaq.push(['_trackEvent','exportFiles','Downloads','{$title}:{$filetype}']);"; // }, 10, 2); @codingStandardsIgnoreEnd - $tracking = apply_filters( 'pressbooks_download_tracking_code', "ga('send','event','exportFiles','Downloads','{$title}:{$filetype}');", $filetype, $title ); + $tracking = apply_filters( 'pressbooks_download_tracking_code', "gtag( 'event','exportFiles', {action: 'download', title: '{$title}', file_type: '{$filetype}'});", $filetype, $title ); ?>