forked from plausible/wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plausible-analytics.php
32 lines (27 loc) · 1.04 KB
/
plausible-analytics.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* Plugin Name: Plausible Analytics
* Plugin URI: https://plausible.io
* Description: Simple and privacy-friendly alternative to Google Analytics.
* Author: Plausible.io
* Author URI: https://plausible.io
* Version: 2.1.4-custom
* Text Domain: plausible-analytics
* Domain Path: /languages
*/
namespace Plausible\Analytics\WP;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Define plugin version here for convenience.
define( 'PLAUSIBLE_ANALYTICS_VERSION', '2.1.4-custom' );
define( 'PLAUSIBLE_ANALYTICS_PLUGIN_FILE', __FILE__ );
define( 'PLAUSIBLE_ANALYTICS_PLUGIN_BASENAME', plugin_basename( PLAUSIBLE_ANALYTICS_PLUGIN_FILE ) );
define( 'PLAUSIBLE_ANALYTICS_PLUGIN_DIR', plugin_dir_path( PLAUSIBLE_ANALYTICS_PLUGIN_FILE ) );
define( 'PLAUSIBLE_ANALYTICS_PLUGIN_URL', plugin_dir_url( PLAUSIBLE_ANALYTICS_PLUGIN_FILE ) );
// Automatically loads files used throughout the plugin.
require_once PLAUSIBLE_ANALYTICS_PLUGIN_DIR . 'vendor/autoload.php';
// Initialize the plugin.
$plugin = new Plugin();
$plugin->register();