| 1 |
<?php |
| 2 |
/** |
| 3 |
* Google_Analytics Extension |
| 4 |
* |
| 5 |
* @package NotificationX\Extensions |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace NotificationX\Extensions\Google_Analytics; |
| 9 |
|
| 10 |
use NotificationX\GetInstance; |
| 11 |
use NotificationX\Extensions\Extension; |
| 12 |
|
| 13 |
/** |
| 14 |
* Google_Analytics Extension |
| 15 |
* @method static Google_Analytics get_instance($args = null) |
| 16 |
*/ |
| 17 |
class Google_Analytics extends Extension { |
| 18 |
/** |
| 19 |
* Instance of Google_Analytics |
| 20 |
* |
| 21 |
* @var Google_Analytics |
| 22 |
*/ |
| 23 |
use GetInstance; |
| 24 |
|
| 25 |
public $priority = 5; |
| 26 |
public $id = 'google'; |
| 27 |
public $img = NOTIFICATIONX_ADMIN_URL . 'images/extensions/sources/google-analytics.png'; |
| 28 |
public $doc_link = 'https://notificationx.com/docs/google-analytics/'; |
| 29 |
public $types = 'page_analytics'; |
| 30 |
public $module = 'modules_google_analytics'; |
| 31 |
public $module_priority = 19; |
| 32 |
public $is_pro = true; |
| 33 |
public $version = '1.4.0'; |
| 34 |
|
| 35 |
/** |
| 36 |
* option key for saving google analytics data as option |
| 37 |
* @var string |
| 38 |
*/ |
| 39 |
public $option_key = 'nx_pa_settings'; |
| 40 |
|
| 41 |
/** |
| 42 |
* Initially Invoked when initialized. |
| 43 |
*/ |
| 44 |
public function __construct(){ |
| 45 |
parent::__construct(); |
| 46 |
} |
| 47 |
|
| 48 |
public function init_extension() |
| 49 |
{ |
| 50 |
$this->title = __('Google Analytics', 'notificationx'); |
| 51 |
$this->module_title = __('Google Analytics', 'notificationx'); |
| 52 |
} |
| 53 |
|
| 54 |
/** |
| 55 |
* Get data for Google_Analytics Extension. |
| 56 |
* |
| 57 |
* @param array $args Settings arguments. |
| 58 |
* @return array |
| 59 |
*/ |
| 60 |
public function get_data( $args = array() ){ |
| 61 |
return 'Hello From Google Analytics'; |
| 62 |
} |
| 63 |
|
| 64 |
public function doc(){ |
| 65 |
/* translators: %1$s: signed in to Google Analytics site link URL, %2$s: documentation link URL, %3$s: Watch video tutorial link URL, %4$s: Integration with Google Analytics link URL */ |
| 66 |
return sprintf(__('<p>Make sure that you have <a target="_blank" href="%1$s">signed in to Google Analytics site</a>, to use its campaign & page analytics data. For further assistance, check out our step by step <a target="_blank" href="%2$s">documentation</a>.</p> |
| 67 |
<p>🎦 <a target="_blank" href="%3$s">Watch video tutorial</a> to learn quickly</p> |
| 68 |
<p>👉NotificationX <a target="_blank" href="%4$s">Integration with Google Analytics</a></p>', 'notificationx'), |
| 69 |
'https://analytics.google.com/analytics/web/', |
| 70 |
'https://notificationx.com/docs/google-analytics/', |
| 71 |
'https://www.youtube.com/watch?v=zZPF5nJD4mo', |
| 72 |
'https://notificationx.com/docs/google-analytics/' |
| 73 |
); |
| 74 |
} |
| 75 |
} |
| 76 |
|