Version Description
- 22/10/2020 =
- No need to manually paste Google Analytics property to start tracking. We have given google sign in functionality in order to auto fetch google analytics property.
- Fine tuning for Google Analytics 4 dual set up/ data collection in google analytics 4 in order to be future ready for the next generation analytics.
- New feature - Now you can link your google ads account with google analytics property and start passing important data points to google analytics from your google ads account.
- Compatibility with WooCommerce 4.6.1
- Compatibility with Wordpress 5.5.1
Download this release
Release Info
Developer | Tatvic |
Plugin | Enhanced Ecommerce Google Analytics Plugin for WooCommerce |
Version | 2.3.6 |
Comparing to | |
See all releases |
Code changes from version 2.3.4 to 2.3.6
- admin/class-enhanced-ecommerce-google-analytics-admin.php +99 -23
- admin/class-enhanced-ecommerce-google-analytics-settings.php +25 -1
- admin/css/enhanced-ecommerce-google-analytics-admin.css +41 -3
- admin/images/discount.gif +0 -0
- admin/partials/about-plugin.php +18 -3
- admin/partials/enhanced-ecommerce-google-analytics-admin-display.php +18 -3
- admin/partials/general-fields.php +145 -96
- admin/partials/sidebar.php +17 -6
- enhanced-ecommerce-google-analytics.php +8 -4
- includes/json/client-secrets.json +25 -0
- includes/json/currency.json +252 -0
- public/class-enhanced-ecommerce-google-analytics-public.php +30 -6
- readme.txt +41 -18
admin/class-enhanced-ecommerce-google-analytics-admin.php
CHANGED
@@ -20,6 +20,8 @@
|
|
20 |
* @subpackage Enhanced_Ecommerce_Google_Analytics/admin
|
21 |
* @author Chiranjiv Pathak <chiranjiv@tatvic.com>
|
22 |
*/
|
|
|
|
|
23 |
class Enhanced_Ecommerce_Google_Analytics_Admin {
|
24 |
|
25 |
/**
|
@@ -48,18 +50,74 @@ class Enhanced_Ecommerce_Google_Analytics_Admin {
|
|
48 |
* @param string $version The version of this plugin.
|
49 |
*/
|
50 |
protected $ga_id;
|
51 |
-
|
52 |
protected $ga_LC;
|
53 |
-
|
54 |
protected $ga_eeT;
|
|
|
55 |
|
56 |
-
public function __construct(
|
57 |
|
58 |
$this->plugin_name = $plugin_name;
|
59 |
$this->version = $version;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
|
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
/**
|
64 |
* Register the stylesheets for the admin area.
|
65 |
*
|
@@ -68,18 +126,17 @@ class Enhanced_Ecommerce_Google_Analytics_Admin {
|
|
68 |
public function enqueue_styles() {
|
69 |
|
70 |
$screen = get_current_screen();
|
71 |
-
if (
|
72 |
-
wp_register_style('font_awesome','//use.fontawesome.com/releases/v5.0.13/css/all.css');
|
73 |
wp_enqueue_style('font_awesome');
|
74 |
wp_register_style('aga_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css');
|
75 |
wp_enqueue_style('aga_bootstrap');
|
76 |
wp_register_style('aga_confirm', '//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.css');
|
77 |
wp_enqueue_style('aga_confirm');
|
78 |
-
wp_enqueue_style(
|
79 |
}
|
80 |
-
|
81 |
-
|
82 |
}
|
|
|
83 |
/**
|
84 |
* Register the JavaScript for the admin area.
|
85 |
*
|
@@ -88,14 +145,14 @@ class Enhanced_Ecommerce_Google_Analytics_Admin {
|
|
88 |
public function enqueue_scripts() {
|
89 |
|
90 |
$screen = get_current_screen();
|
91 |
-
if (
|
92 |
wp_register_script('popper_bootstrap', '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js');
|
93 |
wp_enqueue_script('popper_bootstrap');
|
94 |
wp_register_script('aga_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js');
|
95 |
wp_enqueue_script('aga_bootstrap');
|
96 |
wp_register_script('aga_confirm_js', '//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js');
|
97 |
wp_enqueue_script('aga_confirm_js');
|
98 |
-
wp_enqueue_script(
|
99 |
}
|
100 |
}
|
101 |
|
@@ -106,17 +163,9 @@ class Enhanced_Ecommerce_Google_Analytics_Admin {
|
|
106 |
*/
|
107 |
public function display_admin_page() {
|
108 |
add_menu_page(
|
109 |
-
|
110 |
-
'Tatvic EE Plugin',
|
111 |
-
'manage_options',
|
112 |
-
"enhanced-ecommerce-google-analytics-admin-display",
|
113 |
-
array($this,'showPage'),
|
114 |
-
plugin_dir_url(__FILE__) . 'images/tatvic_logo.png',
|
115 |
-
26
|
116 |
);
|
117 |
-
|
118 |
}
|
119 |
-
|
120 |
/**
|
121 |
* Display Tab page.
|
122 |
*
|
@@ -124,13 +173,12 @@ class Enhanced_Ecommerce_Google_Analytics_Admin {
|
|
124 |
*/
|
125 |
public function showPage() {
|
126 |
require_once( 'partials/enhanced-ecommerce-google-analytics-admin-display.php');
|
127 |
-
if(!empty($_GET['tab'])){
|
128 |
$get_action = $_GET['tab'];
|
129 |
-
}
|
130 |
-
else{
|
131 |
$get_action = "general_settings";
|
132 |
}
|
133 |
-
if(method_exists($this, $get_action)) {
|
134 |
$this->$get_action();
|
135 |
}
|
136 |
}
|
@@ -150,5 +198,33 @@ class Enhanced_Ecommerce_Google_Analytics_Admin {
|
|
150 |
public function about_plugin() {
|
151 |
require_once( 'partials/about-plugin.php');
|
152 |
}
|
|
|
|
|
|
|
|
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
}
|
20 |
* @subpackage Enhanced_Ecommerce_Google_Analytics/admin
|
21 |
* @author Chiranjiv Pathak <chiranjiv@tatvic.com>
|
22 |
*/
|
23 |
+
//require __DIR__ . '../includes/setup/CustomerClient.php';
|
24 |
+
|
25 |
class Enhanced_Ecommerce_Google_Analytics_Admin {
|
26 |
|
27 |
/**
|
50 |
* @param string $version The version of this plugin.
|
51 |
*/
|
52 |
protected $ga_id;
|
|
|
53 |
protected $ga_LC;
|
|
|
54 |
protected $ga_eeT;
|
55 |
+
protected $customerClient;
|
56 |
|
57 |
+
public function __construct($plugin_name, $version) {
|
58 |
|
59 |
$this->plugin_name = $plugin_name;
|
60 |
$this->version = $version;
|
61 |
+
if(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
|
62 |
+
$protocol = 'https://';
|
63 |
+
} else {
|
64 |
+
$protocol = 'http://';
|
65 |
+
}
|
66 |
+
$server_name = $_SERVER['SERVER_NAME'];
|
67 |
+
$domain = $protocol.$server_name;
|
68 |
+
$country = (!empty($woo_country)) ? $woo_country[0] : 'US';
|
69 |
+
$currency_code = $this->get_currency_code();
|
70 |
+
$timezone = get_option('timezone_string');
|
71 |
+
//sigin with google
|
72 |
+
$this->returnUrl = "estorenew.tatvic.com/tat_ee/ads-analytics-form.php?domain=".$domain."&country=".$country."&user_currency=".$currency_code."&timezone".$timezone;
|
73 |
+
$this->accessToken = $_GET['access_token'];
|
74 |
+
$this->refreshToken = $_GET['refresh_token'];
|
75 |
+
$this->email = $_GET['email'];
|
76 |
+
|
77 |
+
if(isset($_GET['property_id']) && isset($_GET['ads_id'])) {
|
78 |
+
$data = unserialize(get_option('ee_options'));
|
79 |
+
if(isset($data['ga_id']) && ($data['ga_id'] != $_GET['property_id'])) {
|
80 |
+
$_POST['ga_id'] = $_GET['property_id'];
|
81 |
+
$_POST['ads_id'] = $_GET['ads_id'];
|
82 |
+
} else if(isset($data['ga_id']) && ($data['ga_id'] == $_GET['property_id'])) {
|
83 |
+
if($_GET['ads_id'] != '') {
|
84 |
+
$_POST['ga_id'] = $_GET['property_id'];
|
85 |
+
$_POST['ads_id'] = $_GET['ads_id'];
|
86 |
+
} else {
|
87 |
+
$_POST['ga_id'] = $_GET['property_id'];
|
88 |
+
}
|
89 |
+
} else {
|
90 |
+
$_POST['ga_id'] = $_GET['property_id'];
|
91 |
+
$_POST['ads_id'] = $_GET['ads_id'];
|
92 |
+
}
|
93 |
+
|
94 |
+
Enhanced_Ecommerce_Google_Settings::update_analytics_options('ee_options');
|
95 |
+
}
|
96 |
|
97 |
+
$this->url = "https://estorenew.tatvic.com/tat_ee/ga_rdr_ee.php?return_url=" . $this->returnUrl;
|
98 |
}
|
99 |
|
100 |
+
/**
|
101 |
+
* @return array
|
102 |
+
* Get woocommerce default set country
|
103 |
+
*/
|
104 |
+
private function woo_country(){
|
105 |
+
// The country/state
|
106 |
+
$store_raw_country = get_option( 'woocommerce_default_country' );
|
107 |
+
// Split the country/state
|
108 |
+
$split_country = explode( ":", $store_raw_country );
|
109 |
+
return $split_country;
|
110 |
+
}
|
111 |
+
/**
|
112 |
+
* @return mixed
|
113 |
+
*/
|
114 |
+
private function get_currency_code(){
|
115 |
+
$woo_country = $this->woo_country();
|
116 |
+
$country = (!empty($woo_country)) ? $woo_country[0] : 'US';
|
117 |
+
$getCurrency = file_get_contents(ENHANCAD_PLUGIN_DIR . '/includes/json/currency.json');
|
118 |
+
$contData = json_decode($getCurrency);
|
119 |
+
return $contData->{$country};
|
120 |
+
}
|
121 |
/**
|
122 |
* Register the stylesheets for the admin area.
|
123 |
*
|
126 |
public function enqueue_styles() {
|
127 |
|
128 |
$screen = get_current_screen();
|
129 |
+
if ($screen->id == 'toplevel_page_enhanced-ecommerce-google-analytics-admin-display' || (isset($_GET['page']) && $_GET['page'] == 'enhanced-ecommerce-google-analytics-admin-display')) {
|
130 |
+
wp_register_style('font_awesome', '//use.fontawesome.com/releases/v5.0.13/css/all.css');
|
131 |
wp_enqueue_style('font_awesome');
|
132 |
wp_register_style('aga_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css');
|
133 |
wp_enqueue_style('aga_bootstrap');
|
134 |
wp_register_style('aga_confirm', '//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.css');
|
135 |
wp_enqueue_style('aga_confirm');
|
136 |
+
wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/enhanced-ecommerce-google-analytics-admin.css', array(), $this->version, 'all');
|
137 |
}
|
|
|
|
|
138 |
}
|
139 |
+
|
140 |
/**
|
141 |
* Register the JavaScript for the admin area.
|
142 |
*
|
145 |
public function enqueue_scripts() {
|
146 |
|
147 |
$screen = get_current_screen();
|
148 |
+
if ($screen->id == 'toplevel_page_enhanced-ecommerce-google-analytics-admin-display' || (isset($_GET['page']) && $_GET['page'] == 'enhanced-ecommerce-google-analytics-admin-display')) {
|
149 |
wp_register_script('popper_bootstrap', '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js');
|
150 |
wp_enqueue_script('popper_bootstrap');
|
151 |
wp_register_script('aga_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js');
|
152 |
wp_enqueue_script('aga_bootstrap');
|
153 |
wp_register_script('aga_confirm_js', '//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js');
|
154 |
wp_enqueue_script('aga_confirm_js');
|
155 |
+
wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/enhanced-ecommerce-google-analytics-admin.js', array('jquery'), $this->version, false);
|
156 |
}
|
157 |
}
|
158 |
|
163 |
*/
|
164 |
public function display_admin_page() {
|
165 |
add_menu_page(
|
166 |
+
'Tatvic EE Plugin', 'Tatvic EE Plugin', 'manage_options', "enhanced-ecommerce-google-analytics-admin-display", array($this, 'showPage'), plugin_dir_url(__FILE__) . 'images/tatvic_logo.png', 26
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
);
|
|
|
168 |
}
|
|
|
169 |
/**
|
170 |
* Display Tab page.
|
171 |
*
|
173 |
*/
|
174 |
public function showPage() {
|
175 |
require_once( 'partials/enhanced-ecommerce-google-analytics-admin-display.php');
|
176 |
+
if (!empty($_GET['tab'])) {
|
177 |
$get_action = $_GET['tab'];
|
178 |
+
} else {
|
|
|
179 |
$get_action = "general_settings";
|
180 |
}
|
181 |
+
if (method_exists($this, $get_action)) {
|
182 |
$this->$get_action();
|
183 |
}
|
184 |
}
|
198 |
public function about_plugin() {
|
199 |
require_once( 'partials/about-plugin.php');
|
200 |
}
|
201 |
+
public function country_location() {
|
202 |
+
// date function to hide 30% off sale after certain date
|
203 |
+
return date_default_timezone_set('Australia/Sydney'); // Change this depending on what timezone your in
|
204 |
+
}
|
205 |
|
206 |
+
public function today() {
|
207 |
+
$this->country_location();
|
208 |
+
return strtotime(date('Y-m-d'));
|
209 |
+
}
|
210 |
+
|
211 |
+
public function current_time() {
|
212 |
+
$this->country_location();
|
213 |
+
return strtotime(date('h:i A'));
|
214 |
+
}
|
215 |
+
|
216 |
+
public function start_date() {
|
217 |
+
$this->country_location();
|
218 |
+
return strtotime(date('Y') . '-09-01');
|
219 |
+
}
|
220 |
+
|
221 |
+
public function end_date() {
|
222 |
+
$this->country_location();
|
223 |
+
return strtotime(date('Y') . '-09-08');
|
224 |
+
}
|
225 |
+
|
226 |
+
public function end_time() {
|
227 |
+
$this->country_location();
|
228 |
+
return strtotime('11:59 PM');
|
229 |
+
}
|
230 |
}
|
admin/class-enhanced-ecommerce-google-analytics-settings.php
CHANGED
@@ -64,6 +64,30 @@ class Enhanced_Ecommerce_Google_Settings {
|
|
64 |
self::admin_notice__success();
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
private static function admin_notice__success() {
|
68 |
$class = 'notice notice-success';
|
69 |
$message = __( 'Your settings have been saved.', 'sample-text-domain' );
|
@@ -77,4 +101,4 @@ class Enhanced_Ecommerce_Google_Settings {
|
|
77 |
</div>
|
78 |
';
|
79 |
}
|
80 |
-
}
|
64 |
self::admin_notice__success();
|
65 |
}
|
66 |
|
67 |
+
public static function update_analytics_options($settings) {
|
68 |
+
$get_ee_settings = unserialize(get_option($settings));
|
69 |
+
|
70 |
+
if(is_array($get_ee_settings)) {
|
71 |
+
foreach ($get_ee_settings as $key => $value) {
|
72 |
+
if(!isset($_POST[$key])){
|
73 |
+
$_POST[$key] = $value;
|
74 |
+
}
|
75 |
+
if( $_POST[$key] != $value && $value != '') {
|
76 |
+
$get_ee_settings[$key] = $_POST[$key];
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
if(is_array($_POST)) {
|
81 |
+
foreach($_POST as $key=>$value){
|
82 |
+
if(!array_key_exists($key,$get_ee_settings)){
|
83 |
+
$get_ee_settings[$key] = $value;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
87 |
+
update_option($settings, serialize( $get_ee_settings ));
|
88 |
+
}
|
89 |
+
|
90 |
+
|
91 |
private static function admin_notice__success() {
|
92 |
$class = 'notice notice-success';
|
93 |
$message = __( 'Your settings have been saved.', 'sample-text-domain' );
|
101 |
</div>
|
102 |
';
|
103 |
}
|
104 |
+
}
|
admin/css/enhanced-ecommerce-google-analytics-admin.css
CHANGED
@@ -65,6 +65,20 @@ h5{
|
|
65 |
.banner{
|
66 |
width:100%;
|
67 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
@media only screen and (min-width: 1920px){
|
70 |
.container{
|
@@ -98,9 +112,10 @@ h5{
|
|
98 |
}
|
99 |
.new-img-blink-side{
|
100 |
width: 40px;
|
101 |
-
height:
|
102 |
}
|
103 |
-
|
|
|
104 |
.rating {
|
105 |
unicode-bidi: bidi-override;
|
106 |
direction: rtl;
|
@@ -115,4 +130,27 @@ h5{
|
|
115 |
.rating > span:hover ~ span:before {
|
116 |
content: "\2605";
|
117 |
position: absolute;
|
118 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
.banner{
|
66 |
width:100%;
|
67 |
}
|
68 |
+
.banner-new {
|
69 |
+
background: #253574;
|
70 |
+
margin-left: 10px;
|
71 |
+
padding: 10px;
|
72 |
+
}
|
73 |
+
.banner-new p {
|
74 |
+
color: #fff;
|
75 |
+
text-align: center;
|
76 |
+
font-size: 20px;
|
77 |
+
margin-bottom: 0;
|
78 |
+
}
|
79 |
+
.banner-new a {color: #fff;}
|
80 |
+
.clickhere-txt {vertical-align: middle;display: grid;}
|
81 |
+
.clickhere-txt a{font-size: 12px;text-decoration: underline;}
|
82 |
}
|
83 |
@media only screen and (min-width: 1920px){
|
84 |
.container{
|
112 |
}
|
113 |
.new-img-blink-side{
|
114 |
width: 40px;
|
115 |
+
height: 25px;
|
116 |
}
|
117 |
+
.banner-blink{width: 60px;
|
118 |
+
height: 35px;}
|
119 |
.rating {
|
120 |
unicode-bidi: bidi-override;
|
121 |
direction: rtl;
|
130 |
.rating > span:hover ~ span:before {
|
131 |
content: "\2605";
|
132 |
position: absolute;
|
133 |
+
}
|
134 |
+
.oauth-container{
|
135 |
+
display: inline-block;
|
136 |
+
width: 100%;
|
137 |
+
max-width: 100%;
|
138 |
+
padding: 5px;
|
139 |
+
border: 1px solid #bfbfbf;
|
140 |
+
height: 45px;
|
141 |
+
border-radius: 5px;
|
142 |
+
background-color: #fff;
|
143 |
+
}
|
144 |
+
.ee-oauth-container{
|
145 |
+
display: inline-block;
|
146 |
+
width: 50%;
|
147 |
+
max-width: 100%;
|
148 |
+
padding: 5px;
|
149 |
+
border: 1px solid #bfbfbf;
|
150 |
+
height: 45px;
|
151 |
+
border-radius: 5px;
|
152 |
+
background-color: #fff;
|
153 |
+
}
|
154 |
+
.left {
|
155 |
+
float: left;
|
156 |
+
}
|
admin/images/discount.gif
ADDED
Binary file
|
admin/partials/about-plugin.php
CHANGED
@@ -1,5 +1,11 @@
|
|
1 |
<?php
|
2 |
$message = new Enhanced_Ecommerce_Google_Settings();
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
?>
|
4 |
|
5 |
<style>
|
@@ -121,7 +127,12 @@ $message = new Enhanced_Ecommerce_Google_Settings();
|
|
121 |
<td><i class="fa fa-check"></i></td>
|
122 |
</tr>
|
123 |
<tr>
|
124 |
-
<td class="option">
|
|
|
|
|
|
|
|
|
|
|
125 |
<td><i class="fa fa-times"></i></td>
|
126 |
<td><i class="fa fa-check"></i></td>
|
127 |
</tr>
|
@@ -150,11 +161,15 @@ $message = new Enhanced_Ecommerce_Google_Settings();
|
|
150 |
<tr>
|
151 |
<th class="w-25"></th>
|
152 |
<th class="w-25"></th>
|
153 |
-
<th class=""><a href="https://codecanyon.net/item/actionable-google-analytics-for-woocommerce/9899552?utm_source=TatvicEE&utm_medium=DashboardBuyBottom&utm_campaign=WPlisting" target="_blank"><button class="btn btn-primary"><strong>
|
|
|
|
|
|
|
|
|
154 |
</tr>
|
155 |
</tfoot>
|
156 |
</table>
|
157 |
-
<p class="description" style="font-size: 15px;"><strong>Feel free to contact us regarding premium version inquiry at <span style="color:blue;font-size:15px;">analytics2@tatvic.com<span></strong>.<br/>
|
158 |
</div>
|
159 |
</div>
|
160 |
</div>
|
1 |
<?php
|
2 |
$message = new Enhanced_Ecommerce_Google_Settings();
|
3 |
+
$obj = new Enhanced_Ecommerce_Google_Analytics_Admin($plugin_name = 'enhanced-e-commerce-for-woocommerce-store', $version = PLUGIN_NAME_VERSION);
|
4 |
+
$today = $obj->today();
|
5 |
+
$start = $obj->start_date();
|
6 |
+
$end = $obj->end_date();
|
7 |
+
$currentime = $obj->current_time();
|
8 |
+
$endtime = $obj->end_time();
|
9 |
?>
|
10 |
|
11 |
<style>
|
127 |
<td><i class="fa fa-check"></i></td>
|
128 |
</tr>
|
129 |
<tr>
|
130 |
+
<td class="option">20 Ready to Use Custom Dimensions/ Metrics</td>
|
131 |
+
<td><i class="fa fa-times"></i></td>
|
132 |
+
<td><i class="fa fa-check"></i></td>
|
133 |
+
</tr>
|
134 |
+
<tr>
|
135 |
+
<td class="option">Premium Support</td>
|
136 |
<td><i class="fa fa-times"></i></td>
|
137 |
<td><i class="fa fa-check"></i></td>
|
138 |
</tr>
|
161 |
<tr>
|
162 |
<th class="w-25"></th>
|
163 |
<th class="w-25"></th>
|
164 |
+
<th class=""><a href="https://codecanyon.net/item/actionable-google-analytics-for-woocommerce/9899552?utm_source=TatvicEE&utm_medium=DashboardBuyBottom&utm_campaign=WPlisting" target="_blank"><button class="btn btn-primary"><strong>Get premium plugin</strong>
|
165 |
+
<?php if($today >= $start && $today <= $end && $currentime <= $endtime) {?>
|
166 |
+
<img class="new-img-blink-side" src='<?php echo plugins_url('../images/discount.gif', __FILE__ ) ?>' />
|
167 |
+
<?php }?>
|
168 |
+
</button></a></th>
|
169 |
</tr>
|
170 |
</tfoot>
|
171 |
</table>
|
172 |
+
<p class="description" style="font-size: 15px;"><strong>Feel free to contact us regarding premium version inquiry at <span style="color:blue;font-size:15px;">analytics2@tatvic.com<span></strong>.<br/>Agencies & Marketers can also contact us for the bulk licenses for their clients.</p>
|
173 |
</div>
|
174 |
</div>
|
175 |
</div>
|
admin/partials/enhanced-ecommerce-google-analytics-admin-display.php
CHANGED
@@ -32,15 +32,30 @@ else{
|
|
32 |
if(empty($_GET['tab'])){
|
33 |
$general_class_active = "active";
|
34 |
}
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
37 |
?>
|
38 |
<header class='background-color:#E8E8E8;height:500px;width:auto;margin-top:100px;margin-left:20px;'>
|
39 |
<img class ="banner" src='<?php echo plugins_url('../images/banner.png', __FILE__ ) ?>' style="margin-left:10px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
</header>
|
41 |
<ul class="nav nav-tabs nav-pills" style="margin-left: 10px;margin-top:20px;">
|
42 |
<li class="nav-item">
|
43 |
<a href="<?php echo $site_url.'general_settings'; ?>" class="border-left aga-tab nav-link <?php echo $general_class_active; ?>">General Settings</a>
|
44 |
</li>
|
45 |
-
|
|
|
|
|
|
|
|
|
46 |
</ul>
|
32 |
if(empty($_GET['tab'])){
|
33 |
$general_class_active = "active";
|
34 |
}
|
35 |
+
// date function to hide 30% off sale after certain date
|
36 |
+
$obj = new Enhanced_Ecommerce_Google_Analytics_Admin($plugin_name = 'enhanced-e-commerce-for-woocommerce-store', $version = PLUGIN_NAME_VERSION);
|
37 |
+
$today = $obj->today();
|
38 |
+
$start = $obj->start_date();
|
39 |
+
$end = $obj->end_date();
|
40 |
+
$currentime = $obj->current_time();
|
41 |
+
$endtime = $obj->end_time();
|
42 |
?>
|
43 |
<header class='background-color:#E8E8E8;height:500px;width:auto;margin-top:100px;margin-left:20px;'>
|
44 |
<img class ="banner" src='<?php echo plugins_url('../images/banner.png', __FILE__ ) ?>' style="margin-left:10px;">
|
45 |
+
<?php if($today >= $start && $today <= $end && $currentime <= $endtime) { ?>
|
46 |
+
<div class="banner-new">
|
47 |
+
<p><img class="banner-blink" src='<?php echo plugins_url('../images/discount.gif', __FILE__ ) ?>' /> On the Premium Version Till 8th Sept 2020</p>
|
48 |
+
<p class="clickhere-txt"><a href="https://codecanyon.net/item/actionable-google-analytics-for-woocommerce/9899552?utm_source=TatvicEE&utm_medium=DashboardBanner&utm_campaign=SeptCamp" target="_blank">Click here</a></p>
|
49 |
+
</div>
|
50 |
+
<?php } ?>
|
51 |
</header>
|
52 |
<ul class="nav nav-tabs nav-pills" style="margin-left: 10px;margin-top:20px;">
|
53 |
<li class="nav-item">
|
54 |
<a href="<?php echo $site_url.'general_settings'; ?>" class="border-left aga-tab nav-link <?php echo $general_class_active; ?>">General Settings</a>
|
55 |
</li>
|
56 |
+
<?php if($today >= $start && $today <= $end && $currentime <= $endtime) {?>
|
57 |
+
<li class="nav-item"><a href="<?php echo $site_url.'about_plugin'; ?>" class="border-left aga-tab nav-link <?php echo $advanced_class_active; ?>">Premium <img class="new-img-blink" src='<?php echo plugins_url('../images/discount.gif', __FILE__ ) ?>' /></a></li>
|
58 |
+
<?php } else { ?>
|
59 |
+
<li class="nav-item"><a href="<?php echo $site_url.'about_plugin'; ?>" class="border-left aga-tab nav-link <?php echo $advanced_class_active; ?>">Premium <img class="new-img-blink" src='<?php echo plugins_url('../images/new-2.gif', __FILE__ ) ?>' /></a></li>
|
60 |
+
<?php } ?>
|
61 |
</ul>
|
admin/partials/general-fields.php
CHANGED
@@ -9,108 +9,157 @@ $data = unserialize(get_option('ee_options'));
|
|
9 |
<div class="row" style="margin-left:-11%; !important;">
|
10 |
<div class= "col col-9" >
|
11 |
<div class="card mw-100" style="padding:0px;">
|
12 |
-
<?php
|
13 |
<div class="card-header">
|
14 |
<h3>Enhanced Ecommerce Google Analytics <a href = "https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/" target="_blank" style="float: right">
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
</h3>
|
20 |
</div>
|
21 |
<div class="card-body">
|
22 |
<form id="ee_plugin_form" method="post" action="" enctype="multipart/form-data" >
|
23 |
<table class="table table-bordered">
|
24 |
<tbody>
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
<?php
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
</tbody>
|
116 |
</table>
|
@@ -121,6 +170,6 @@ $data = unserialize(get_option('ee_options'));
|
|
121 |
</div>
|
122 |
</div>
|
123 |
</div>
|
124 |
-
<?php require_once('sidebar.php')
|
125 |
</div>
|
126 |
-
</div>
|
9 |
<div class="row" style="margin-left:-11%; !important;">
|
10 |
<div class= "col col-9" >
|
11 |
<div class="card mw-100" style="padding:0px;">
|
12 |
+
<?php $message->show_message(); ?>
|
13 |
<div class="card-header">
|
14 |
<h3>Enhanced Ecommerce Google Analytics <a href = "https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/" target="_blank" style="float: right">
|
15 |
+
<div class="rating">
|
16 |
+
<span>☆</span><span>☆</span><span>☆</span><span>☆</span><span>☆</span>
|
17 |
+
</div>
|
18 |
+
</a>
|
19 |
</h3>
|
20 |
</div>
|
21 |
<div class="card-body">
|
22 |
<form id="ee_plugin_form" method="post" action="" enctype="multipart/form-data" >
|
23 |
<table class="table table-bordered">
|
24 |
<tbody>
|
25 |
+
<tr>
|
26 |
+
<td>
|
27 |
+
<label class="align-middle" for="woocommerce_ee_google_analytics_ga_id">Google Analytics ID</label>
|
28 |
+
</td>
|
29 |
+
<td>
|
30 |
+
<!-- <input type="text" id="ga_id" name = "ga_id" required = "required" value="--><?php //echo $data['ga_id']; ?><!--">-->
|
31 |
+
<!-- <i style="cursor: help;" class="fas fa-question-circle" title="Enter your Google Analytics ID here. You can login into your Google Analytics account to find your ID. e.g. UA-XXXXXX-XX"></i>-->
|
32 |
+
|
33 |
+
<?php if(isset($data['ga_id']) && $data['ga_id'] != '') { ?>
|
34 |
+
<input style="border: none;box-shadow: none;width: 35%;" type="text" id="ga_id" name = "ga_id" required = "required" disabled value="<?= $data['ga_id']; ?>"/>
|
35 |
+
<p class="hint-text" style="color: #666;display: inline-block;float: right;padding-top: 5px;">To update analytics id, <a target="_blank" href="<?=esc_url($this->url)?>">click here</a></p>
|
36 |
+
<?php } else {?>
|
37 |
+
<!--signin with google-->
|
38 |
+
<a target="_blank" class="ee-oauth-container btn darken-4 white black-text" href="<?=esc_url($this->url)?>" style="text-transform:none">
|
39 |
+
<div class="left">
|
40 |
+
<img width="20px" style="margin-top:7px; margin-right:8px" alt="Google sign-in"
|
41 |
+
src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.svg.png" />
|
42 |
+
</div>
|
43 |
+
<p style="font-size: inherit; margin-top:5px; margin-right:8px; ">Sign In With Google</p>
|
44 |
+
</a>
|
45 |
+
<!--sigin with google end-->
|
46 |
+
<?php } ?>
|
47 |
+
</td>
|
48 |
+
|
49 |
+
</tr>
|
50 |
+
<tr>
|
51 |
+
<td>
|
52 |
+
<label class="align-middle" for="woocommerce_ee_google_analytics_ads_id">Linked Google Ads Account <i style="cursor: help;" class="fas fa-question-circle" title="To link Google Ads and Google Analytics, you’ll need administrative access to a Google Ads account and “Edit permissions” to a Google Analytics account.
|
53 |
+
Why link Google Ads and Analytics account?
|
54 |
+
When you link Google Ads and Analytics, you can:
|
55 |
+
See ad and site performance data in the Google Ads reports in Analytics.
|
56 |
+
Import Analytics goals and Ecommerce transactions into your Google Ads account.
|
57 |
+
Import cross-device conversions into your Google Ads account when you activate Google signals.
|
58 |
+
Import Analytics metrics like Bounce Rate, Avg. Session Duration, and Pages/Session into your Google Ads account.
|
59 |
+
Enhance your Google Ads remarketing with Analytics Remarketing and Dynamic Remarketing.
|
60 |
+
Get richer data in the Analytics Multi-Channel Funnels reports."></i></label>
|
61 |
+
</td>
|
62 |
+
<td>
|
63 |
+
<!-- <input type="text" id="ga_id" name = "ga_id" required = "required" value="--><?php //echo $data['ga_id']; ?><!--">-->
|
64 |
+
<!-- <i style="cursor: help;" class="fas fa-question-circle" title="Enter your Google Analytics ID here. You can login into your Google Analytics account to find your ID. e.g. UA-XXXXXX-XX"></i>-->
|
65 |
+
|
66 |
+
<?php if(isset($data['ads_id']) && $data['ads_id'] != '') { ?>
|
67 |
+
<input style="border: none;box-shadow: none;width: 35%;" type="text" id="ads_id" name = "ads_id" disabled value="<?= $data['ads_id']; ?>"/>
|
68 |
+
<p class="hint-text" style="color: #666;display: inline-block;float: right;padding-top: 5px;">To update ads account id, <a target="_blank" href="<?=esc_url($this->url)?>">click here</a></p>
|
69 |
+
<?php } else {?>
|
70 |
+
<!--signin with google-->
|
71 |
+
<a target="_blank" class="ee-oauth-container btn darken-4 white black-text" href="<?=esc_url($this->url)?>" style="text-transform:none">
|
72 |
+
<div class="left">
|
73 |
+
<img width="20px" style="margin-top:7px; margin-right:8px" alt="Google sign-in"
|
74 |
+
src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.svg.png" />
|
75 |
+
</div>
|
76 |
+
<p style="font-size: inherit; margin-top:5px; margin-right:8px; ">Sign In With Google</p>
|
77 |
+
</a>
|
78 |
+
<!--sigin with google end-->
|
79 |
+
<?php } ?>
|
80 |
+
</td>
|
81 |
+
|
82 |
+
</tr>
|
83 |
+
<tr>
|
84 |
+
<td>
|
85 |
+
<label class="align-middle" for="tracking_code">Tracking Code</label>
|
86 |
+
</td>
|
87 |
+
<td>
|
88 |
+
<label class = "align-middle" for="ga_code">
|
89 |
+
<?php $ga_ST = !empty($data['ga_ST']) ? 'checked' : ''; ?>
|
90 |
+
<input type="checkbox" name="ga_ST" id="ga_ST" <?php echo $ga_ST; ?> >
|
91 |
+
Add Global Site Tracking Code 'gtag.js'
|
92 |
+
<i style="cursor: help;" class="fas fa-question-circle" title="This feature adds new gtag.js tracking code to your store. You don't need to enable this if gtag.js is implemented via any third party analytics plugin."></i>
|
93 |
+
<!--<p class="description">This feature adds new gtag.js tracking code to your store. You don't need to enable this if gtag.js is implemented via any third party analytics plugin.</p>-->
|
94 |
+
</label><br/>
|
95 |
+
<label class = "align-middle" for="ga_enhance_ecommerce">
|
96 |
+
<?php $ga_eeT = !empty($data['ga_eeT']) ? 'checked' : ''; ?>
|
97 |
+
<input type="checkbox" name="ga_eeT" id="ga_eeT" <?php echo $ga_eeT; ?> >
|
98 |
+
Add Enhanced Ecommerce Tracking Code
|
99 |
+
<i style="cursor: help;" class="fas fa-question-circle" title="This feature adds Enhanced Ecommerce Tracking Code to your Store"></i>
|
100 |
+
<!--<p class="description">This feature adds Enhanced Ecommerce Tracking Code to your Store</p>-->
|
101 |
+
</label><br/>
|
102 |
+
<label class = "align-middle" for="ga_login_step">
|
103 |
+
<?php $ga_gUser = !empty($data['ga_gUser']) ? 'checked' : ''; ?>
|
104 |
+
<input type="checkbox" name="ga_gUser" id="ga_gUser" <?php echo $ga_gUser; ?> >
|
105 |
+
Add Code to Track the Login Step of Guest Users (Optional)
|
106 |
+
<i style="cursor: help;" class="fas fa-question-circle" title="If you have Guest Check out enable, we recommend you to add this code"></i>
|
107 |
+
<!--<p class="description">If you have Guest Check out enable, we recommend you to add this code</p>-->
|
108 |
+
</label><br/>
|
109 |
+
</td>
|
110 |
+
</tr>
|
111 |
+
<tr>
|
112 |
+
<td>
|
113 |
+
<label for="ga_Impr">Impression Thresold</label>
|
114 |
+
</td>
|
115 |
+
<td>
|
116 |
+
<?php $ga_Impr = !empty($data['ga_Impr']) ? $data['ga_Impr'] : 6; ?>
|
117 |
+
<input type="number" min="1" id="ga_Impr" name = "ga_Impr" value = "<?php echo $ga_Impr; ?>">
|
118 |
+
<i style="cursor: help;" class="fas fa-question-circle" title="This feature sets Impression threshold for category page. It sends hit after these many numbers of products impressions."></i>
|
119 |
+
<p class="description"><br><b>Note : To avoid processing load on server we recommend upto 6 Impression Thresold.</b></p>
|
120 |
+
</td>
|
121 |
+
</tr>
|
122 |
+
<tr>
|
123 |
+
<td>
|
124 |
+
<label class = "align-middle" for="ga_IPA">I.P. Anoymization</label>
|
125 |
+
</td>
|
126 |
+
<td>
|
127 |
+
<label class = "align-middle" for="ga_IPA">
|
128 |
+
<?php $ga_IPA = !empty($data['ga_IPA']) ? 'checked' : ''; ?>
|
129 |
+
<input class="" type="checkbox" name="ga_IPA" id="ga_IPA" <?php echo $ga_IPA; ?>>
|
130 |
+
Enable I.P. Anonymization
|
131 |
+
<i style="cursor: help;" class="fas fa-question-circle" title="Use this feature to anonymize (or stop collecting) the I.P Address of your users in Google Analytics. Be in legal compliance by using I.P Anonymization which is important for EU countries As per the GDPR compliance"></i>
|
132 |
+
<!-- <p class="description">Use this feature to anonymize (or stop collecting) the I.P Address of your users in Google Analytics. Be in legal compliance by using I.P Anonymization which is important for EU countries As per the GDPR compliance</p>-->
|
133 |
+
</label>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
<tr>
|
137 |
+
<td>
|
138 |
+
<label class = "align-middle" for="ga_OPTOUT">Google Analytics Opt Out</label>
|
139 |
+
</td>
|
140 |
+
<td>
|
141 |
+
<label class = "align-middle" for="ga_OPTOUT">
|
142 |
+
<?php $ga_OPTOUT = !empty($data['ga_OPTOUT']) ? 'checked' : ''; ?>
|
143 |
+
<input class="" type="checkbox" name="ga_OPTOUT" id="ga_OPTOUT" <?php echo $ga_OPTOUT; ?>>
|
144 |
+
Enable Google Analytics Opt Out (Optional)
|
145 |
+
<i style="cursor: help;" class="fas fa-question-circle" title="Use this feature to provide website visitors the ability to prevent their data from being used by Google Analytics As per the GDPR compliance.Go through the documentation to check the setup"></i>
|
146 |
+
<!--<p class="description">Use this feature to provide website visitors the ability to prevent their data from being used by Google Analytics As per the GDPR compliance.Go through the documentation to check the setup</p>-->
|
147 |
+
</label>
|
148 |
+
</td>
|
149 |
+
</tr>
|
150 |
+
<tr>
|
151 |
+
<td>
|
152 |
+
<label class = "align-middle" for="ga_PrivacyPolicy">Privacy Policy</label>
|
153 |
+
</td>
|
154 |
+
<td>
|
155 |
+
<label class = "align-middle" for="ga_PrivacyPolicy">
|
156 |
+
<?php $ga_PrivacyPolicy = !empty($data['ga_PrivacyPolicy']) ? 'checked' : ''; ?>
|
157 |
+
<input type="checkbox" onchange="enableSubmit();" name="ga_PrivacyPolicy" id="ga_PrivacyPolicy" required="required" <?php echo $ga_PrivacyPolicy; ?>>
|
158 |
+
Accept Privacy Policy of Plugin
|
159 |
+
<p class="description">By using Tatvic Plugin, you agree to Tatvic plugin's <a href= "https://www.tatvic.com/privacy-policy/?ref=plugin_policy&utm_source=plugin_backend&utm_medium=woo_premium_plugin&utm_campaign=GDPR_complaince_ecomm_plugins" target="_blank">Privacy Policy</a></p>
|
160 |
+
</label>
|
161 |
+
</td>
|
162 |
+
</tr>
|
163 |
|
164 |
</tbody>
|
165 |
</table>
|
170 |
</div>
|
171 |
</div>
|
172 |
</div>
|
173 |
+
<?php require_once('sidebar.php'); ?>
|
174 |
</div>
|
175 |
+
</div>
|
admin/partials/sidebar.php
CHANGED
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<div class="col col-xs-3">
|
2 |
<div class="card" style="padding: 0px;">
|
3 |
<div class="card-header">
|
@@ -20,10 +29,10 @@
|
|
20 |
<div class="card-body">
|
21 |
<ul style="font-weight: 600">
|
22 |
<li style="padding-bottom:5px;">Do you Like our Plugin? Please Spare few minutes to give <h3><a href = "https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/" target="_blank" style="float: right">
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
</ul>
|
28 |
</div>
|
29 |
</div>
|
@@ -33,9 +42,11 @@
|
|
33 |
</div>
|
34 |
<div class="card-body">
|
35 |
<ul>
|
36 |
-
<li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/woo.png', __FILE__ ) ?>' /> <a href="https://www.tatvic.com/contact/?utm_source=TatvicEE&utm_medium=DashboardFreeTrial&utm_campaign=WPlisting" target="_blank">Get your free trial for 10 days now ! </a> <img class="new-img-blink-side" src='<?php echo plugins_url('../images/new-2.gif', __FILE__ ) ?>' /></li>
|
37 |
<li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/woo.png', __FILE__ ) ?>' /> <a href="https://codecanyon.net/item/actionable-google-analytics-for-woocommerce/9899552?utm_source=TatvicEE&utm_medium=DashboardSide&utm_campaign=WPlisting
|
38 |
-
" target="_blank">Actionable Google Analytics for WooCommerce - Premium Version</a
|
|
|
|
|
|
|
39 |
<li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m1.png', __FILE__ ) ?>' /> <a href="https://1.envato.market/79Oky" target="_blank">Actionable Google Analytics for Magento</a></li>
|
40 |
<li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m2.png', __FILE__ ) ?>' /> <a href="https://marketplace.magento.com/tatvic-actionablegoogleanalytics.html" target="_blank">Actionable Google Analytics for Magento2</a></li>
|
41 |
<li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/shopify_new.png', __FILE__ ) ?>' /> <a href="https://apps.shopify.com/google-universal-analytics-enhanced-ecommerce" target="_blank">Actionable Google Analytics for Shopify</a></li>
|
1 |
+
<?php
|
2 |
+
$obj = new Enhanced_Ecommerce_Google_Analytics_Admin($plugin_name = 'enhanced-e-commerce-for-woocommerce-store', $version = PLUGIN_NAME_VERSION);
|
3 |
+
$today = $obj->today();
|
4 |
+
$start = $obj->start_date();
|
5 |
+
$end = $obj->end_date();
|
6 |
+
$currentime = $obj->current_time();
|
7 |
+
$endtime = $obj->end_time();
|
8 |
+
|
9 |
+
?>
|
10 |
<div class="col col-xs-3">
|
11 |
<div class="card" style="padding: 0px;">
|
12 |
<div class="card-header">
|
29 |
<div class="card-body">
|
30 |
<ul style="font-weight: 600">
|
31 |
<li style="padding-bottom:5px;">Do you Like our Plugin? Please Spare few minutes to give <h3><a href = "https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/" target="_blank" style="float: right">
|
32 |
+
<div class="rating">
|
33 |
+
<span>☆</span><span>☆</span><span>☆</span><span>☆</span><span>☆</span>
|
34 |
+
</div>
|
35 |
+
</a></h3> Rating..!!</li>
|
36 |
</ul>
|
37 |
</div>
|
38 |
</div>
|
42 |
</div>
|
43 |
<div class="card-body">
|
44 |
<ul>
|
|
|
45 |
<li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/woo.png', __FILE__ ) ?>' /> <a href="https://codecanyon.net/item/actionable-google-analytics-for-woocommerce/9899552?utm_source=TatvicEE&utm_medium=DashboardSide&utm_campaign=WPlisting
|
46 |
+
" target="_blank">Actionable Google Analytics for WooCommerce - Premium Version</a>
|
47 |
+
<?php if($today >= $start && $today <= $end && $currentime <= $endtime) {?>
|
48 |
+
<img class="new-img-blink-side" src='<?php echo plugins_url('../images/discount.gif', __FILE__ ) ?>' /><?php } ?></li>
|
49 |
+
<li style="padding-bottom:5px;"><img style="width:25px;height: 25px;" src='<?php echo plugins_url('../images/tatvic_logo.png', __FILE__ ) ?>' /> <a href="https://codecanyon.net/item/google-feed-manager-for-woocommerce-by-tatvic/27104089?utm_source=TatvicEE&utm_medium=Side&utm_campaign=SideGMC" target="_blank">Google Feed Manager For WooCommerce</a></li>
|
50 |
<li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m1.png', __FILE__ ) ?>' /> <a href="https://1.envato.market/79Oky" target="_blank">Actionable Google Analytics for Magento</a></li>
|
51 |
<li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m2.png', __FILE__ ) ?>' /> <a href="https://marketplace.magento.com/tatvic-actionablegoogleanalytics.html" target="_blank">Actionable Google Analytics for Magento2</a></li>
|
52 |
<li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/shopify_new.png', __FILE__ ) ?>' /> <a href="https://apps.shopify.com/google-universal-analytics-enhanced-ecommerce" target="_blank">Actionable Google Analytics for Shopify</a></li>
|
enhanced-ecommerce-google-analytics.php
CHANGED
@@ -15,8 +15,8 @@
|
|
15 |
* @wordpress-plugin
|
16 |
* Plugin Name: Enhanced E-commerce for Woocommerce store
|
17 |
* Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
|
18 |
-
* Description:
|
19 |
-
* Version: 2.3.
|
20 |
* Author: Tatvic
|
21 |
* Author URI: www.tatvic.com
|
22 |
* License: GPL-2.0+
|
@@ -24,7 +24,7 @@
|
|
24 |
* Text Domain: www.tatvic.com
|
25 |
* Domain Path: /languages
|
26 |
* WC requires at least: 1.4.1
|
27 |
-
* WC tested up to: 4.
|
28 |
*/
|
29 |
|
30 |
/**
|
@@ -33,13 +33,17 @@
|
|
33 |
if ( ! defined( 'WPINC' ) ) {
|
34 |
die;
|
35 |
}
|
|
|
|
|
|
|
|
|
36 |
|
37 |
/**
|
38 |
* Currently plugin version.
|
39 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
40 |
* Rename this for your plugin and update it as you release new versions.
|
41 |
*/
|
42 |
-
define( 'PLUGIN_NAME_VERSION', '2.3.
|
43 |
/**
|
44 |
* The code that runs during plugin activation.
|
45 |
* This action is documented in includes/class-enhanced-ecommerce-google-analytics-activator.php
|
15 |
* @wordpress-plugin
|
16 |
* Plugin Name: Enhanced E-commerce for Woocommerce store
|
17 |
* Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
|
18 |
+
* Description: Automates Enhanced Ecommerce tracking in Google Analytics using gtag.js.
|
19 |
+
* Version: 2.3.6
|
20 |
* Author: Tatvic
|
21 |
* Author URI: www.tatvic.com
|
22 |
* License: GPL-2.0+
|
24 |
* Text Domain: www.tatvic.com
|
25 |
* Domain Path: /languages
|
26 |
* WC requires at least: 1.4.1
|
27 |
+
* WC tested up to: 4.6.1
|
28 |
*/
|
29 |
|
30 |
/**
|
33 |
if ( ! defined( 'WPINC' ) ) {
|
34 |
die;
|
35 |
}
|
36 |
+
// Store the directory of the plugin
|
37 |
+
if ( ! defined( 'ENHANCAD_PLUGIN_DIR' ) ) {
|
38 |
+
define( 'ENHANCAD_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
39 |
+
}
|
40 |
|
41 |
/**
|
42 |
* Currently plugin version.
|
43 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
44 |
* Rename this for your plugin and update it as you release new versions.
|
45 |
*/
|
46 |
+
define( 'PLUGIN_NAME_VERSION', '2.3.6' );
|
47 |
/**
|
48 |
* The code that runs during plugin activation.
|
49 |
* This action is documented in includes/class-enhanced-ecommerce-google-analytics-activator.php
|
includes/json/client-secrets.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"web": {
|
3 |
+
"client_id": "929004569091-pq3q5mve6nsmhg5lfu2vu5gq44acfp45.apps.googleusercontent.com",
|
4 |
+
"project_id": "tatvic.com:api-project-929004569091",
|
5 |
+
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
6 |
+
"token_uri": "https://oauth2.googleapis.com/token",
|
7 |
+
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
8 |
+
"client_secret": "fpZsRhxOq4slRF0advdaT6ZS",
|
9 |
+
"manager_customer_id": "6847954029",
|
10 |
+
"manager_refresh_token": "1//0g7GDPfnauJb1CgYIARAAGBASNwF-L9IrqRrwDXC1EZLd_hOzUko6lPxJ-uZ9DlEltKV6QDcY3q9nbDlqFDPFut_2i0vKWGbTtc8",
|
11 |
+
"developer_token": "Pz7O94tto128j0u1Nl7DAg",
|
12 |
+
"redirect_uris": [
|
13 |
+
"https://plugins.tatvic.com/ga_rdr.php",
|
14 |
+
"https://plugins.tatvic.com/tatdev/ga_rdr.php",
|
15 |
+
"https://plugins.tatvic.com/tatprod/ga_rdr.php",
|
16 |
+
"https://plugins.tatvic.com/tat_ga/ga_rdr.php",
|
17 |
+
"https://plugins.tatvic.com/tat_ga/ga_rdr_new.php",
|
18 |
+
"https://plugins.tatvic.com/tat_ga/ga_rdr_ee.php",
|
19 |
+
"https://estorenew.tatvic.com/tat_ee/ga_rdr_ee.php"
|
20 |
+
],
|
21 |
+
"javascript_origins": [
|
22 |
+
"https://plugins.tatvic.com"
|
23 |
+
]
|
24 |
+
}
|
25 |
+
}
|
includes/json/currency.json
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"BD": "BDT",
|
3 |
+
"BE": "EUR",
|
4 |
+
"BF": "XOF",
|
5 |
+
"BG": "BGN",
|
6 |
+
"BA": "BAM",
|
7 |
+
"BB": "BBD",
|
8 |
+
"WF": "XPF",
|
9 |
+
"BL": "EUR",
|
10 |
+
"BM": "BMD",
|
11 |
+
"BN": "BND",
|
12 |
+
"BO": "BOB",
|
13 |
+
"BH": "BHD",
|
14 |
+
"BI": "BIF",
|
15 |
+
"BJ": "XOF",
|
16 |
+
"BT": "BTN",
|
17 |
+
"JM": "JMD",
|
18 |
+
"BV": "NOK",
|
19 |
+
"BW": "BWP",
|
20 |
+
"WS": "WST",
|
21 |
+
"BQ": "USD",
|
22 |
+
"BR": "BRL",
|
23 |
+
"BS": "BSD",
|
24 |
+
"JE": "GBP",
|
25 |
+
"BY": "BYR",
|
26 |
+
"BZ": "BZD",
|
27 |
+
"RU": "RUB",
|
28 |
+
"RW": "RWF",
|
29 |
+
"RS": "RSD",
|
30 |
+
"TL": "USD",
|
31 |
+
"RE": "EUR",
|
32 |
+
"TM": "TMT",
|
33 |
+
"TJ": "TJS",
|
34 |
+
"RO": "RON",
|
35 |
+
"TK": "NZD",
|
36 |
+
"GW": "XOF",
|
37 |
+
"GU": "USD",
|
38 |
+
"GT": "GTQ",
|
39 |
+
"GS": "GBP",
|
40 |
+
"GR": "EUR",
|
41 |
+
"GQ": "XAF",
|
42 |
+
"GP": "EUR",
|
43 |
+
"JP": "JPY",
|
44 |
+
"GY": "GYD",
|
45 |
+
"GG": "GBP",
|
46 |
+
"GF": "EUR",
|
47 |
+
"GE": "GEL",
|
48 |
+
"GD": "XCD",
|
49 |
+
"GB": "GBP",
|
50 |
+
"GA": "XAF",
|
51 |
+
"SV": "USD",
|
52 |
+
"GN": "GNF",
|
53 |
+
"GM": "GMD",
|
54 |
+
"GL": "DKK",
|
55 |
+
"GI": "GIP",
|
56 |
+
"GH": "GHS",
|
57 |
+
"OM": "OMR",
|
58 |
+
"TN": "TND",
|
59 |
+
"JO": "JOD",
|
60 |
+
"HR": "HRK",
|
61 |
+
"HT": "HTG",
|
62 |
+
"HU": "HUF",
|
63 |
+
"HK": "HKD",
|
64 |
+
"HN": "HNL",
|
65 |
+
"HM": "AUD",
|
66 |
+
"VE": "VEF",
|
67 |
+
"PR": "USD",
|
68 |
+
"PS": "ILS",
|
69 |
+
"PW": "USD",
|
70 |
+
"PT": "EUR",
|
71 |
+
"SJ": "NOK",
|
72 |
+
"PY": "PYG",
|
73 |
+
"IQ": "IQD",
|
74 |
+
"PA": "PAB",
|
75 |
+
"PF": "XPF",
|
76 |
+
"PG": "PGK",
|
77 |
+
"PE": "PEN",
|
78 |
+
"PK": "PKR",
|
79 |
+
"PH": "PHP",
|
80 |
+
"PN": "NZD",
|
81 |
+
"PL": "PLN",
|
82 |
+
"PM": "EUR",
|
83 |
+
"ZM": "ZMK",
|
84 |
+
"EH": "MAD",
|
85 |
+
"EE": "EUR",
|
86 |
+
"EG": "EGP",
|
87 |
+
"ZA": "ZAR",
|
88 |
+
"EC": "USD",
|
89 |
+
"IT": "EUR",
|
90 |
+
"VN": "VND",
|
91 |
+
"SB": "SBD",
|
92 |
+
"ET": "ETB",
|
93 |
+
"SO": "SOS",
|
94 |
+
"ZW": "ZWL",
|
95 |
+
"SA": "SAR",
|
96 |
+
"ES": "EUR",
|
97 |
+
"ER": "ERN",
|
98 |
+
"ME": "EUR",
|
99 |
+
"MD": "MDL",
|
100 |
+
"MG": "MGA",
|
101 |
+
"MF": "EUR",
|
102 |
+
"MA": "MAD",
|
103 |
+
"MC": "EUR",
|
104 |
+
"UZ": "UZS",
|
105 |
+
"MM": "MMK",
|
106 |
+
"ML": "XOF",
|
107 |
+
"MO": "MOP",
|
108 |
+
"MN": "MNT",
|
109 |
+
"MH": "USD",
|
110 |
+
"MK": "MKD",
|
111 |
+
"MU": "MUR",
|
112 |
+
"MT": "EUR",
|
113 |
+
"MW": "MWK",
|
114 |
+
"MV": "MVR",
|
115 |
+
"MQ": "EUR",
|
116 |
+
"MP": "USD",
|
117 |
+
"MS": "XCD",
|
118 |
+
"MR": "MRO",
|
119 |
+
"IM": "GBP",
|
120 |
+
"UG": "UGX",
|
121 |
+
"TZ": "TZS",
|
122 |
+
"MY": "MYR",
|
123 |
+
"MX": "MXN",
|
124 |
+
"IL": "ILS",
|
125 |
+
"FR": "EUR",
|
126 |
+
"IO": "USD",
|
127 |
+
"SH": "SHP",
|
128 |
+
"FI": "EUR",
|
129 |
+
"FJ": "FJD",
|
130 |
+
"FK": "FKP",
|
131 |
+
"FM": "USD",
|
132 |
+
"FO": "DKK",
|
133 |
+
"NI": "NIO",
|
134 |
+
"NL": "EUR",
|
135 |
+
"NO": "NOK",
|
136 |
+
"NA": "NAD",
|
137 |
+
"VU": "VUV",
|
138 |
+
"NC": "XPF",
|
139 |
+
"NE": "XOF",
|
140 |
+
"NF": "AUD",
|
141 |
+
"NG": "NGN",
|
142 |
+
"NZ": "NZD",
|
143 |
+
"NP": "NPR",
|
144 |
+
"NR": "AUD",
|
145 |
+
"NU": "NZD",
|
146 |
+
"CK": "NZD",
|
147 |
+
"XK": "EUR",
|
148 |
+
"CI": "XOF",
|
149 |
+
"CH": "CHF",
|
150 |
+
"CO": "COP",
|
151 |
+
"CN": "CNY",
|
152 |
+
"CM": "XAF",
|
153 |
+
"CL": "CLP",
|
154 |
+
"CC": "AUD",
|
155 |
+
"CA": "CAD",
|
156 |
+
"CG": "XAF",
|
157 |
+
"CF": "XAF",
|
158 |
+
"CD": "CDF",
|
159 |
+
"CZ": "CZK",
|
160 |
+
"CY": "EUR",
|
161 |
+
"CX": "AUD",
|
162 |
+
"CR": "CRC",
|
163 |
+
"CW": "ANG",
|
164 |
+
"CV": "CVE",
|
165 |
+
"CU": "CUP",
|
166 |
+
"SZ": "SZL",
|
167 |
+
"SY": "SYP",
|
168 |
+
"SX": "ANG",
|
169 |
+
"KG": "KGS",
|
170 |
+
"KE": "KES",
|
171 |
+
"SS": "SSP",
|
172 |
+
"SR": "SRD",
|
173 |
+
"KI": "AUD",
|
174 |
+
"KH": "KHR",
|
175 |
+
"KN": "XCD",
|
176 |
+
"KM": "KMF",
|
177 |
+
"ST": "STD",
|
178 |
+
"SK": "EUR",
|
179 |
+
"KR": "KRW",
|
180 |
+
"SI": "EUR",
|
181 |
+
"KP": "KPW",
|
182 |
+
"KW": "KWD",
|
183 |
+
"SN": "XOF",
|
184 |
+
"SM": "EUR",
|
185 |
+
"SL": "SLL",
|
186 |
+
"SC": "SCR",
|
187 |
+
"KZ": "KZT",
|
188 |
+
"KY": "KYD",
|
189 |
+
"SG": "SGD",
|
190 |
+
"SE": "SEK",
|
191 |
+
"SD": "SDG",
|
192 |
+
"DO": "DOP",
|
193 |
+
"DM": "XCD",
|
194 |
+
"DJ": "DJF",
|
195 |
+
"DK": "DKK",
|
196 |
+
"VG": "USD",
|
197 |
+
"DE": "EUR",
|
198 |
+
"YE": "YER",
|
199 |
+
"DZ": "DZD",
|
200 |
+
"US": "USD",
|
201 |
+
"UY": "UYU",
|
202 |
+
"YT": "EUR",
|
203 |
+
"UM": "USD",
|
204 |
+
"LB": "LBP",
|
205 |
+
"LC": "XCD",
|
206 |
+
"LA": "LAK",
|
207 |
+
"TV": "AUD",
|
208 |
+
"TW": "TWD",
|
209 |
+
"TT": "TTD",
|
210 |
+
"TR": "TRY",
|
211 |
+
"LK": "LKR",
|
212 |
+
"LI": "CHF",
|
213 |
+
"LV": "EUR",
|
214 |
+
"TO": "TOP",
|
215 |
+
"LT": "LTL",
|
216 |
+
"LU": "EUR",
|
217 |
+
"LR": "LRD",
|
218 |
+
"LS": "LSL",
|
219 |
+
"TH": "THB",
|
220 |
+
"TF": "EUR",
|
221 |
+
"TG": "XOF",
|
222 |
+
"TD": "XAF",
|
223 |
+
"TC": "USD",
|
224 |
+
"LY": "LYD",
|
225 |
+
"VA": "EUR",
|
226 |
+
"VC": "XCD",
|
227 |
+
"AE": "AED",
|
228 |
+
"AD": "EUR",
|
229 |
+
"AG": "XCD",
|
230 |
+
"AF": "AFN",
|
231 |
+
"AI": "XCD",
|
232 |
+
"VI": "USD",
|
233 |
+
"IS": "ISK",
|
234 |
+
"IR": "IRR",
|
235 |
+
"AM": "AMD",
|
236 |
+
"AL": "ALL",
|
237 |
+
"AO": "AOA",
|
238 |
+
"AQ": "",
|
239 |
+
"AS": "USD",
|
240 |
+
"AR": "ARS",
|
241 |
+
"AU": "AUD",
|
242 |
+
"AT": "EUR",
|
243 |
+
"AW": "AWG",
|
244 |
+
"IN": "INR",
|
245 |
+
"AX": "EUR",
|
246 |
+
"AZ": "AZN",
|
247 |
+
"IE": "EUR",
|
248 |
+
"ID": "IDR",
|
249 |
+
"UA": "UAH",
|
250 |
+
"QA": "QAR",
|
251 |
+
"MZ": "MZN"
|
252 |
+
}
|
public/class-enhanced-ecommerce-google-analytics-public.php
CHANGED
@@ -28,7 +28,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
|
|
28 |
* @return void
|
29 |
*/
|
30 |
//set plugin version
|
31 |
-
public $tvc_eeVer = '2.3.
|
32 |
|
33 |
protected $tvc_aga;
|
34 |
|
@@ -278,7 +278,14 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
|
|
278 |
foreach ($order->get_items() as $item) {
|
279 |
$_product = $item->get_product();
|
280 |
if (isset($_product->variation_data)) {
|
281 |
-
$categories=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
} else {
|
283 |
$out = array();
|
284 |
if(version_compare($woocommerce->version, "2.7", "<")){
|
@@ -295,25 +302,38 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
|
|
295 |
$categories=esc_js(join(",", $out));
|
296 |
}
|
297 |
//orderpage Prod json
|
298 |
-
if(
|
299 |
$orderpage_prod_Array[get_permalink($_product->ID)]=array(
|
300 |
"tvc_id" => esc_html($_product->ID),
|
301 |
"tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->ID),
|
302 |
"tvc_n" => html_entity_decode($item["name"]),
|
303 |
"tvc_p" => esc_js($order->get_item_total($item)),
|
304 |
"tvc_c" => $categories,
|
|
|
305 |
"tvc_q"=>esc_js($item["qty"])
|
306 |
);
|
307 |
-
}else{
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
"tvc_id" => esc_html($_product->get_id()),
|
310 |
"tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->get_id()),
|
311 |
"tvc_n" => html_entity_decode($_product->get_title()),
|
312 |
"tvc_p" => esc_js($order->get_item_total($item)),
|
313 |
"tvc_c" => $categories,
|
314 |
"tvc_q"=>esc_js($item["qty"])
|
315 |
-
|
|
|
316 |
}
|
|
|
317 |
}
|
318 |
//make json for prod meta data on order page
|
319 |
$this->wc_version_compare("tvc_oc=" . json_encode($orderpage_prod_Array) . ";");
|
@@ -346,6 +366,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
|
|
346 |
"id": tvc_oc[t_item].tvc_i,
|
347 |
"name": tvc_oc[t_item].tvc_n,
|
348 |
"category": tvc_oc[t_item].tvc_c,
|
|
|
349 |
"price": tvc_oc[t_item].tvc_p,
|
350 |
"quantity": tvc_oc[t_item].tvc_q,
|
351 |
});
|
@@ -1027,6 +1048,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
|
|
1027 |
"id": tvc_ch[t_item].tvc_i,
|
1028 |
"name": tvc_ch[t_item].tvc_n,
|
1029 |
"category": tvc_ch[t_item].tvc_c,
|
|
|
1030 |
"price": tvc_ch[t_item].tvc_p,
|
1031 |
"quantity": tvc_ch[t_item].tvc_q
|
1032 |
});
|
@@ -1057,6 +1079,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
|
|
1057 |
"id": tvc_ch[t_item].tvc_i,
|
1058 |
"name": tvc_ch[t_item].tvc_n,
|
1059 |
"category": tvc_ch[t_item].tvc_c,
|
|
|
1060 |
"price": tvc_ch[t_item].tvc_p,
|
1061 |
"quantity": tvc_ch[t_item].tvc_q
|
1062 |
});
|
@@ -1093,6 +1116,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
|
|
1093 |
"id": tvc_ch[t_item].tvc_i,
|
1094 |
"name": tvc_ch[t_item].tvc_n,
|
1095 |
"category": tvc_ch[t_item].tvc_c,
|
|
|
1096 |
"price": tvc_ch[t_item].tvc_p,
|
1097 |
"quantity": tvc_ch[t_item].tvc_q
|
1098 |
});
|
28 |
* @return void
|
29 |
*/
|
30 |
//set plugin version
|
31 |
+
public $tvc_eeVer = '2.3.6';
|
32 |
|
33 |
protected $tvc_aga;
|
34 |
|
278 |
foreach ($order->get_items() as $item) {
|
279 |
$_product = $item->get_product();
|
280 |
if (isset($_product->variation_data)) {
|
281 |
+
$categories=get_the_terms($_product->get_parent_id(), "product_cat");
|
282 |
+
$attributes=esc_js(wc_get_formatted_variation($_product->get_variation_attributes(), true));
|
283 |
+
if ($categories) {
|
284 |
+
foreach ($categories as $category) {
|
285 |
+
$out[] = $category->name;
|
286 |
+
}
|
287 |
+
}
|
288 |
+
$categories=esc_js(join(",", $out));
|
289 |
} else {
|
290 |
$out = array();
|
291 |
if(version_compare($woocommerce->version, "2.7", "<")){
|
302 |
$categories=esc_js(join(",", $out));
|
303 |
}
|
304 |
//orderpage Prod json
|
305 |
+
if (isset($_product->variation_data)) {
|
306 |
$orderpage_prod_Array[get_permalink($_product->ID)]=array(
|
307 |
"tvc_id" => esc_html($_product->ID),
|
308 |
"tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->ID),
|
309 |
"tvc_n" => html_entity_decode($item["name"]),
|
310 |
"tvc_p" => esc_js($order->get_item_total($item)),
|
311 |
"tvc_c" => $categories,
|
312 |
+
"tvc_attr" => $attributes,
|
313 |
"tvc_q"=>esc_js($item["qty"])
|
314 |
);
|
315 |
+
} else {
|
316 |
+
if(version_compare($woocommerce->version, "2.7", "<")){
|
317 |
+
$orderpage_prod_Array[get_permalink($_product->ID)]=array(
|
318 |
+
"tvc_id" => esc_html($_product->ID),
|
319 |
+
"tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->ID),
|
320 |
+
"tvc_n" => html_entity_decode($item["name"]),
|
321 |
+
"tvc_p" => esc_js($order->get_item_total($item)),
|
322 |
+
"tvc_c" => $categories,
|
323 |
+
"tvc_q"=>esc_js($item["qty"])
|
324 |
+
);
|
325 |
+
}else{
|
326 |
+
$orderpage_prod_Array[get_permalink($_product->get_id())]=array(
|
327 |
"tvc_id" => esc_html($_product->get_id()),
|
328 |
"tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->get_id()),
|
329 |
"tvc_n" => html_entity_decode($_product->get_title()),
|
330 |
"tvc_p" => esc_js($order->get_item_total($item)),
|
331 |
"tvc_c" => $categories,
|
332 |
"tvc_q"=>esc_js($item["qty"])
|
333 |
+
);
|
334 |
+
}
|
335 |
}
|
336 |
+
|
337 |
}
|
338 |
//make json for prod meta data on order page
|
339 |
$this->wc_version_compare("tvc_oc=" . json_encode($orderpage_prod_Array) . ";");
|
366 |
"id": tvc_oc[t_item].tvc_i,
|
367 |
"name": tvc_oc[t_item].tvc_n,
|
368 |
"category": tvc_oc[t_item].tvc_c,
|
369 |
+
"attributes": tvc_oc[t_item].tvc_attr,
|
370 |
"price": tvc_oc[t_item].tvc_p,
|
371 |
"quantity": tvc_oc[t_item].tvc_q,
|
372 |
});
|
1048 |
"id": tvc_ch[t_item].tvc_i,
|
1049 |
"name": tvc_ch[t_item].tvc_n,
|
1050 |
"category": tvc_ch[t_item].tvc_c,
|
1051 |
+
"attributes": tvc_ch[t_item].tvc_attr,
|
1052 |
"price": tvc_ch[t_item].tvc_p,
|
1053 |
"quantity": tvc_ch[t_item].tvc_q
|
1054 |
});
|
1079 |
"id": tvc_ch[t_item].tvc_i,
|
1080 |
"name": tvc_ch[t_item].tvc_n,
|
1081 |
"category": tvc_ch[t_item].tvc_c,
|
1082 |
+
"attributes": tvc_ch[t_item].tvc_attr,
|
1083 |
"price": tvc_ch[t_item].tvc_p,
|
1084 |
"quantity": tvc_ch[t_item].tvc_q
|
1085 |
});
|
1116 |
"id": tvc_ch[t_item].tvc_i,
|
1117 |
"name": tvc_ch[t_item].tvc_n,
|
1118 |
"category": tvc_ch[t_item].tvc_c,
|
1119 |
+
"attributes": tvc_ch[t_item].tvc_attr,
|
1120 |
"price": tvc_ch[t_item].tvc_p,
|
1121 |
"quantity": tvc_ch[t_item].tvc_q
|
1122 |
});
|
readme.txt
CHANGED
@@ -1,25 +1,30 @@
|
|
1 |
=== Enhanced Ecommerce Google Analytics Plugin for WooCommerce ===
|
2 |
Contributors: Tatvic
|
3 |
Plugin Name: Enhanced Ecommerce for WooCommerce Store
|
4 |
-
Plugin URI:
|
5 |
Tags: Google Analytics, Universal Analytics, Enhanced E-commerce, E-commerce,Web Analytics, Web Analytics For WooCommerce, e-commerce, woo-commerce,Ecommerce,WooCommerce, commerce, Wordpress Enhanced Ecommerce, WooCommerce Enhanced Ecommerce, WooCommerce Google Analytics, Google Analytics Plugin, Enhanced Ecommerce Plugin
|
6 |
Author URI: https://www.tatvic.com/
|
7 |
Author: Tatvic
|
8 |
Requires at least: 1.4.1
|
9 |
-
Tested up to: 5.
|
10 |
Requires PHP: 5.6 or Higher
|
11 |
-
Stable tag: 2.3.
|
12 |
-
Version: 2.3.
|
13 |
License: GPLv3
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
|
16 |
-
|
17 |
|
18 |
== Description ==
|
19 |
|
20 |
<strong>Google Analytics Plugin for WooCommerce</strong>
|
21 |
|
22 |
-
We believe it is very essential to listen to what your data is saying. With this belief, we have devised Enhanced Ecommerce Google Analytics Plugin for WooCommerce stores which allows businesses to make the most of the Google Analytics – Enhanced Ecommerce feature. This plugin helps you in integrating Google Analytics with your WooCommerce stores effortlessly. More than 40000 ecommerce businesses are using this plugin for data driven decision making.
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
The best part is NO CODING REQUIRED or no need to hire a developer for the set up. You can configure the plugin under 5 minutes and with a single click from your Wordpress backend. <a href="http://plugins.tatvic.com/downloads/EE-Woocommerce-Plugin-Documentation.pdf">Here is how you can configure the plugin without any hassle.</a>
|
25 |
|
@@ -54,18 +59,20 @@ Basically, you can track each and every impression and click of product, from wh
|
|
54 |
* Checkout Behaviour Report
|
55 |
* Product Performance Report
|
56 |
* Sales Performance Report
|
57 |
-
3.
|
58 |
-
4.
|
59 |
-
5.
|
60 |
-
6.
|
61 |
-
7. Captures Product Impressions, Add to Cart & Product Clicks events on
|
62 |
-
8. Captures Product Impressions, Add to Cart & Product Clicks events on
|
63 |
-
9. Captures Product Impressions, Add to Cart & Product Clicks events on
|
64 |
-
10. Captures
|
65 |
-
11.
|
66 |
-
12.
|
67 |
-
13. Google
|
68 |
-
14.
|
|
|
|
|
69 |
|
70 |
|
71 |
<strong>Want to unlock more advanced tracking for your WooCommerce store? <a href=" https://codecanyon.net/item/actionable-google-analytics-for-woocommerce/9899552?utm_source=Wordpress&utm_medium=Listingcontent&utm_campaign=WPlisting">Give a try to our pro version.</a></strong>
|
@@ -95,6 +102,8 @@ Basically, you can track each and every impression and click of product, from wh
|
|
95 |
|
96 |
== Note For Beginners : ==
|
97 |
|
|
|
|
|
98 |
== Our plugin does not support the below features out of the box ==
|
99 |
|
100 |
* Highly Customized store
|
@@ -241,8 +250,22 @@ It generally depends upon the traffic of the store. But in general it may take m
|
|
241 |
|
242 |
To avoid sending your own transaction data or sessions data in Google Analytics, our plugin doesn't sent the data to GA when you are logged in. Having said, if you are logged in as Shop Manager, plugin will send the data to GA.
|
243 |
|
|
|
|
|
|
|
244 |
== Changelog ==
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
= 2.3.4 - 13/04/2020 =
|
247 |
* Compatibility with WooCommerce 4.0.1
|
248 |
* Compatibility with Wordpress 5.4
|
1 |
=== Enhanced Ecommerce Google Analytics Plugin for WooCommerce ===
|
2 |
Contributors: Tatvic
|
3 |
Plugin Name: Enhanced Ecommerce for WooCommerce Store
|
4 |
+
Plugin URI: https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/
|
5 |
Tags: Google Analytics, Universal Analytics, Enhanced E-commerce, E-commerce,Web Analytics, Web Analytics For WooCommerce, e-commerce, woo-commerce,Ecommerce,WooCommerce, commerce, Wordpress Enhanced Ecommerce, WooCommerce Enhanced Ecommerce, WooCommerce Google Analytics, Google Analytics Plugin, Enhanced Ecommerce Plugin
|
6 |
Author URI: https://www.tatvic.com/
|
7 |
Author: Tatvic
|
8 |
Requires at least: 1.4.1
|
9 |
+
Tested up to: 5.5
|
10 |
Requires PHP: 5.6 or Higher
|
11 |
+
Stable tag: 2.3.6
|
12 |
+
Version: 2.3.6
|
13 |
License: GPLv3
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
|
16 |
+
Automates Enhanced Ecommerce tracking in Google Analytics using gtag.js for WooCommerce Store.
|
17 |
|
18 |
== Description ==
|
19 |
|
20 |
<strong>Google Analytics Plugin for WooCommerce</strong>
|
21 |
|
22 |
+
We believe it is very essential to listen to what your data is saying. With this belief, we have devised Enhanced Ecommerce Google Analytics Plugin for WooCommerce stores which allows businesses to make the most of the Google Analytics – Enhanced Ecommerce feature. This plugin helps you in integrating Google Analytics with your WooCommerce stores effortlessly. More than 40000+ ecommerce businesses are using this plugin for data driven decision making.
|
23 |
+
|
24 |
+
<strong>Also, compatible for newly launched Google Analytics 4 dual setup.</strong>
|
25 |
+
|
26 |
+
<a href="https://www.tatvic.com/contact/?utm_source=TatvicEE&utm_medium=GA4&utm_campaign=WPlisting">Need help in setting up Google Analytics 4, you can reach out to us.</a>
|
27 |
+
|
28 |
|
29 |
The best part is NO CODING REQUIRED or no need to hire a developer for the set up. You can configure the plugin under 5 minutes and with a single click from your Wordpress backend. <a href="http://plugins.tatvic.com/downloads/EE-Woocommerce-Plugin-Documentation.pdf">Here is how you can configure the plugin without any hassle.</a>
|
30 |
|
59 |
* Checkout Behaviour Report
|
60 |
* Product Performance Report
|
61 |
* Sales Performance Report
|
62 |
+
3. Data collection in Google Analytics 4 property in order to get ready for next generation analytics
|
63 |
+
4. Google Ads account linking with Google Analytics property in order to have better insights on your ad spends in Google analytics reports
|
64 |
+
5. Supports Guest checkout functionality
|
65 |
+
6. Enables Audience, Acquisition & Behavior reports in Google Analytics
|
66 |
+
7. Captures Product Impressions, Add to Cart & Product Clicks events on category page
|
67 |
+
8. Captures Product Impressions, Add to Cart & Product Clicks events on product page
|
68 |
+
9. Captures Product Impressions, Add to Cart & Product Clicks events on featured Product Section on Homepage
|
69 |
+
10. Captures Product Impressions, Add to Cart & Product Clicks events on Recent Product Section on Homepage
|
70 |
+
11. Captures Product Impressions, Add to Cart & Product Clicks events on Related Product Section on Productpage
|
71 |
+
12. Captures checkout behaviour of users in Google Analytics under Conversion > Ecommerce > Checkout behaviour report
|
72 |
+
13. Capture transaction/conversion information in Google analytics under Conversion > Ecommerce > Sales performance report
|
73 |
+
14. Set your local currency
|
74 |
+
15. Google Analytics Opt Out
|
75 |
+
16. IP Anonymization
|
76 |
|
77 |
|
78 |
<strong>Want to unlock more advanced tracking for your WooCommerce store? <a href=" https://codecanyon.net/item/actionable-google-analytics-for-woocommerce/9899552?utm_source=Wordpress&utm_medium=Listingcontent&utm_campaign=WPlisting">Give a try to our pro version.</a></strong>
|
102 |
|
103 |
== Note For Beginners : ==
|
104 |
|
105 |
+
<strong>* Google analytics 4 data collection by this plugin is still in beta and it is advisable that you keep using your Universal Analytics set up for all the insight generation. At the same time, set up new Google Analytics 4 property and connect with your existing universal analytics property. Observe data in Google Analytics 4 propoerty for sometime and when confident you can choose to completely migrate to Google Analytics 4. </strong>
|
106 |
+
|
107 |
== Our plugin does not support the below features out of the box ==
|
108 |
|
109 |
* Highly Customized store
|
250 |
|
251 |
To avoid sending your own transaction data or sessions data in Google Analytics, our plugin doesn't sent the data to GA when you are logged in. Having said, if you are logged in as Shop Manager, plugin will send the data to GA.
|
252 |
|
253 |
+
|
254 |
+
|
255 |
+
|
256 |
== Changelog ==
|
257 |
|
258 |
+
= 2.3.6 - 22/10/2020 =
|
259 |
+
* No need to manually paste Google Analytics property to start tracking. We have given google sign in functionality in order to auto fetch google analytics property.
|
260 |
+
* Fine tuning for Google Analytics 4 dual set up/ data collection in google analytics 4 in order to be future ready for the next generation analytics.
|
261 |
+
* New feature - Now you can link your google ads account with google analytics property and start passing important data points to google analytics from your google ads account.
|
262 |
+
* Compatibility with WooCommerce 4.6.1
|
263 |
+
* Compatibility with Wordpress 5.5.1
|
264 |
+
|
265 |
+
= 2.3.5 - 31/08/2020 =
|
266 |
+
* Compatibility with WooCommerce 4.4.1
|
267 |
+
* Compatibility with Wordpress 5.5
|
268 |
+
|
269 |
= 2.3.4 - 13/04/2020 =
|
270 |
* Compatibility with WooCommerce 4.0.1
|
271 |
* Compatibility with Wordpress 5.4
|