Skip to content

Commit

Permalink
Cleaner code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan0sz committed Feb 7, 2024
1 parent f87fedd commit e5b269a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Includes/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ public function maybe_register_assets() {
);

// Track 404 pages (if enabled)
if ( ! empty( $settings[ 'enhanced_measurements' ] ) &&
is_array( $settings[ 'enhanced_measurements' ] ) &&
in_array( '404', $settings[ 'enhanced_measurements' ] ) &&
is_404() ) {
if ( is_array( $settings[ 'enhanced_measurements' ] ) && in_array( '404', $settings[ 'enhanced_measurements' ] ) && is_404() ) {
wp_add_inline_script(
'plausible-analytics',
"document.addEventListener('DOMContentLoaded', function () { plausible('404', { props: { path: document.location.pathname } }); });"
Expand Down

0 comments on commit e5b269a

Please sign in to comment.