1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* SeedProd Tracking for 404 and Coming Soon. |
4
|
|
|
* |
5
|
|
|
* @since 7.3.0 |
6
|
|
|
* |
7
|
|
|
* @package MonsterInsights |
8
|
|
|
* @author Chris Christoff |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
// Exit if accessed directly |
12
|
|
|
if ( ! defined( 'ABSPATH' ) ) { |
13
|
|
|
exit; |
14
|
|
|
} |
15
|
|
|
|
16
|
|
|
// 1. Disable SeedProd settings (done in seedprod) |
17
|
|
|
// 2. Output tracking code, if settings is not set to use wp_head() (done in seedprod and below) |
18
|
|
|
// 3. Disable ga_tracking in their setting (done in seedprod) |
19
|
|
|
function monsterinsights_seedprod_tracking( $settings ) { |
|
|
|
|
20
|
|
|
require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/class-tracking-abstract.php'; |
21
|
|
|
|
22
|
|
|
|
23
|
|
|
do_action( 'monsterinsights_tracking_before_analytics' ); |
24
|
|
|
do_action( 'monsterinsights_tracking_before', 'analytics' ); |
25
|
|
|
|
26
|
|
|
require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/tracking/class-tracking-analytics.php'; |
27
|
|
|
$tracking = new MonsterInsights_Tracking_Analytics(); |
28
|
|
|
echo $tracking->frontend_output(); |
29
|
|
|
|
30
|
|
|
do_action( 'monsterinsights_tracking_after_analytics' ); |
31
|
|
|
do_action( 'monsterinsights_tracking_after', 'analytics' ); |
32
|
|
|
|
33
|
|
|
$events_mode = monsterinsights_get_option( 'events_mode', false ); |
34
|
|
|
$track_user = monsterinsights_track_user(); |
35
|
|
|
|
36
|
|
|
if ( $track_user && ( $events_mode === 'js' || $events_mode === 'php' ) ) { |
37
|
|
|
require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/events/class-analytics-events.php'; |
38
|
|
|
new MonsterInsights_Analytics_Events(); |
39
|
|
|
|
40
|
|
|
// Let's run form tracking if we find it |
41
|
|
|
if ( function_exists( 'monsterinsights_forms_output_after_script' ) ) { |
42
|
|
|
monsterinsights_forms_output_after_script( array() ); |
43
|
|
|
} |
44
|
|
|
} |
45
|
|
|
} |
46
|
|
|
add_action( 'seedprod_monsterinsights_output_tracking', 'monsterinsights_seedprod_tracking', 6, 1 ); |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.