$name, 'type' => $type, 'match' => $match ); update_option( 'footloom_goals', $goals ); } } elseif ( 'delete_goal' === $action ) { unset( $goals[ absint( $_POST['goal_index'] ?? -1 ) ] ); $goals = array_values( $goals ); update_option( 'footloom_goals', $goals ); } elseif ( 'save_tracking' === $action ) { update_option( 'footloom_exclude_admins', empty( $_POST['exclude_admins'] ) ? 0 : 1 ); // Turning countries on downloads the database in the background. Turning them off removes it. $geo = empty( $_POST['geo'] ) ? 0 : 1; if ( $geo && ! Geo::enabled() ) { wp_schedule_single_event( time(), 'footloom_geo_update' ); } elseif ( ! $geo && Geo::enabled() ) { wp_clear_scheduled_hook( 'footloom_geo_update' ); wp_delete_file( Geo::file() ); } update_option( 'footloom_geo', $geo ); } elseif ( 'save_retention' === $action ) { $days = 'delete' === sanitize_key( wp_unslash( $_POST['retention_mode'] ?? '' ) ) ? absint( $_POST['retention_days'] ?? 0 ) : 0; update_option( 'footloom_retention_days', $days ); } echo '

Settings saved.

'; } global $wpdb; // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter -- Plugin's own table, name from Plugin::table(). $event_names = array_unique( array_merge( wp_list_pluck( (array) get_option( 'footloom_event_rules', array() ), 'name' ), array( 'outbound_click', 'form_submit' ), $wpdb->get_col( 'SELECT DISTINCT name FROM ' . Plugin::table( 'events' ) . ' LIMIT 200' ) ) ); // phpcs:enable ?>

Goals

A goal is a page or an event you want visitors to reach. The dashboard shows how many visitors completed each goal and the conversion rate.

$goal ) : ?>
NameTypeMatch

Add a goal


For events, the event name. For pages, the exact path like /thank-you, or end it with * to match every page that starts with it, like /blog/*.

Tracking

Visits from logged-in administrators are not recorded, so your own browsing doesn't change the numbers. Other logged-in users, like customers, members and editors, are always tracked.

Downloads the free DB-IP Lite country database from db-ip.com to your server and refreshes it once a month. Only the file is downloaded. No visitor data is sent. Countries are looked up on your own server and IP addresses are never stored. Sites behind Cloudflare get countries from Cloudflare without this download.

Data retention

How long to keep data

days

When a limit is set, older visits, pageviews and events are deleted once a day. Deleted data can't be recovered.