Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 2.2.1

Version Description

  • 24/09/2019 =
    • Compatibility with WooCommerce 3.7.0
    • Minor Bug Fixes
Download this release

Release Info

Developer Tatvic
Plugin Icon 128x128 Enhanced Ecommerce Google Analytics Plugin for WooCommerce
Version 2.2.1
Comparing to
See all releases

Code changes from version 2.2.0 to 2.2.1

admin/class-enhanced-ecommerce-google-analytics-admin.php CHANGED
@@ -22,140 +22,129 @@
22
  */
23
  class Enhanced_Ecommerce_Google_Analytics_Admin {
24
 
25
- /**
26
- * The ID of this plugin.
27
- *
28
- * @since 1.0.0
29
- * @access private
30
- * @var string $plugin_name The ID of this plugin.
31
- */
32
- private $plugin_name;
33
-
34
- /**
35
- * The version of this plugin.
36
- *
37
- * @since 1.0.0
38
- * @access private
39
- * @var string $version The current version of this plugin.
40
- */
41
- private $version;
42
-
43
- /**
44
- * Initialize the class and set its properties.
45
- *
46
- * @since 1.0.0
47
- * @param string $plugin_name The name of this plugin.
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( $plugin_name, $version ) {
57
-
58
- $this->plugin_name = $plugin_name;
59
- $this->version = $version;
60
-
61
- }
62
-
63
- /**
64
- * Register the stylesheets for the admin area.
65
- *
66
- * @since 1.0.0
67
- */
68
- public function enqueue_styles() {
69
-
70
- $screen = get_current_screen();
71
- if ( $screen->id == 'tatvic-ee-plugin_page_enhanced-ecommerce-google-analytics-admin-display' ||(isset($_GET['page']) && $_GET['page'] == 'enhanced-ecommerce-google-analytics-admin-display')){
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_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/enhanced-ecommerce-google-analytics-admin.css', array(), $this->version, 'all' );
77
- }
78
-
79
-
80
- }
81
- /**
82
- * Register the JavaScript for the admin area.
83
- *
84
- * @since 1.0.0
85
- */
86
- public function enqueue_scripts() {
87
-
88
- $screen = get_current_screen();
89
- if ( $screen->id == 'tatvic-ee-plugin_page_enhanced-ecommerce-google-analytics-admin-display' ||(isset($_GET['page']) && $_GET['page'] == 'enhanced-ecommerce-google-analytics-admin-display')){
90
- wp_register_script('popper_bootstrap', '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js');
91
- wp_enqueue_script('popper_bootstrap');
92
- wp_register_script('aga_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js');
93
- wp_enqueue_script('aga_bootstrap');
94
- wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/enhanced-ecommerce-google-analytics-admin.js', array( 'jquery' ), $this->version, false );
95
- }
96
-
97
- }
98
-
99
- /**
100
- * Display Admin Page.
101
- *
102
- * @since 1.0.0
103
- */
104
- public function display_admin_page() {
105
- add_menu_page(
106
- 'Tatvic EE Plugin',
107
- 'Tatvic EE Plugin',
108
- 'manage_options',
109
- "enhanced-ecommerce-google-analytics-admin-display",
110
- array($this,'showPage'),
111
- plugin_dir_url(__FILE__) . 'images/tatvic_logo.png',
112
- 26
113
- );
114
-
115
- }
116
-
117
- /**
118
- * Display Tab page.
119
- *
120
- * @since 1.0.0
121
- */
122
- // public function add_new_menu(){
123
- // // add_submenu_page(__FILE__,
124
- // // "Enhanced Ecommerce Google Analytics for Woocommerce",
125
- // // "Enhanced Ecommerce Google Analytics for Woocommerce",
126
- // // "manage_options",
127
- // // "enhanced-ecommerce-google-analytics-admin-display",
128
- // // array($this,'showPage'),
129
- // // 99);
130
- // }
131
- public function showPage() {
132
- require_once( 'partials/enhanced-ecommerce-google-analytics-admin-display.php');
133
- if(!empty($_GET['tab'])){
134
- $get_action = $_GET['tab'];
135
- }
136
- else{
137
- $get_action = "general_settings";
138
- }
139
- if(method_exists($this, $get_action)) {
140
- $this->$get_action();
141
- }
142
-
143
- }
144
-
145
- public function general_settings() {
146
- require_once( 'partials/general-fields.php');
147
- }
148
-
149
- public function conversion_tracking() {
150
- require_once( 'partials/conversion-tracking.php');
151
- }
152
-
153
- public function google_optimize() {
154
- require_once( 'partials/google-optimize.php');
155
- }
156
-
157
- public function about_plugin() {
158
- require_once( 'partials/about-plugin.php');
159
- }
160
-
161
  }
22
  */
23
  class Enhanced_Ecommerce_Google_Analytics_Admin {
24
 
25
+ /**
26
+ * The ID of this plugin.
27
+ *
28
+ * @since 1.0.0
29
+ * @access private
30
+ * @var string $plugin_name The ID of this plugin.
31
+ */
32
+ private $plugin_name;
33
+
34
+ /**
35
+ * The version of this plugin.
36
+ *
37
+ * @since 1.0.0
38
+ * @access private
39
+ * @var string $version The current version of this plugin.
40
+ */
41
+ private $version;
42
+
43
+ /**
44
+ * Initialize the class and set its properties.
45
+ *
46
+ * @since 1.0.0
47
+ * @param string $plugin_name The name of this plugin.
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( $plugin_name, $version ) {
57
+
58
+ $this->plugin_name = $plugin_name;
59
+ $this->version = $version;
60
+
61
+ }
62
+
63
+ /**
64
+ * Register the stylesheets for the admin area.
65
+ *
66
+ * @since 1.0.0
67
+ */
68
+ public function enqueue_styles() {
69
+
70
+ $screen = get_current_screen();
71
+ if ( $screen->id == 'toplevel_page_enhanced-ecommerce-google-analytics-admin-display' ||(isset($_GET['page']) && $_GET['page'] == 'enhanced-ecommerce-google-analytics-admin-display')){
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_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/enhanced-ecommerce-google-analytics-admin.css', array(), $this->version, 'all' );
77
+ }
78
+
79
+
80
+ }
81
+ /**
82
+ * Register the JavaScript for the admin area.
83
+ *
84
+ * @since 1.0.0
85
+ */
86
+ public function enqueue_scripts() {
87
+
88
+ $screen = get_current_screen();
89
+ if ( $screen->id == 'toplevel_page_enhanced-ecommerce-google-analytics-admin-display' ||(isset($_GET['page']) && $_GET['page'] == 'enhanced-ecommerce-google-analytics-admin-display')){
90
+ wp_register_script('popper_bootstrap', '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js');
91
+ wp_enqueue_script('popper_bootstrap');
92
+ wp_register_script('aga_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js');
93
+ wp_enqueue_script('aga_bootstrap');
94
+ wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/enhanced-ecommerce-google-analytics-admin.js', array( 'jquery' ), $this->version, false );
95
+ }
96
+
97
+ }
98
+
99
+ /**
100
+ * Display Admin Page.
101
+ *
102
+ * @since 1.0.0
103
+ */
104
+ public function display_admin_page() {
105
+ add_menu_page(
106
+ 'Tatvic EE Plugin',
107
+ 'Tatvic EE Plugin',
108
+ 'manage_options',
109
+ "enhanced-ecommerce-google-analytics-admin-display",
110
+ array($this,'showPage'),
111
+ plugin_dir_url(__FILE__) . 'images/tatvic_logo.png',
112
+ 26
113
+ );
114
+
115
+ }
116
+
117
+ /**
118
+ * Display Tab page.
119
+ *
120
+ * @since 1.0.0
121
+ */
122
+ public function showPage() {
123
+ require_once( 'partials/enhanced-ecommerce-google-analytics-admin-display.php');
124
+ if(!empty($_GET['tab'])){
125
+ $get_action = $_GET['tab'];
126
+ }
127
+ else{
128
+ $get_action = "general_settings";
129
+ }
130
+ if(method_exists($this, $get_action)) {
131
+ $this->$get_action();
132
+ }
133
+ }
134
+
135
+ public function general_settings() {
136
+ require_once( 'partials/general-fields.php');
137
+ }
138
+
139
+ public function conversion_tracking() {
140
+ require_once( 'partials/conversion-tracking.php');
141
+ }
142
+
143
+ public function google_optimize() {
144
+ require_once( 'partials/google-optimize.php');
145
+ }
146
+
147
+ public function about_plugin() {
148
+ require_once( 'partials/about-plugin.php');
149
+ }
 
 
 
 
 
 
 
 
 
 
 
150
  }
admin/class-enhanced-ecommerce-google-analytics-settings.php CHANGED
@@ -20,58 +20,54 @@
20
  * @author Chiranjiv Pathak <chiranjiv@tatvic.com>
21
  */
22
  if ( ! defined( 'ABSPATH' ) ) {
23
- exit();
24
  }
25
 
26
  class Enhanced_Ecommerce_Google_Settings {
27
-
28
- public static function add_update_settings($settings) {
29
- if ( !get_option($settings)) {
30
- $ee_options = array();
31
- if(is_array($_POST)) {
32
- foreach ($_POST as $key => $value) {
33
- if(!isset($_POST[$key])){
34
- $_POST[$key] = '';
35
- }
36
- if(isset($_POST[$key])) {
37
- $ee_options[$key] = $_POST[$key];
38
- }
39
- }
40
- }
41
- add_option( $settings, serialize( $ee_options ) );
42
- }
43
- else {
44
- $get_ee_settings = unserialize(get_option($settings));
45
- if(is_array($get_ee_settings)) {
46
- foreach ($get_ee_settings as $key => $value) {
47
- if(!isset($_POST[$key])){
48
- $_POST[$key] = '';
49
- }
50
- if( $_POST[$key] != $value ) {
51
- $get_ee_settings[$key] = $_POST[$key];
52
- }
53
-
54
- }
55
- }
56
- if(is_array($_POST)) {
57
- foreach($_POST as $key=>$value){
58
- if(!array_key_exists($key,$get_ee_settings)){
59
- $get_ee_settings[$key] = $value;
60
- }
61
- }
62
- }
63
- update_option($settings, serialize( $get_ee_settings ));
64
- }
65
- self::admin_notice__success();
66
- }
67
-
68
- private static function admin_notice__success() {
69
- $class = 'notice notice-success';
70
- $message = __( 'Your settings have been saved.', 'sample-text-domain' );
71
- printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
72
-
73
- }
74
-
75
- }
76
 
77
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  * @author Chiranjiv Pathak <chiranjiv@tatvic.com>
21
  */
22
  if ( ! defined( 'ABSPATH' ) ) {
23
+ exit();
24
  }
25
 
26
  class Enhanced_Ecommerce_Google_Settings {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
+ public static function add_update_settings($settings) {
29
+ if ( !get_option($settings)) {
30
+ $ee_options = array();
31
+ if(is_array($_POST)) {
32
+ foreach ($_POST as $key => $value) {
33
+ if(!isset($_POST[$key])){
34
+ $_POST[$key] = '';
35
+ }
36
+ if(isset($_POST[$key])) {
37
+ $ee_options[$key] = $_POST[$key];
38
+ }
39
+ }
40
+ }
41
+ add_option( $settings, serialize( $ee_options ) );
42
+ }
43
+ else {
44
+ $get_ee_settings = unserialize(get_option($settings));
45
+ if(is_array($get_ee_settings)) {
46
+ foreach ($get_ee_settings as $key => $value) {
47
+ if(!isset($_POST[$key])){
48
+ $_POST[$key] = '';
49
+ }
50
+ if( $_POST[$key] != $value ) {
51
+ $get_ee_settings[$key] = $_POST[$key];
52
+ }
53
+ }
54
+ }
55
+ if(is_array($_POST)) {
56
+ foreach($_POST as $key=>$value){
57
+ if(!array_key_exists($key,$get_ee_settings)){
58
+ $get_ee_settings[$key] = $value;
59
+ }
60
+ }
61
+ }
62
+ update_option($settings, serialize( $get_ee_settings ));
63
+ }
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' );
70
+ printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
71
+
72
+ }
73
+ }
admin/css/enhanced-ecommerce-google-analytics-admin.css CHANGED
@@ -11,37 +11,37 @@ body{
11
  background: #f1f1f1 !important;
12
  }
13
  .nav-link.active{
14
- color: #fff !important;
15
- background-color: #2D73C5 !important;
16
  }
17
  a.aga-tab{
18
- color:#4A4A4A !important;
19
- line-height: 2em;
20
  }
21
  .table td{
22
- vertical-align: middle !important;
23
  }
24
  td{
25
- width:8%;
26
  }
27
  .popover{
28
- max-width:500px !important;
29
  }
30
  .popover-body{
31
- text-align: justify;
32
- text-justify: inter-word;
33
  }
34
  input[type=text],input[type=email],input[type=number],textarea{
35
- border:1.3px solid #b4b9be;
36
  }
37
  input[type=checkbox]{
38
  border:1.2px solid #b4b9be;
39
  background:#fff;
40
- -webkit-transition: all 1.5s ease;
41
- -moz-transition: all 1.5s ease;
42
- -o-transition: all 1.5s ease;
43
- -ms-transition: all 1.5s ease;
44
- transition: all 1.5s ease;
45
  }
46
  input[type=checkbox]:checked::before {
47
  height:16px;
@@ -68,5 +68,4 @@ h5{
68
  margin-left: 6% !important;
69
  width:auto;
70
  }
71
-
72
  }
11
  background: #f1f1f1 !important;
12
  }
13
  .nav-link.active{
14
+ color: #fff !important;
15
+ background-color: #2D73C5 !important;
16
  }
17
  a.aga-tab{
18
+ color:#4A4A4A !important;
19
+ line-height: 2em;
20
  }
21
  .table td{
22
+ vertical-align: middle !important;
23
  }
24
  td{
25
+ width:8%;
26
  }
27
  .popover{
28
+ max-width:500px !important;
29
  }
30
  .popover-body{
31
+ text-align: justify;
32
+ text-justify: inter-word;
33
  }
34
  input[type=text],input[type=email],input[type=number],textarea{
35
+ border:1.3px solid #b4b9be;
36
  }
37
  input[type=checkbox]{
38
  border:1.2px solid #b4b9be;
39
  background:#fff;
40
+ -webkit-transition: all 1.5s ease;
41
+ -moz-transition: all 1.5s ease;
42
+ -o-transition: all 1.5s ease;
43
+ -ms-transition: all 1.5s ease;
44
+ transition: all 1.5s ease;
45
  }
46
  input[type=checkbox]:checked::before {
47
  height:16px;
68
  margin-left: 6% !important;
69
  width:auto;
70
  }
 
71
  }
admin/images/woo.png ADDED
Binary file
admin/images/woo_banner_adv.gif ADDED
Binary file
admin/partials/about-plugin.php CHANGED
@@ -1,164 +1,164 @@
1
  <style>
2
- td{
3
- text-align: center !important;
4
- }
5
- th{
6
- text-align: center !important;
7
- }
8
- .fa-times{
9
- color:red;
10
- }
11
- .fa-check{
12
- color:green;
13
- }
14
  </style>
15
  <div class="container">
16
- <div class="row" style="margin-left:-11%; !important;">
17
- <div class= "col col-9">
18
- <div class="card mw-100" style="padding:0;">
19
- <div class="card-header">
20
- <h5>Feature difference between <span style="font-weight: 800;">Free & Premium</span> Plugin</h5>
21
- </div>
22
- <div class="card-body">
23
- <div class="row">
24
- <div class="col-md-10 my-4 mx-auto">
25
- <div class="row">
26
- <div class="col-lg-12">
27
- <div class="table-responsve">
28
- <table class="table table-striped table-hover">
29
- <thead class="thead-inverse">
30
- <tr>
31
- <th class="w-25" style="font-weight: 900;">Features</th>
32
- <th class="" style="font-weight: 900;">Free</th>
33
- <th class="" style="font-weight: 900;">Premium</th>
34
- </tr>
35
- </thead>
36
- <tbody>
37
- <tr>
38
- <td class="w-25 option">Basic UA Tracking (Pageviews)</td>
39
- <td><i class="fa fa-check"></i></td>
40
- <td><i class="fa fa-check"></i></td>
41
- </tr>
42
- <tr>
43
- <td class="option">Enhanced Ecommerce</td>
44
- <td><strong>Only 4 Reports</strong></td>
45
- <td><strong>All reports</strong></td>
46
- </tr>
47
- <tr>
48
- <td class="option">I.P. Anonymization</td>
49
- <td><i class="fa fa-check"></i></td>
50
- <td><i class="fa fa-check"></i></td>
51
- </tr>
52
- <tr>
53
- <td class="option">Google Opt-Out</td>
54
- <td><i class="fa fa-check"></i></td>
55
- <td><i class="fa fa-check"></i></td>
56
- </tr>
57
- <tr>
58
- <td class="option">Product List Performance</td>
59
- <td><i class="fa fa-times"></i></td>
60
- <td><i class="fa fa-check"></i></td>
61
- </tr>
62
- <tr>
63
- <td class="option">Display Feature</td>
64
- <td><i class="fa fa-times"></i></td>
65
- <td><i class="fa fa-check"></i></td>
66
- </tr>
67
- <tr>
68
- <td class="option">Product Variations (eg. color,size)</td>
69
- <td><i class="fa fa-times"></i></td>
70
- <td><i class="fa fa-check"></i></td>
71
- </tr>
72
- <tr>
73
- <td class="option">Automated Product Refund (from Admin Panel)</td>
74
- <td><i class="fa fa-times"></i></td>
75
- <td><i class="fa fa-check"></i></td>
76
- </tr>
77
- <tr>
78
- <td class="option">Google Adwords Conversion Tracking</td>
79
- <td><i class="fa fa-times"></i></td>
80
- <td><i class="fa fa-check"></i></td>
81
- </tr>
82
- <tr>
83
- <td class="option">Facebook Pixel Implementation (Standard Ecommerce Events)</td>
84
- <td><i class="fa fa-times"></i></td>
85
- <td><i class="fa fa-check"></i></td>
86
- </tr>
87
- <tr>
88
- <td class="option">Add Google Optimize Snippet</td>
89
- <td><i class="fa fa-times"></i></td>
90
- <td><i class="fa fa-check"></i></td>
91
- </tr>
92
- <tr>
93
- <td class="option">Site Speed Sample Rate</td>
94
- <td><i class="fa fa-times"></i></td>
95
- <td><i class="fa fa-check"></i></td>
96
- </tr>
97
- <tr>
98
- <td class="option">User ID Tracking</td>
99
- <td><i class="fa fa-times"></i></td>
100
- <td><i class="fa fa-check"></i></td>
101
- </tr>
102
- <tr>
103
- <td class="option">Form Field Tracking</td>
104
- <td><i class="fa fa-times"></i></td>
105
- <td><i class="fa fa-check"></i></td>
106
- </tr>
107
- <tr>
108
- <td class="option">Content Grouping</td>
109
- <td><i class="fa fa-times"></i></td>
110
- <td><i class="fa fa-check"></i></td>
111
- </tr>
112
-
113
- <tr>
114
- <td class="option">Internal Promotion</td>
115
- <td><i class="fa fa-times"></i></td>
116
- <td><i class="fa fa-check"></i></td>
117
- </tr>
118
- <tr>
119
- <td class="option">15+ Ready to Use Custom Dimensions/ Metrics</td>
120
- <td><i class="fa fa-times"></i></td>
121
- <td><i class="fa fa-check"></i></td>
122
- </tr>
123
- <tr>
124
- <td class="option">Child / Custom Theme Support</td>
125
- <td><i class="fa fa-times"></i></td>
126
- <td><i class="fa fa-check"></i></td>
127
- </tr>
128
- <tr>
129
- <td class="option">Quick Expert Support ( Query Support)</td>
130
- <td><i class="fa fa-times"></i></td>
131
- <td><i class="fa fa-check"></i></td>
132
- </tr>
133
- <tr>
134
- <td class="option">Paid Customization (As per the requirement)</td>
135
- <td><i class="fa fa-times"></i></td>
136
- <td><i class="fa fa-check"></i></td>
137
- </tr>
138
- <tr>
139
- <td class="option">Data Studio Dashboards (Paid)</td>
140
- <td><i class="fa fa-times"></i></td>
141
- <td><i class="fa fa-check"></i></td>
142
- </tr>
143
- </tbody>
144
- <tfoot class="thead-inverse">
145
- <tr>
146
- <th class="w-25"></th>
147
- <th class=""></th>
148
- <th class=""><a href="https://1.envato.market/Yvn3R" target="_blank"><button class="btn btn-primary"><strong>Buy Premium Plugin</strong></button></a></th>
149
- </tr>
150
- </tfoot>
151
- </table>
152
- <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>
153
- </div>
154
- </div>
155
- </div>
156
- </div>
157
- </div>
158
- <hr>
159
- </div>
160
- </div>
161
- </div>
162
- <?php require_once('sidebar.php');?>
163
- </div>
164
  </div>
1
  <style>
2
+ td{
3
+ text-align: center !important;
4
+ }
5
+ th{
6
+ text-align: center !important;
7
+ }
8
+ .fa-times{
9
+ color:red;
10
+ }
11
+ .fa-check{
12
+ color:green;
13
+ }
14
  </style>
15
  <div class="container">
16
+ <div class="row" style="margin-left:-11%; !important;">
17
+ <div class= "col col-9">
18
+ <div class="card mw-100" style="padding:0;">
19
+ <div class="card-header">
20
+ <h5>Feature difference between <span style="font-weight: 800;">Free & Premium</span> Plugin</h5>
21
+ </div>
22
+ <div class="card-body">
23
+ <div class="row">
24
+ <div class="col-md-10 my-4 mx-auto">
25
+ <div class="row">
26
+ <div class="col-lg-12">
27
+ <div class="table-responsve">
28
+ <table class="table table-striped table-hover">
29
+ <thead class="thead-inverse">
30
+ <tr>
31
+ <th class="w-25" style="font-weight: 900;">Features</th>
32
+ <th class="" style="font-weight: 900;">Free</th>
33
+ <th class="" style="font-weight: 900;">Premium</th>
34
+ </tr>
35
+ </thead>
36
+ <tbody>
37
+ <tr>
38
+ <td class="w-25 option">Basic UA Tracking (Pageviews)</td>
39
+ <td><i class="fa fa-check"></i></td>
40
+ <td><i class="fa fa-check"></i></td>
41
+ </tr>
42
+ <tr>
43
+ <td class="option">Enhanced Ecommerce</td>
44
+ <td><strong>Only 4 Reports</strong></td>
45
+ <td><strong>All reports</strong></td>
46
+ </tr>
47
+ <tr>
48
+ <td class="option">I.P. Anonymization</td>
49
+ <td><i class="fa fa-check"></i></td>
50
+ <td><i class="fa fa-check"></i></td>
51
+ </tr>
52
+ <tr>
53
+ <td class="option">Google Opt-Out</td>
54
+ <td><i class="fa fa-check"></i></td>
55
+ <td><i class="fa fa-check"></i></td>
56
+ </tr>
57
+ <tr>
58
+ <td class="option">Product List Performance</td>
59
+ <td><i class="fa fa-times"></i></td>
60
+ <td><i class="fa fa-check"></i></td>
61
+ </tr>
62
+ <tr>
63
+ <td class="option">Display Feature</td>
64
+ <td><i class="fa fa-times"></i></td>
65
+ <td><i class="fa fa-check"></i></td>
66
+ </tr>
67
+ <tr>
68
+ <td class="option">Product Variations (eg. color,size)</td>
69
+ <td><i class="fa fa-times"></i></td>
70
+ <td><i class="fa fa-check"></i></td>
71
+ </tr>
72
+ <tr>
73
+ <td class="option">Automated Product Refund (from Admin Panel)</td>
74
+ <td><i class="fa fa-times"></i></td>
75
+ <td><i class="fa fa-check"></i></td>
76
+ </tr>
77
+ <tr>
78
+ <td class="option">Google Adwords Conversion Tracking</td>
79
+ <td><i class="fa fa-times"></i></td>
80
+ <td><i class="fa fa-check"></i></td>
81
+ </tr>
82
+ <tr>
83
+ <td class="option">Facebook Pixel Implementation (Standard Ecommerce Events)</td>
84
+ <td><i class="fa fa-times"></i></td>
85
+ <td><i class="fa fa-check"></i></td>
86
+ </tr>
87
+ <tr>
88
+ <td class="option">Add Google Optimize Snippet</td>
89
+ <td><i class="fa fa-times"></i></td>
90
+ <td><i class="fa fa-check"></i></td>
91
+ </tr>
92
+ <tr>
93
+ <td class="option">Site Speed Sample Rate</td>
94
+ <td><i class="fa fa-times"></i></td>
95
+ <td><i class="fa fa-check"></i></td>
96
+ </tr>
97
+ <tr>
98
+ <td class="option">User ID Tracking</td>
99
+ <td><i class="fa fa-times"></i></td>
100
+ <td><i class="fa fa-check"></i></td>
101
+ </tr>
102
+ <tr>
103
+ <td class="option">Form Field Tracking</td>
104
+ <td><i class="fa fa-times"></i></td>
105
+ <td><i class="fa fa-check"></i></td>
106
+ </tr>
107
+ <tr>
108
+ <td class="option">Content Grouping</td>
109
+ <td><i class="fa fa-times"></i></td>
110
+ <td><i class="fa fa-check"></i></td>
111
+ </tr>
112
+
113
+ <tr>
114
+ <td class="option">Internal Promotion</td>
115
+ <td><i class="fa fa-times"></i></td>
116
+ <td><i class="fa fa-check"></i></td>
117
+ </tr>
118
+ <tr>
119
+ <td class="option">15+ Ready to Use Custom Dimensions/ Metrics</td>
120
+ <td><i class="fa fa-times"></i></td>
121
+ <td><i class="fa fa-check"></i></td>
122
+ </tr>
123
+ <tr>
124
+ <td class="option">Child / Custom Theme Support</td>
125
+ <td><i class="fa fa-times"></i></td>
126
+ <td><i class="fa fa-check"></i></td>
127
+ </tr>
128
+ <tr>
129
+ <td class="option">Quick Expert Support ( Query Support)</td>
130
+ <td><i class="fa fa-times"></i></td>
131
+ <td><i class="fa fa-check"></i></td>
132
+ </tr>
133
+ <tr>
134
+ <td class="option">Paid Customization (As per the requirement)</td>
135
+ <td><i class="fa fa-times"></i></td>
136
+ <td><i class="fa fa-check"></i></td>
137
+ </tr>
138
+ <tr>
139
+ <td class="option">Data Studio Dashboards (Paid)</td>
140
+ <td><i class="fa fa-times"></i></td>
141
+ <td><i class="fa fa-check"></i></td>
142
+ </tr>
143
+ </tbody>
144
+ <tfoot class="thead-inverse">
145
+ <tr>
146
+ <th class="w-25"></th>
147
+ <th class=""></th>
148
+ <th class=""><a href="https://1.envato.market/Yvn3R" target="_blank"><button class="btn btn-primary"><strong>Buy Premium Plugin</strong></button></a></th>
149
+ </tr>
150
+ </tfoot>
151
+ </table>
152
+ <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>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ </div>
158
+ <hr>
159
+ </div>
160
+ </div>
161
+ </div>
162
+ <?php require_once('sidebar.php');?>
163
+ </div>
164
  </div>
admin/partials/enhanced-ecommerce-google-analytics-admin-display.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * Provide a admin area view for the plugin
5
  *
@@ -16,31 +15,30 @@ if (!defined('ABSPATH')) {
16
  exit;
17
  }
18
 
19
- $site_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=";
20
-
21
- if(isset($_GET['tab']) && $_GET['tab'] == 'general_settings'){
22
- $general_class_active = "active";
23
- }
24
- else{
25
- $general_class_active = "";
26
- }
27
- if(isset($_GET['tab']) && $_GET['tab'] == 'about_plugin'){
28
- $advanced_class_active = "active";
29
- }
30
- else{
31
- $advanced_class_active = "";
32
- }
33
- if(empty($_GET['tab'])){
34
- $general_class_active = "active";
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 Setting</a>
44
- </li>
45
- <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 Plugin</a></li>
46
- </ul>
1
  <?php
 
2
  /**
3
  * Provide a admin area view for the plugin
4
  *
15
  exit;
16
  }
17
 
18
+ $site_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=";
19
+
20
+ if(isset($_GET['tab']) && $_GET['tab'] == 'general_settings'){
21
+ $general_class_active = "active";
22
+ }
23
+ else{
24
+ $general_class_active = "";
25
+ }
26
+ if(isset($_GET['tab']) && $_GET['tab'] == 'about_plugin'){
27
+ $advanced_class_active = "active";
28
+ }
29
+ else{
30
+ $advanced_class_active = "";
31
+ }
32
+ if(empty($_GET['tab'])){
33
+ $general_class_active = "active";
34
+ }
 
35
  ?>
36
  <header class='background-color:#E8E8E8;height:500px;width:auto;margin-top:100px;margin-left:20px;'>
37
+ <img class ="banner" src='<?php echo plugins_url('../images/banner.png', __FILE__ ) ?>' style="margin-left:10px;">
38
  </header>
39
+ <ul class="nav nav-tabs nav-pills" style="margin-left: 10px;margin-top:20px;">
40
+ <li class="nav-item">
41
+ <a href="<?php echo $site_url.'general_settings'; ?>" class="border-left aga-tab nav-link <?php echo $general_class_active; ?>">General Setting</a>
42
+ </li>
43
+ <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 Plugin</a></li>
44
+ </ul>
admin/partials/general-fields.php CHANGED
@@ -1,113 +1,113 @@
1
  <?php
2
  if(isset($_POST['ee_submit_plugin'])){
3
- Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
4
  }
5
  $data = unserialize(get_option('ee_options'));
6
  ?>
7
  <div class="container">
8
- <div class="row" style="margin-left:-11%; !important;">
9
- <div class= "col col-9" >
10
- <div class="card mw-100" style="padding:0px;">
11
- <div class="card-header">
12
- <h5>Enhanced Ecommerce Google Analytics</h5>
13
- </div>
14
- <div class="card-body">
15
- <form id="ee_plugin_form" method="post" action="" enctype="multipart/form-data" >
16
- <table class="table table-bordered">
17
- <tbody>
18
 
19
- <tr>
20
- <td>
21
- <label class="align-middle" for="woocommerce_ee_google_analytics_ga_id">Google Analytics ID</label>
22
- </td>
23
- <td>
24
- <input type="text" id="ga_id" name = "ga_id" required = "required" value="<?php echo $data['ga_id'];?>">
25
- <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>
26
- </td>
27
- </tr>
28
- <tr>
29
- <td>
30
- <label class="align-middle" for="tracking_code">Tracking Code</label>
31
- </td>
32
- <td>
33
- <label class = "align-middle" for="ga_code">
34
- <?php $ga_ST = !empty($data['ga_ST'])? 'checked' : ''; ?>
35
- <input type="checkbox" name="ga_ST" id="ga_ST" <?php echo $ga_ST; ?> >
36
- Add Global Site Tracking Code 'gtag.js'
37
- <p class="description">This feature adds New gtag.js Tracking Code to your Store. You don't need to enable this if gtag.js implemented via a 3rd party analytics plugin.</p>
38
- </label><br/>
39
- <label class = "align-middle" for="ga_enhance_ecommerce">
40
- <?php $ga_eeT = !empty($data['ga_eeT'])? 'checked' : ''; ?>
41
- <input type="checkbox" name="ga_eeT" id="ga_eeT" <?php echo $ga_eeT; ?> >
42
- Add Enhanced Ecommerce Tracking Code
43
- <p class="description">This feature adds Enhanced Ecommerce Tracking Code to your Store</p>
44
- </label><br/>
45
- <label class = "align-middle" for="ga_login_step">
46
- <?php $ga_gUser = !empty($data['ga_gUser'])? 'checked' : ''; ?>
47
- <input type="checkbox" name="ga_gUser" id="ga_gUser" <?php echo $ga_gUser; ?> >
48
- Add Code to Track the Login Step of Guest Users (Optional)
49
- <p class="description">If you have Guest Check out enable, we recommend you to add this code</p>
50
- </label><br/>
51
- </td>
52
- </tr>
53
- <tr>
54
- <td>
55
- <label for="ga_Impr">Impression Thresold</label>
56
- </td>
57
- <td>
58
- <?php $ga_Impr = !empty($data['ga_Impr'])? $data['ga_Impr'] : 6; ?>
59
- <input type="number" min="1" id="ga_Impr" name = "ga_Impr" value = "<?php echo $ga_Impr; ?>"><br/>
60
- <p class="description">This feature sets Impression threshold for category page. It sends hit after these many numbers of products impressions.</p>
61
- </td>
62
- </tr>
63
- <tr>
64
- <td>
65
- <label class = "align-middle" for="ga_IPA">I.P. Anoymization</label>
66
- </td>
67
- <td>
68
- <label class = "align-middle" for="ga_IPA">
69
- <?php $ga_IPA = !empty($data['ga_IPA'])? 'checked' : ''; ?>
70
- <input class="" type="checkbox" name="ga_IPA" id="ga_IPA" <?php echo $ga_IPA; ?>>
71
- Enable I.P. Anonymization
72
- <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>
73
- </label>
74
- </td>
75
- </tr>
76
- <tr>
77
- <td>
78
- <label class = "align-middle" for="ga_OPTOUT">Google Analytics Opt Out</label>
79
- </td>
80
- <td>
81
- <label class = "align-middle" for="ga_OPTOUT">
82
- <?php $ga_OPTOUT = !empty($data['ga_OPTOUT'])? 'checked' : ''; ?>
83
- <input class="" type="checkbox" name="ga_OPTOUT" id="ga_OPTOUT" <?php echo $ga_OPTOUT; ?>>
84
- Enable Google Analytics Opt Out (Optional)
85
- <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>
86
- </label>
87
- </td>
88
- </tr>
89
- <tr>
90
- <td>
91
- <label class = "align-middle" for="ga_PrivacyPolicy">Privacy Policy</label>
92
- </td>
93
- <td>
94
- <label class = "align-middle" for="ga_PrivacyPolicy">
95
- <?php $ga_PrivacyPolicy = !empty($data['ga_PrivacyPolicy'])? 'checked' : ''; ?>
96
- <input type="checkbox" onchange="enableSubmit();" name="ga_PrivacyPolicy" id="ga_PrivacyPolicy" required="required" <?php echo $ga_PrivacyPolicy; ?>>
97
- Accept Privacy Policy of Plugin
98
- <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>
99
- </label>
100
- </td>
101
- </tr>
102
- </tbody>
103
- </table>
104
- <p class="submit save-for-later" id="save-for-later">
105
- <button type="submit" class="btn btn-primary btn-success" id="ee_submit_plugin" name="ee_submit_plugin">Submit</button>
106
- </p>
107
- </form>
108
- </div>
109
- </div>
110
- </div>
111
- <?php require_once('sidebar.php');?>
112
- </div>
113
  </div>
1
  <?php
2
  if(isset($_POST['ee_submit_plugin'])){
3
+ Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
4
  }
5
  $data = unserialize(get_option('ee_options'));
6
  ?>
7
  <div class="container">
8
+ <div class="row" style="margin-left:-11%; !important;">
9
+ <div class= "col col-9" >
10
+ <div class="card mw-100" style="padding:0px;">
11
+ <div class="card-header">
12
+ <h5>Enhanced Ecommerce Google Analytics</h5>
13
+ </div>
14
+ <div class="card-body">
15
+ <form id="ee_plugin_form" method="post" action="" enctype="multipart/form-data" >
16
+ <table class="table table-bordered">
17
+ <tbody>
18
 
19
+ <tr>
20
+ <td>
21
+ <label class="align-middle" for="woocommerce_ee_google_analytics_ga_id">Google Analytics ID</label>
22
+ </td>
23
+ <td>
24
+ <input type="text" id="ga_id" name = "ga_id" required = "required" value="<?php echo $data['ga_id'];?>">
25
+ <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>
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <td>
30
+ <label class="align-middle" for="tracking_code">Tracking Code</label>
31
+ </td>
32
+ <td>
33
+ <label class = "align-middle" for="ga_code">
34
+ <?php $ga_ST = !empty($data['ga_ST'])? 'checked' : ''; ?>
35
+ <input type="checkbox" name="ga_ST" id="ga_ST" <?php echo $ga_ST; ?> >
36
+ Add Global Site Tracking Code 'gtag.js'
37
+ <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>
38
+ </label><br/>
39
+ <label class = "align-middle" for="ga_enhance_ecommerce">
40
+ <?php $ga_eeT = !empty($data['ga_eeT'])? 'checked' : ''; ?>
41
+ <input type="checkbox" name="ga_eeT" id="ga_eeT" <?php echo $ga_eeT; ?> >
42
+ Add Enhanced Ecommerce Tracking Code
43
+ <p class="description">This feature adds Enhanced Ecommerce Tracking Code to your Store</p>
44
+ </label><br/>
45
+ <label class = "align-middle" for="ga_login_step">
46
+ <?php $ga_gUser = !empty($data['ga_gUser'])? 'checked' : ''; ?>
47
+ <input type="checkbox" name="ga_gUser" id="ga_gUser" <?php echo $ga_gUser; ?> >
48
+ Add Code to Track the Login Step of Guest Users (Optional)
49
+ <p class="description">If you have Guest Check out enable, we recommend you to add this code</p>
50
+ </label><br/>
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <td>
55
+ <label for="ga_Impr">Impression Thresold</label>
56
+ </td>
57
+ <td>
58
+ <?php $ga_Impr = !empty($data['ga_Impr'])? $data['ga_Impr'] : 6; ?>
59
+ <input type="number" min="1" id="ga_Impr" name = "ga_Impr" value = "<?php echo $ga_Impr; ?>"><br/>
60
+ <p class="description">This feature sets Impression threshold for category page. It sends hit after these many numbers of products impressions. <br><b>Note : To avoid processing load on server we recommend upto 6 Impression Thresold.</b></p>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>
65
+ <label class = "align-middle" for="ga_IPA">I.P. Anoymization</label>
66
+ </td>
67
+ <td>
68
+ <label class = "align-middle" for="ga_IPA">
69
+ <?php $ga_IPA = !empty($data['ga_IPA'])? 'checked' : ''; ?>
70
+ <input class="" type="checkbox" name="ga_IPA" id="ga_IPA" <?php echo $ga_IPA; ?>>
71
+ Enable I.P. Anonymization
72
+ <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>
73
+ </label>
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <td>
78
+ <label class = "align-middle" for="ga_OPTOUT">Google Analytics Opt Out</label>
79
+ </td>
80
+ <td>
81
+ <label class = "align-middle" for="ga_OPTOUT">
82
+ <?php $ga_OPTOUT = !empty($data['ga_OPTOUT'])? 'checked' : ''; ?>
83
+ <input class="" type="checkbox" name="ga_OPTOUT" id="ga_OPTOUT" <?php echo $ga_OPTOUT; ?>>
84
+ Enable Google Analytics Opt Out (Optional)
85
+ <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>
86
+ </label>
87
+ </td>
88
+ </tr>
89
+ <tr>
90
+ <td>
91
+ <label class = "align-middle" for="ga_PrivacyPolicy">Privacy Policy</label>
92
+ </td>
93
+ <td>
94
+ <label class = "align-middle" for="ga_PrivacyPolicy">
95
+ <?php $ga_PrivacyPolicy = !empty($data['ga_PrivacyPolicy'])? 'checked' : ''; ?>
96
+ <input type="checkbox" onchange="enableSubmit();" name="ga_PrivacyPolicy" id="ga_PrivacyPolicy" required="required" <?php echo $ga_PrivacyPolicy; ?>>
97
+ Accept Privacy Policy of Plugin
98
+ <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>
99
+ </label>
100
+ </td>
101
+ </tr>
102
+ </tbody>
103
+ </table>
104
+ <p class="submit save-for-later" id="save-for-later">
105
+ <button type="submit" class="btn btn-primary btn-success" id="ee_submit_plugin" name="ee_submit_plugin">Submit</button>
106
+ </p>
107
+ </form>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ <?php require_once('sidebar.php');?>
112
+ </div>
113
  </div>
admin/partials/sidebar.php CHANGED
@@ -1,40 +1,41 @@
1
  <div class="col col-xs-3">
2
- <div class="card" style="padding: 0px;">
3
- <div class="card-header">
4
- <h5> Important Links</h5>
5
- </div>
6
- <div class="card-body">
7
- <ul>
8
- <li style="padding-bottom:5px;"><a href="http://plugins.tatvic.com/downloads/EE-Woocommerce-Plugin-Documentation.pdf" target="_blank">Installation Instructions</a></li>
9
- <li style="padding-bottom:5px;"><a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" target="_blank">FAQ</a></li>
10
- <li style="padding-bottom:5px;"><a href="https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store" target="_blank">Support</a></li>
11
- <li style="padding-bottom:5px;"><a href="https://www.tatvic.com/privacy-policy/?ref=plugin_policy&utm_source=plugin_backend&utm_medium=woo_free_plugin&utm_campaign=GDPR_complaince_ecomm_plugins" target="_blank">Privacy Policy</a></li>
12
- <li style="padding-bottom:5px;"><a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#developers" target="_blank">Change Logs</a></li>
13
- </ul>
14
- </div>
15
- </div>
16
- <div class="card" style="padding: 0px;">
17
- <div class="card-header">
18
- <h4>Rate Us!</h4>
19
- </div>
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 <a href = "https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/" target="_blank">★★★★★</a> Rating..!!</li>
23
- </ul>
24
- </div>
25
- </div>
26
- <div class="card" style="padding: 0px;">
27
- <div class="card-header">
28
- <h5>Tatvic also Offers</h5>
29
- </div>
30
- <div class="card-body">
31
- <ul>
32
- <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/cotlw.png', __FILE__ ) ?>' />&nbsp;<a href="https://wordpress.org/plugins/woo-chrome-one-tap-login/" target="_blank">Chrome One Tap Login for Woocommerce</a>&nbsp;&nbsp;<img src='<?php echo plugins_url('../images/cotlw.gif', __FILE__ ) ?>' /></li>
33
- <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m1.png', __FILE__ ) ?>' />&nbsp;<a href="https://1.envato.market/79Oky" target="_blank">Actionable Google Analytics for Magento</a></li>
34
- <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m2.png', __FILE__ ) ?>' />&nbsp;<a href="https://marketplace.magento.com/tatvic-actionablegoogleanalytics.html" target="_blank">Actionable Google Analytics for Magento2</a></li>
35
- <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/shopify_new.png', __FILE__ ) ?>' />&nbsp;<a href="https://apps.shopify.com/google-universal-analytics-enhanced-ecommerce" target="_blank">Actionable Google Analytics for Shopify</a></li>
36
- <li style="padding-bottom:5px;"><img style="width:25px;height: 25px;" src='<?php echo plugins_url('../images/tatvic_logo.png', __FILE__ ) ?>' />&nbsp;<a href="https://www.tatvic.com/excel-add-in-google-analytics/?utm_source=excel_tool_signup&utm_medium=woo_free_plugin&utm_campaign=excel_free_trial" target="_blank">Tatvic Ninja Excel AddIn</a></li>
37
- </ul>
38
- </div>
39
- </div>
 
40
  </div>
1
  <div class="col col-xs-3">
2
+ <div class="card" style="padding: 0px;">
3
+ <div class="card-header">
4
+ <h5> Important Links</h5>
5
+ </div>
6
+ <div class="card-body">
7
+ <ul>
8
+ <li style="padding-bottom:5px;"><a href="http://plugins.tatvic.com/downloads/EE-Woocommerce-Plugin-Documentation.pdf" target="_blank">Installation Instructions</a></li>
9
+ <li style="padding-bottom:5px;"><a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" target="_blank">FAQ</a></li>
10
+ <li style="padding-bottom:5px;"><a href="https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store" target="_blank">Support</a></li>
11
+ <li style="padding-bottom:5px;"><a href="https://www.tatvic.com/privacy-policy/?ref=plugin_policy&utm_source=plugin_backend&utm_medium=woo_free_plugin&utm_campaign=GDPR_complaince_ecomm_plugins" target="_blank">Privacy Policy</a></li>
12
+ <li style="padding-bottom:5px;"><a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#developers" target="_blank">Change Logs</a></li>
13
+ </ul>
14
+ </div>
15
+ </div>
16
+ <div class="card" style="padding: 0px;">
17
+ <div class="card-header">
18
+ <h4>Rate Us!</h4>
19
+ </div>
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 <a href = "https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/" target="_blank">★★★★★</a> Rating..!!</li>
23
+ </ul>
24
+ </div>
25
+ </div>
26
+ <div class="card" style="padding: 0px;">
27
+ <div class="card-header">
28
+ <h5>Tatvic also Offers</h5>
29
+ </div>
30
+ <div class="card-body">
31
+ <ul>
32
+ <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/woo.png', __FILE__ ) ?>' />&nbsp;<a href="http://1.envato.market/Yvn3R" target="_blank">Actionable Google Analytics for WooCommerce</a></li>
33
+ <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/cotlw.png', __FILE__ ) ?>' />&nbsp;<a href="https://wordpress.org/plugins/woo-chrome-one-tap-login/" target="_blank">Chrome One Tap Login for Woocommerce</a>&nbsp;&nbsp;<img src='<?php echo plugins_url('../images/cotlw.gif', __FILE__ ) ?>' /></li>
34
+ <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m1.png', __FILE__ ) ?>' />&nbsp;<a href="https://1.envato.market/79Oky" target="_blank">Actionable Google Analytics for Magento</a></li>
35
+ <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m2.png', __FILE__ ) ?>' />&nbsp;<a href="https://marketplace.magento.com/tatvic-actionablegoogleanalytics.html" target="_blank">Actionable Google Analytics for Magento2</a></li>
36
+ <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/shopify_new.png', __FILE__ ) ?>' />&nbsp;<a href="https://apps.shopify.com/google-universal-analytics-enhanced-ecommerce" target="_blank">Actionable Google Analytics for Shopify</a></li>
37
+ <li style="padding-bottom:5px;"><img style="width:25px;height: 25px;" src='<?php echo plugins_url('../images/tatvic_logo.png', __FILE__ ) ?>' />&nbsp;<a href="https://www.tatvic.com/excel-add-in-google-analytics/?utm_source=excel_tool_signup&utm_medium=woo_free_plugin&utm_campaign=excel_free_trial" target="_blank">Tatvic Ninja Excel AddIn</a></li>
38
+ </ul>
39
+ </div>
40
+ </div>
41
  </div>
enhanced-ecommerce-google-analytics.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * The plugin bootstrap file
5
  *
@@ -16,20 +15,22 @@
16
  * Plugin Name: Enhanced E-commerce for Woocommerce store
17
  * Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
18
  * Description: Allows Enhanced E-commerce Google Analytics tracking code to be inserted into WooCommerce store pages.
19
- * Version: 2.2.0
20
  * Author: Tatvic
21
- * Author URI: tatvic.com
22
  * License: GPL-2.0+
23
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24
- * Text Domain: tatvic.com
25
  * Domain Path: /languages
26
  * WC requires at least: 1.4.1
27
- * WC tested up to: 3.6.0
28
  */
29
 
30
- // If this file is called directly, abort.
 
 
31
  if ( ! defined( 'WPINC' ) ) {
32
- die;
33
  }
34
 
35
  /**
@@ -37,14 +38,14 @@ if ( ! defined( 'WPINC' ) ) {
37
  * Start at version 1.0.0 and use SemVer - https://semver.org
38
  * Rename this for your plugin and update it as you release new versions.
39
  */
40
- define( 'PLUGIN_NAME_VERSION', '2.2.0' );
41
  /**
42
  * The code that runs during plugin activation.
43
  * This action is documented in includes/class-enhanced-ecommerce-google-analytics-activator.php
44
  */
45
  function activate_enhanced_ecommerce_google_analytics() {
46
- require_once plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-analytics-activator.php';
47
- Enhanced_Ecommerce_Google_Analytics_Activator::activate();
48
  }
49
 
50
  /**
@@ -52,8 +53,8 @@ function activate_enhanced_ecommerce_google_analytics() {
52
  * This action is documented in includes/class-enhanced-ecommerce-google-analytics-deactivator.php
53
  */
54
  function deactivate_enhanced_ecommerce_google_analytics() {
55
- require_once plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-analytics-deactivator.php';
56
- Enhanced_Ecommerce_Google_Analytics_Deactivator::deactivate();
57
  }
58
  register_activation_hook( __FILE__, 'activate_enhanced_ecommerce_google_analytics' );
59
  register_deactivation_hook( __FILE__, 'deactivate_enhanced_ecommerce_google_analytics' );
@@ -77,7 +78,7 @@ require plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-
77
  function run_enhanced_ecommerce_google_analytics() {
78
 
79
  $plugin = new Enhanced_Ecommerce_Google_Analytics();
80
- $plugin->run();
81
-
82
  }
83
  run_enhanced_ecommerce_google_analytics();
1
  <?php
 
2
  /**
3
  * The plugin bootstrap file
4
  *
15
  * Plugin Name: Enhanced E-commerce for Woocommerce store
16
  * Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
17
  * Description: Allows Enhanced E-commerce Google Analytics tracking code to be inserted into WooCommerce store pages.
18
+ * Version: 2.2.1
19
  * Author: Tatvic
20
+ * Author URI: www.tatvic.com
21
  * License: GPL-2.0+
22
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
23
+ * Text Domain: www.tatvic.com
24
  * Domain Path: /languages
25
  * WC requires at least: 1.4.1
26
+ * WC tested up to: 3.7.0
27
  */
28
 
29
+ /**
30
+ * If this file is called directly, abort.
31
+ */
32
  if ( ! defined( 'WPINC' ) ) {
33
+ die;
34
  }
35
 
36
  /**
38
  * Start at version 1.0.0 and use SemVer - https://semver.org
39
  * Rename this for your plugin and update it as you release new versions.
40
  */
41
+ define( 'PLUGIN_NAME_VERSION', '2.2.1' );
42
  /**
43
  * The code that runs during plugin activation.
44
  * This action is documented in includes/class-enhanced-ecommerce-google-analytics-activator.php
45
  */
46
  function activate_enhanced_ecommerce_google_analytics() {
47
+ require_once plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-analytics-activator.php';
48
+ Enhanced_Ecommerce_Google_Analytics_Activator::activate();
49
  }
50
 
51
  /**
53
  * This action is documented in includes/class-enhanced-ecommerce-google-analytics-deactivator.php
54
  */
55
  function deactivate_enhanced_ecommerce_google_analytics() {
56
+ require_once plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-analytics-deactivator.php';
57
+ Enhanced_Ecommerce_Google_Analytics_Deactivator::deactivate();
58
  }
59
  register_activation_hook( __FILE__, 'activate_enhanced_ecommerce_google_analytics' );
60
  register_deactivation_hook( __FILE__, 'deactivate_enhanced_ecommerce_google_analytics' );
78
  function run_enhanced_ecommerce_google_analytics() {
79
 
80
  $plugin = new Enhanced_Ecommerce_Google_Analytics();
81
+ $plugin->run();
82
+
83
  }
84
  run_enhanced_ecommerce_google_analytics();
includes/class-enhanced-ecommerce-google-analytics-activator.php CHANGED
@@ -23,16 +23,14 @@
23
 
24
  class Enhanced_Ecommerce_Google_Analytics_Activator {
25
 
26
- /**
27
- * Short Description. (use period)
28
- *
29
- * Long Description.
30
- *
31
- * @since 1.0.0
32
- */
33
- public static function activate() {
34
-
35
- }
36
-
37
 
 
38
  }
23
 
24
  class Enhanced_Ecommerce_Google_Analytics_Activator {
25
 
26
+ /**
27
+ * Short Description. (use period)
28
+ *
29
+ * Long Description.
30
+ *
31
+ * @since 1.0.0
32
+ */
33
+ public static function activate() {
 
 
 
34
 
35
+ }
36
  }
includes/class-enhanced-ecommerce-google-analytics-deactivator.php CHANGED
@@ -33,5 +33,4 @@ class Enhanced_Ecommerce_Google_Analytics_Deactivator {
33
  if (!current_user_can('activate_plugins'))
34
  return;
35
  }
36
-
37
  }
33
  if (!current_user_can('activate_plugins'))
34
  return;
35
  }
 
36
  }
includes/class-enhanced-ecommerce-google-analytics-i18n.php CHANGED
@@ -26,7 +26,6 @@
26
  */
27
  class Enhanced_Ecommerce_Google_Analytics_i18n {
28
 
29
-
30
  /**
31
  * Load the plugin text domain for translation.
32
  *
@@ -41,7 +40,4 @@ class Enhanced_Ecommerce_Google_Analytics_i18n {
41
  );
42
 
43
  }
44
-
45
-
46
-
47
  }
26
  */
27
  class Enhanced_Ecommerce_Google_Analytics_i18n {
28
 
 
29
  /**
30
  * Load the plugin text domain for translation.
31
  *
40
  );
41
 
42
  }
 
 
 
43
  }
includes/class-enhanced-ecommerce-google-analytics-loader.php CHANGED
@@ -23,106 +23,104 @@
23
  */
24
  class Enhanced_Ecommerce_Google_Analytics_Loader {
25
 
26
- /**
27
- * The array of actions registered with WordPress.
28
- *
29
- * @since 1.0.0
30
- * @access protected
31
- * @var array $actions The actions registered with WordPress to fire when the plugin loads.
32
- */
33
- protected $actions;
34
-
35
- /**
36
- * The array of filters registered with WordPress.
37
- *
38
- * @since 1.0.0
39
- * @access protected
40
- * @var array $filters The filters registered with WordPress to fire when the plugin loads.
41
- */
42
- protected $filters;
43
-
44
- /**
45
- * Initialize the collections used to maintain the actions and filters.
46
- *
47
- * @since 1.0.0
48
- */
49
- public function __construct() {
50
-
51
- $this->actions = array();
52
- $this->filters = array();
53
-
54
- }
55
-
56
- /**
57
- * Add a new action to the collection to be registered with WordPress.
58
- *
59
- * @since 1.0.0
60
- * @param string $hook The name of the WordPress action that is being registered.
61
- * @param object $component A reference to the instance of the object on which the action is defined.
62
- * @param string $callback The name of the function definition on the $component.
63
- * @param int $priority Optional. The priority at which the function should be fired. Default is 10.
64
- * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
65
- */
66
- public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
67
- $this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
68
- }
69
-
70
- /**
71
- * Add a new filter to the collection to be registered with WordPress.
72
- *
73
- * @since 1.0.0
74
- * @param string $hook The name of the WordPress filter that is being registered.
75
- * @param object $component A reference to the instance of the object on which the filter is defined.
76
- * @param string $callback The name of the function definition on the $component.
77
- * @param int $priority Optional. The priority at which the function should be fired. Default is 10.
78
- * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1
79
- */
80
- public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
81
- $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
82
- }
83
-
84
- /**
85
- * A utility function that is used to register the actions and hooks into a single
86
- * collection.
87
- *
88
- * @since 1.0.0
89
- * @access private
90
- * @param array $hooks The collection of hooks that is being registered (that is, actions or filters).
91
- * @param string $hook The name of the WordPress filter that is being registered.
92
- * @param object $component A reference to the instance of the object on which the filter is defined.
93
- * @param string $callback The name of the function definition on the $component.
94
- * @param int $priority The priority at which the function should be fired.
95
- * @param int $accepted_args The number of arguments that should be passed to the $callback.
96
- * @return array The collection of actions and filters registered with WordPress.
97
- */
98
- private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
99
-
100
- $hooks[] = array(
101
- 'hook' => $hook,
102
- 'component' => $component,
103
- 'callback' => $callback,
104
- 'priority' => $priority,
105
- 'accepted_args' => $accepted_args
106
- );
107
- return $hooks;
108
-
109
- }
110
-
111
- /**
112
- * Register the filters and actions with WordPress.
113
- *
114
- * @since 1.0.0
115
- */
116
- public function run() {
117
-
118
- foreach ( $this->filters as $hook ) {
119
- add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
120
- }
121
-
122
- foreach ( $this->actions as $hook ) {
123
- add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
124
- }
125
-
126
- }
127
-
128
  }
23
  */
24
  class Enhanced_Ecommerce_Google_Analytics_Loader {
25
 
26
+ /**
27
+ * The array of actions registered with WordPress.
28
+ *
29
+ * @since 1.0.0
30
+ * @access protected
31
+ * @var array $actions The actions registered with WordPress to fire when the plugin loads.
32
+ */
33
+ protected $actions;
34
+
35
+ /**
36
+ * The array of filters registered with WordPress.
37
+ *
38
+ * @since 1.0.0
39
+ * @access protected
40
+ * @var array $filters The filters registered with WordPress to fire when the plugin loads.
41
+ */
42
+ protected $filters;
43
+
44
+ /**
45
+ * Initialize the collections used to maintain the actions and filters.
46
+ *
47
+ * @since 1.0.0
48
+ */
49
+ public function __construct() {
50
+
51
+ $this->actions = array();
52
+ $this->filters = array();
53
+
54
+ }
55
+
56
+ /**
57
+ * Add a new action to the collection to be registered with WordPress.
58
+ *
59
+ * @since 1.0.0
60
+ * @param string $hook The name of the WordPress action that is being registered.
61
+ * @param object $component A reference to the instance of the object on which the action is defined.
62
+ * @param string $callback The name of the function definition on the $component.
63
+ * @param int $priority Optional. The priority at which the function should be fired. Default is 10.
64
+ * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
65
+ */
66
+ public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
67
+ $this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
68
+ }
69
+
70
+ /**
71
+ * Add a new filter to the collection to be registered with WordPress.
72
+ *
73
+ * @since 1.0.0
74
+ * @param string $hook The name of the WordPress filter that is being registered.
75
+ * @param object $component A reference to the instance of the object on which the filter is defined.
76
+ * @param string $callback The name of the function definition on the $component.
77
+ * @param int $priority Optional. The priority at which the function should be fired. Default is 10.
78
+ * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1
79
+ */
80
+ public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
81
+ $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
82
+ }
83
+
84
+ /**
85
+ * A utility function that is used to register the actions and hooks into a single
86
+ * collection.
87
+ *
88
+ * @since 1.0.0
89
+ * @access private
90
+ * @param array $hooks The collection of hooks that is being registered (that is, actions or filters).
91
+ * @param string $hook The name of the WordPress filter that is being registered.
92
+ * @param object $component A reference to the instance of the object on which the filter is defined.
93
+ * @param string $callback The name of the function definition on the $component.
94
+ * @param int $priority The priority at which the function should be fired.
95
+ * @param int $accepted_args The number of arguments that should be passed to the $callback.
96
+ * @return array The collection of actions and filters registered with WordPress.
97
+ */
98
+ private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
99
+
100
+ $hooks[] = array(
101
+ 'hook' => $hook,
102
+ 'component' => $component,
103
+ 'callback' => $callback,
104
+ 'priority' => $priority,
105
+ 'accepted_args' => $accepted_args
106
+ );
107
+ return $hooks;
108
+
109
+ }
110
+
111
+ /**
112
+ * Register the filters and actions with WordPress.
113
+ *
114
+ * @since 1.0.0
115
+ */
116
+ public function run() {
117
+
118
+ foreach ( $this->filters as $hook ) {
119
+ add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
120
+ }
121
+
122
+ foreach ( $this->actions as $hook ) {
123
+ add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
124
+ }
125
+ }
 
 
126
  }
includes/class-enhanced-ecommerce-google-analytics.php CHANGED
@@ -29,226 +29,224 @@
29
  */
30
  class Enhanced_Ecommerce_Google_Analytics {
31
 
32
- /**
33
- * The loader that's responsible for maintaining and registering all hooks that power
34
- * the plugin.
35
- *
36
- * @since 1.0.0
37
- * @access protected
38
- * @var Enhanced_Ecommerce_Google_Analytics_Loader $loader Maintains and registers all hooks for the plugin.
39
- */
40
- protected $loader;
41
-
42
- /**
43
- * The unique identifier of this plugin.
44
- *
45
- * @since 1.0.0
46
- * @access protected
47
- * @var string $plugin_name The string used to uniquely identify this plugin.
48
- */
49
- protected $plugin_name;
50
-
51
- /**
52
- * The current version of the plugin.
53
- *
54
- * @since 1.0.0
55
- * @access protected
56
- * @var string $version The current version of the plugin.
57
- */
58
- protected $version;
59
-
60
- /**
61
- * Define the core functionality of the plugin.
62
- *
63
- * Set the plugin name and the plugin version that can be used throughout the plugin.
64
- * Load the dependencies, define the locale, and set the hooks for the admin area and
65
- * the public-facing side of the site.
66
- *
67
- * @since 1.0.0
68
- */
69
- public function __construct() {
70
- if ( defined( 'PLUGIN_NAME_VERSION' ) ) {
71
- $this->version = PLUGIN_NAME_VERSION;
72
- } else {
73
- $this->version = '2.2.0';
74
- }
75
- $this->plugin_name = 'enhanced-ecommerce-google-analytics';
76
- $this->load_dependencies();
77
- $this->set_locale();
78
- $this->define_admin_hooks();
79
- $this->define_public_hooks();
80
- add_filter( 'plugin_action_links_' .plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_name . '.php' ), array($this,'tvc_plugin_action_links'),10 );
81
- }
82
-
83
- /**
84
- * Load the required dependencies for this plugin.
85
- *
86
- * Include the following files that make up the plugin:
87
- *
88
- * - Enhanced_Ecommerce_Google_Analytics_Loader. Orchestrates the hooks of the plugin.
89
- * - Enhanced_Ecommerce_Google_Analytics_i18n. Defines internationalization functionality.
90
- * - Enhanced_Ecommerce_Google_Analytics_Admin. Defines all hooks for the admin area.
91
- * - Enhanced_Ecommerce_Google_Analytics_Public. Defines all hooks for the public side of the site.
92
- *
93
- * Create an instance of the loader which will be used to register the hooks
94
- * with WordPress.
95
- *
96
- * @since 1.0.0
97
- * @access private
98
- */
99
- private function load_dependencies() {
100
-
101
- /**
102
- * The class responsible for orchestrating the actions and filters of the
103
- * core plugin.
104
- */
105
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-enhanced-ecommerce-google-analytics-loader.php';
106
-
107
- /**
108
- * The class responsible for defining internationalization functionality
109
- * of the plugin.
110
- */
111
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-enhanced-ecommerce-google-analytics-i18n.php';
112
-
113
- /**
114
- * The class responsible for defining all actions that occur in the admin area.
115
- */
116
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-enhanced-ecommerce-google-analytics-admin.php';
117
-
118
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-enhanced-ecommerce-google-analytics-settings.php';
119
-
120
- /**
121
- * The class responsible for defining all actions that occur in the public-facing
122
- * side of the site.
123
- */
124
-
125
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-enhanced-ecommerce-google-analytics-public.php';
126
- $this->loader = new Enhanced_Ecommerce_Google_Analytics_Loader();
127
-
128
- }
129
-
130
- /**
131
- * Define the locale for this plugin for internationalization.
132
- *
133
- * Uses the Enhanced_Ecommerce_Google_Analytics_i18n class in order to set the domain and to register the hook
134
- * with WordPress.
135
- *
136
- * @since 1.0.0
137
- * @access private
138
- */
139
- private function set_locale() {
140
-
141
- $plugin_i18n = new Enhanced_Ecommerce_Google_Analytics_i18n();
142
-
143
- $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
144
-
145
- }
146
-
147
- /**
148
- * Register all of the hooks related to the admin area functionality
149
- * of the plugin.
150
- *
151
- * @since 1.0.0
152
- * @access private
153
- */
154
- private function define_admin_hooks() {
155
-
156
- $plugin_admin = new Enhanced_Ecommerce_Google_Analytics_Admin( $this->get_plugin_name(), $this->get_version() );
157
- $this->loader->add_action( 'admin_menu', $plugin_admin, 'display_admin_page' );
158
- // $this->loader->add_action("admin_menu", $plugin_admin, "add_new_menu");
159
- $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
160
- $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
161
- }
162
-
163
- /**
164
- * Register all of the hooks related to the public-facing functionality
165
- * of the plugin.
166
- *
167
- * @since 1.0.0
168
- * @access private
169
- */
170
- private function define_public_hooks() {
171
-
172
- $plugin_public = new Enhanced_Ecommerce_Google_Analytics_Public( $this->get_plugin_name(), $this->get_version() );
173
- $this->loader->add_action("wp_head", $plugin_public, "ee_settings");
174
- $this->loader->add_action("wp_footer", $plugin_public, "t_products_impre_clicks");
175
- $this->loader->add_action("woocommerce_thankyou", $plugin_public, "ecommerce_tracking_code");
176
- $this->loader->add_action("woocommerce_after_shop_loop_item", $plugin_public, "bind_product_metadata");
177
- $this->loader->add_action("woocommerce_after_single_product", $plugin_public, "product_detail_view");
178
- $this->loader->add_action("woocommerce_after_cart",$plugin_public, "remove_cart_tracking");
179
- //check out step 1,2,3
180
- $this->loader->add_action("woocommerce_before_checkout_billing_form", $plugin_public, "checkout_step_1_tracking");
181
  $this->loader->add_action("woocommerce_after_checkout_billing_form", $plugin_public, "checkout_step_2_tracking");
182
  $this->loader->add_action("woocommerce_after_checkout_billing_form", $plugin_public, "checkout_step_3_tracking");
183
  $this->loader->add_action("woocommerce_after_add_to_cart_button", $plugin_public, "add_to_cart");
184
-
185
  //Advanced Store data Tracking
186
- //add version details in footer
187
- $this->loader->add_action("wp_footer", $plugin_public, "add_plugin_details");
188
-
189
  //Add Dev ID
190
  $this->loader->add_action("wp_head", $plugin_public, "add_dev_id");
191
  $this->loader->add_action("wp_footer",$plugin_public, "tvc_store_meta_data");
192
- }
193
-
194
- /**
195
- * Run the loader to execute all of the hooks with WordPress.
196
- *
197
- * @since 1.0.0
198
- */
199
- public function run() {
200
- if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
201
- add_action('woocommerce_init' , function (){
202
- $this->loader->run();
203
- });
204
- }
205
- else{
206
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
207
- if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
208
- $this->loader->run();
209
- }
210
- }
211
- }
212
-
213
- /**
214
- * The name of the plugin used to uniquely identify it within the context of
215
- * WordPress and to define internationalization functionality.
216
- *
217
- * @since 1.0.0
218
- * @return string The name of the plugin.
219
- */
220
- public function get_plugin_name() {
221
- return $this->plugin_name;
222
- }
223
-
224
- /**
225
- * The reference to the class that orchestrates the hooks with the plugin.
226
- *
227
- * @since 1.0.0
228
- * @return Enhanced_Ecommerce_Google_Analytics_Loader Orchestrates the hooks of the plugin.
229
- */
230
- public function get_loader() {
231
- return $this->loader;
232
- }
233
-
234
- /**
235
- * Retrieve the version number of the plugin.
236
- *
237
- * @since 1.0.0
238
- * @return string The version number of the plugin.
239
- */
240
- public function get_version() {
241
- return $this->version;
242
- }
243
-
244
- public function tvc_plugin_action_links($links) {
245
- $setting_url = 'admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=general_settings';
246
- $links[] = '<a href="' . get_admin_url(null, $setting_url) . '">Settings</a>';
247
- $links[] = '<a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#faq" target="_blank">FAQ</a>';
248
- $links[] = '<a href="http://plugins.tatvic.com/downloads/EE-Woocommerce-Plugin-Documentation.pdf" target="_blank">Documentation</a>';
249
- $links[] = '<a href="https://1.envato.market/Yvn3R" target="_blank"><b>Upgrade to Premium</b></a>';
250
- return $links;
251
- }
252
-
253
-
254
  }
29
  */
30
  class Enhanced_Ecommerce_Google_Analytics {
31
 
32
+ /**
33
+ * The loader that's responsible for maintaining and registering all hooks that power
34
+ * the plugin.
35
+ *
36
+ * @since 1.0.0
37
+ * @access protected
38
+ * @var Enhanced_Ecommerce_Google_Analytics_Loader $loader Maintains and registers all hooks for the plugin.
39
+ */
40
+ protected $loader;
41
+
42
+ /**
43
+ * The unique identifier of this plugin.
44
+ *
45
+ * @since 1.0.0
46
+ * @access protected
47
+ * @var string $plugin_name The string used to uniquely identify this plugin.
48
+ */
49
+ protected $plugin_name;
50
+
51
+ /**
52
+ * The current version of the plugin.
53
+ *
54
+ * @since 1.0.0
55
+ * @access protected
56
+ * @var string $version The current version of the plugin.
57
+ */
58
+ protected $version;
59
+
60
+ /**
61
+ * Define the core functionality of the plugin.
62
+ *
63
+ * Set the plugin name and the plugin version that can be used throughout the plugin.
64
+ * Load the dependencies, define the locale, and set the hooks for the admin area and
65
+ * the public-facing side of the site.
66
+ *
67
+ * @since 1.0.0
68
+ */
69
+ public function __construct() {
70
+ if ( defined( 'PLUGIN_NAME_VERSION' ) ) {
71
+ $this->version = PLUGIN_NAME_VERSION;
72
+ } else {
73
+ $this->version = '2.2.1';
74
+ }
75
+ $this->plugin_name = 'enhanced-ecommerce-google-analytics';
76
+ $this->load_dependencies();
77
+ $this->set_locale();
78
+ $this->define_admin_hooks();
79
+ $this->define_public_hooks();
80
+ add_filter( 'plugin_action_links_' .plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_name . '.php' ), array($this,'tvc_plugin_action_links'),10 );
81
+ }
82
+
83
+ /**
84
+ * Load the required dependencies for this plugin.
85
+ *
86
+ * Include the following files that make up the plugin:
87
+ *
88
+ * - Enhanced_Ecommerce_Google_Analytics_Loader. Orchestrates the hooks of the plugin.
89
+ * - Enhanced_Ecommerce_Google_Analytics_i18n. Defines internationalization functionality.
90
+ * - Enhanced_Ecommerce_Google_Analytics_Admin. Defines all hooks for the admin area.
91
+ * - Enhanced_Ecommerce_Google_Analytics_Public. Defines all hooks for the public side of the site.
92
+ *
93
+ * Create an instance of the loader which will be used to register the hooks
94
+ * with WordPress.
95
+ *
96
+ * @since 1.0.0
97
+ * @access private
98
+ */
99
+ private function load_dependencies() {
100
+
101
+ /**
102
+ * The class responsible for orchestrating the actions and filters of the
103
+ * core plugin.
104
+ */
105
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-enhanced-ecommerce-google-analytics-loader.php';
106
+
107
+ /**
108
+ * The class responsible for defining internationalization functionality
109
+ * of the plugin.
110
+ */
111
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-enhanced-ecommerce-google-analytics-i18n.php';
112
+
113
+ /**
114
+ * The class responsible for defining all actions that occur in the admin area.
115
+ */
116
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-enhanced-ecommerce-google-analytics-admin.php';
117
+
118
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-enhanced-ecommerce-google-analytics-settings.php';
119
+
120
+ /**
121
+ * The class responsible for defining all actions that occur in the public-facing
122
+ * side of the site.
123
+ */
124
+
125
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-enhanced-ecommerce-google-analytics-public.php';
126
+ $this->loader = new Enhanced_Ecommerce_Google_Analytics_Loader();
127
+
128
+ }
129
+
130
+ /**
131
+ * Define the locale for this plugin for internationalization.
132
+ *
133
+ * Uses the Enhanced_Ecommerce_Google_Analytics_i18n class in order to set the domain and to register the hook
134
+ * with WordPress.
135
+ *
136
+ * @since 1.0.0
137
+ * @access private
138
+ */
139
+ private function set_locale() {
140
+
141
+ $plugin_i18n = new Enhanced_Ecommerce_Google_Analytics_i18n();
142
+
143
+ $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
144
+
145
+ }
146
+
147
+ /**
148
+ * Register all of the hooks related to the admin area functionality
149
+ * of the plugin.
150
+ *
151
+ * @since 1.0.0
152
+ * @access private
153
+ */
154
+ private function define_admin_hooks() {
155
+
156
+ $plugin_admin = new Enhanced_Ecommerce_Google_Analytics_Admin( $this->get_plugin_name(), $this->get_version() );
157
+ $this->loader->add_action( 'admin_menu', $plugin_admin, 'display_admin_page' );
158
+ // $this->loader->add_action("admin_menu", $plugin_admin, "add_new_menu");
159
+ $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
160
+ $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
161
+ }
162
+
163
+ /**
164
+ * Register all of the hooks related to the public-facing functionality
165
+ * of the plugin.
166
+ *
167
+ * @since 1.0.0
168
+ * @access private
169
+ */
170
+ private function define_public_hooks() {
171
+
172
+ $plugin_public = new Enhanced_Ecommerce_Google_Analytics_Public( $this->get_plugin_name(), $this->get_version() );
173
+ $this->loader->add_action("wp_head", $plugin_public, "ee_settings");
174
+ $this->loader->add_action("wp_footer", $plugin_public, "t_products_impre_clicks");
175
+ $this->loader->add_action("woocommerce_after_shop_loop_item", $plugin_public, "bind_product_metadata");
176
+ $this->loader->add_action("woocommerce_thankyou", $plugin_public, "ecommerce_tracking_code");
177
+ $this->loader->add_action("woocommerce_after_single_product", $plugin_public, "product_detail_view");
178
+ $this->loader->add_action("woocommerce_after_cart",$plugin_public, "remove_cart_tracking");
179
+ //check out step 1,2,3
180
+ $this->loader->add_action("woocommerce_before_checkout_billing_form", $plugin_public, "checkout_step_1_tracking");
181
  $this->loader->add_action("woocommerce_after_checkout_billing_form", $plugin_public, "checkout_step_2_tracking");
182
  $this->loader->add_action("woocommerce_after_checkout_billing_form", $plugin_public, "checkout_step_3_tracking");
183
  $this->loader->add_action("woocommerce_after_add_to_cart_button", $plugin_public, "add_to_cart");
184
+
185
  //Advanced Store data Tracking
186
+ //add version details in footer
187
+ $this->loader->add_action("wp_footer", $plugin_public, "add_plugin_details");
188
+
189
  //Add Dev ID
190
  $this->loader->add_action("wp_head", $plugin_public, "add_dev_id");
191
  $this->loader->add_action("wp_footer",$plugin_public, "tvc_store_meta_data");
192
+ }
193
+
194
+ /**
195
+ * Run the loader to execute all of the hooks with WordPress.
196
+ *
197
+ * @since 1.0.0
198
+ */
199
+ public function run() {
200
+ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
201
+ add_action('woocommerce_init' , function (){
202
+ $this->loader->run();
203
+ });
204
+ }
205
+ else{
206
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
207
+ if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
208
+ $this->loader->run();
209
+ }
210
+ }
211
+ }
212
+
213
+ /**
214
+ * The name of the plugin used to uniquely identify it within the context of
215
+ * WordPress and to define internationalization functionality.
216
+ *
217
+ * @since 1.0.0
218
+ * @return string The name of the plugin.
219
+ */
220
+ public function get_plugin_name() {
221
+ return $this->plugin_name;
222
+ }
223
+
224
+ /**
225
+ * The reference to the class that orchestrates the hooks with the plugin.
226
+ *
227
+ * @since 1.0.0
228
+ * @return Enhanced_Ecommerce_Google_Analytics_Loader Orchestrates the hooks of the plugin.
229
+ */
230
+ public function get_loader() {
231
+ return $this->loader;
232
+ }
233
+
234
+ /**
235
+ * Retrieve the version number of the plugin.
236
+ *
237
+ * @since 1.0.0
238
+ * @return string The version number of the plugin.
239
+ */
240
+ public function get_version() {
241
+ return $this->version;
242
+ }
243
+
244
+ public function tvc_plugin_action_links($links) {
245
+ $setting_url = 'admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=general_settings';
246
+ $links[] = '<a href="' . get_admin_url(null, $setting_url) . '">Settings</a>';
247
+ $links[] = '<a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#faq" target="_blank">FAQ</a>';
248
+ $links[] = '<a href="http://plugins.tatvic.com/downloads/EE-Woocommerce-Plugin-Documentation.pdf" target="_blank">Documentation</a>';
249
+ $links[] = '<a href="https://1.envato.market/Yvn3R" target="_blank"><b>Upgrade to Premium</b></a>';
250
+ return $links;
251
+ }
 
 
252
  }
includes/index.php CHANGED
@@ -1 +1,4 @@
1
- <?php // Silence is golden
 
 
 
1
+ <?php
2
+ /**
3
+ * Silence is golden
4
+ */
index.php CHANGED
@@ -1 +1,4 @@
1
- <?php // Silence is golden
 
 
 
1
+ <?php
2
+ /**
3
+ * Silence Is Golden
4
+ */
public/class-enhanced-ecommerce-google-analytics-public.php CHANGED
@@ -21,7 +21,7 @@
21
  * @author Chiranjiv Pathak <chiranjiv@tatvic.com>
22
  */
23
  class Enhanced_Ecommerce_Google_Analytics_Public {
24
- /**
25
  * Init and hook in the integration.
26
  *
27
  * @access public
@@ -29,74 +29,63 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
29
  */
30
  //set plugin version
31
  public $tvc_eeVer = '2.2.0';
32
-
33
- protected $tvc_aga;
34
-
35
- protected $ga_id;
36
-
37
- protected $ga_LC;
38
-
39
- protected $ga_ST;
40
-
41
- protected $ga_gCkout;
42
-
43
- protected $ga_eeT;
44
-
45
- protected $ga_DF;
46
-
47
- protected $ga_imTh;
48
-
49
- protected $ga_OPTOUT;
50
-
51
- protected $ga_PrivacyPolicy;
52
-
53
- protected $ga_IPA;
54
-
55
  public function __construct($plugin_name, $version) {
56
-
57
-
58
- //session for product position count
59
- //session_start inserted bcoz it gives warning ---- 2.1.5
60
-
61
- //removal of session_start because it gives warning in wp backend editor ---- 2.1.6
62
- // if (session_status() == PHP_SESSION_NONE) {
63
- // session_start();
64
- // }
65
- // $_SESSION['t_npcnt']=0;
66
- // $_SESSION['t_fpcnt']=0;
67
- // Define user set variables -- Always use short names
68
- $this->plugin_name = $plugin_name;
69
- $this->version = $version;
70
- $this->tvc_aga = $this->get_option("tvc_aga");
71
  $this->ga_id = $this->get_option("ga_id");
72
  $this->ga_ST = $this->get_option("ga_ST");
73
  $this->ga_gCkout = $this->get_option("ga_gCkout") == "on" ? true : false; //guest checkout
74
  $this->ga_gUser = $this->get_option("ga_gUser") == "on" ? true : false; //guest checkout
75
  $this->ga_eeT = $this->get_option("ga_eeT");
76
  $this->ga_DF = $this->get_option("ga_DF") == "on" ? true : false;
77
- $this->ga_imTh = $this->get_option("ga_imTh") == "" ? 6 : $this->get_option("ga_imTh");
78
  $this->ga_OPTOUT = $this->get_option("ga_OPTOUT") == "on" ? true : false; //Google Analytics Opt Out
79
  $this->ga_PrivacyPolicy = $this->get_option("ga_PrivacyPolicy") == "on" ? true : false;
80
  $this->ga_IPA = $this->get_option("ga_IPA") == "on" ? true : false; //IP Anony.
81
-
82
- if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
83
- // Put your plugin code here
84
- add_action('woocommerce_init' , function (){
85
- $this->ga_LC = get_woocommerce_currency(); //Local Currency from Back end
86
- $this->wc_version_compare("tvc_lc=" . json_encode($this->ga_LC) . ";");
87
- });
88
- }
 
 
 
 
 
 
 
 
 
 
89
  }
90
- public function get_option($key){
91
- $ee_options = array();
92
- $my_option = get_option( 'ee_options' );
93
- if(!empty($my_option)){
94
- $ee_options = unserialize($my_option);
95
- }
96
- if(isset($ee_options[$key])){
97
- return $ee_options[$key];
98
- }
99
- }
100
  /**
101
  * Get store meta data for trouble shoot
102
  * @access public
@@ -107,25 +96,25 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
107
  global $woocommerce;
108
  $tvc_sMetaData = array();
109
 
110
- $tvc_sMetaData = array(
111
- 'tvc_wcv' => $woocommerce->version,
112
- 'tvc_wpv' => get_bloginfo('version'),
113
- 'tvc_eev' => $this->tvc_eeVer,
114
- 'tvc_cnf' => array(
115
- 't_ee' => $this->ga_eeT,
116
- 't_df' => $this->ga_DF,
117
- 't_gUser'=>$this->ga_gUser,
118
- 't_UAen'=>$this->ga_ST,
119
- 't_thr' => $this->ga_imTh,
120
- 't_IPA' => $this->ga_IPA,
121
- 't_OptOut' => $this->ga_OPTOUT,
122
- 't_PrivacyPolicy' => $this->ga_PrivacyPolicy,
123
- )
124
- );
125
- $this->wc_version_compare("tvc_smd=" . json_encode($tvc_sMetaData) . ";");
126
  }
127
 
128
- /**
129
  * add dev id
130
  *
131
  * @access public
@@ -144,7 +133,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
144
  function add_plugin_details() {
145
  echo '<!--Enhanced Ecommerce Google Analytics Plugin for Woocommerce by Tatvic Plugin Version:'.$this->tvc_eeVer.'-->';
146
  }
147
-
148
  /**
149
  * Check if tracking is disabled
150
  *
@@ -166,7 +155,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
166
  */
167
  function wc_version_compare($codeSnippet) {
168
  global $woocommerce;
169
-
170
  if (version_compare($woocommerce->version, "2.1", ">=")) {
171
  wc_enqueue_js($codeSnippet);
172
  } else {
@@ -174,7 +163,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
174
  }
175
  }
176
  /**
177
- * Enhanced Ecommerce GA plugin Settings
178
  *
179
  * @access public
180
  * @return void
@@ -192,7 +181,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
192
  return;
193
  }
194
  //common validation----end
195
- $set_domain_name = "auto";
196
  // IP Anonymization
197
  if ($this->ga_IPA) {
198
  $ga_ip_anonymization = '"anonymize_ip":true,';
@@ -200,7 +189,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
200
  $ga_ip_anonymization ="";
201
  }
202
  if($this->ga_OPTOUT) {
203
- echo '<script>
204
  // Set to the same value as the web property used on the site
205
  var gaProperty = "'.$tracking_id.'";
206
 
@@ -227,9 +216,9 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
227
  gtag("config", "'.esc_js($tracking_id).'",{'.$ga_ip_anonymization.' "cookie_domain":"'.$set_domain_name.'"});
228
  </script>
229
  ';
230
- echo $code;
231
- }
232
-
233
  /**
234
  * Google Analytics eCommerce tracking
235
  *
@@ -238,7 +227,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
238
  * @return void
239
  */
240
  function ecommerce_tracking_code($order_id) {
241
-
242
  global $woocommerce;
243
  if ($this->disable_tracking($this->ga_eeT) || current_user_can("manage_options") || get_post_meta($order_id, "_tracked", true) == 1)
244
  return;
@@ -276,14 +265,14 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
276
  foreach ($order->get_items() as $item) {
277
  $_product = $order->get_product_from_item($item);
278
  if (isset($_product->variation_data)) {
279
- $categories=esc_js(wc_get_formatted_variation($_product->get_variation_attributes(), true));
280
-
281
  } else {
282
  $out = array();
283
  if(version_compare($woocommerce->version, "2.7", "<")){
284
- $categories = get_the_terms($_product->id, "product_cat");
285
  }else{
286
- $categories = get_the_terms($_product->get_id(), "product_cat");
287
  }
288
 
289
  if ($categories) {
@@ -295,48 +284,48 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
295
  }
296
  //orderpage Prod json
297
  if(version_compare($woocommerce->version, "2.7", "<")){
298
- $orderpage_prod_Array[get_permalink($_product->id)]=array(
299
- "tvc_id" => esc_html($_product->id),
300
- "tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->id),
301
  "tvc_n" => html_entity_decode($item["name"]),
302
  "tvc_p" => esc_js($order->get_item_total($item)),
303
  "tvc_c" => $categories,
304
  "tvc_q"=>esc_js($item["qty"])
305
- );
306
  }else{
307
- $orderpage_prod_Array[get_permalink($_product->get_id())]=array(
308
  "tvc_id" => esc_html($_product->get_id()),
309
  "tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->get_id()),
310
  "tvc_n" => html_entity_decode($_product->get_title()),
311
  "tvc_p" => esc_js($order->get_item_total($item)),
312
  "tvc_c" => $categories,
313
  "tvc_q"=>esc_js($item["qty"])
314
- );
315
- }
316
  }
317
  //make json for prod meta data on order page
318
- $this->wc_version_compare("tvc_oc=" . json_encode($orderpage_prod_Array) . ";");
319
  }
320
 
321
- //get shipping cost based on version >2.1 get_total_shipping() < get_shipping
322
- if (version_compare($woocommerce->version, "2.1", ">=")) {
323
- $tvc_sc = $order->get_total_shipping();
324
- } else {
325
- $tvc_sc = $order->get_shipping();
326
- }
327
- //orderpage transcation data json
328
- $orderpage_trans_Array=array(
329
- "id"=> esc_js($order->get_order_number()), // Transaction ID. Required
330
- "affiliation"=> esc_js(get_bloginfo('name')), // Affiliation or store name
331
- "revenue"=>esc_js($order->get_total()), // Grand Total
332
- "tax"=> esc_js($order->get_total_tax()), // Tax
333
- "shipping"=> esc_js($tvc_sc), // Shipping
334
- "coupon"=>$coupons_list
335
- );
336
- //make json for trans data on order page
337
- $this->wc_version_compare("tvc_td=" . json_encode($orderpage_trans_Array) . ";");
338
-
339
- $code ='
340
  var items = [];
341
  //set local currencies
342
  gtag("set", {"currency": tvc_lc});
@@ -382,8 +371,9 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
382
  if (!is_single())
383
  return;
384
  global $product,$woocommerce;
 
385
  if(version_compare($woocommerce->version, "2.7", "<")){
386
- $category = get_the_terms($product->ID, "product_cat");
387
  }else{
388
  $category = get_the_terms($product->get_id(), "product_cat");
389
  }
@@ -398,11 +388,11 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
398
 
399
  $code = '
400
  var items = [];
401
- //set local currencies
402
  gtag("set", {"currency": tvc_lc});
403
  jQuery("[class*=single_add_to_cart_button]").click(function() {
404
 
405
- // Enhanced E-commerce Add to cart clicks
406
  gtag("event", "add_to_cart", {
407
  "event_category":"Enhanced-Ecommerce",
408
  "event_label":"add_to_cart_click",
@@ -430,14 +420,13 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
430
  */
431
  public function product_detail_view() {
432
 
433
-
434
  if ($this->disable_tracking($this->ga_eeT)) {
435
  return;
436
  }
437
 
438
  global $product,$woocommerce;
439
  if(version_compare($woocommerce->version, "2.7", "<")){
440
- $category = get_the_terms($product->ID, "product_cat");
441
  }else{
442
  $category = get_the_terms($product->get_id(), "product_cat");
443
  }
@@ -452,27 +441,28 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
452
  //product detail view json
453
  if(version_compare($woocommerce->version, "2.7", "<")){
454
  $prodpage_detail_json = array(
455
- "tvc_id" => esc_html($product->id),
456
- "tvc_i" => $product->get_sku() ? $product->get_sku() : $product->id,
457
- "tvc_n" => $product->get_title(),
458
- "tvc_c" => $categories,
459
- "tvc_p" => $product->get_price()
460
- );
461
  }else{
462
  $prodpage_detail_json = array(
463
- "tvc_id" => esc_html($product->get_id()),
464
- "tvc_i" => $product->get_sku() ? $product->get_sku() : $product->get_id(),
465
- "tvc_n" => $product->get_title(),
466
- "tvc_c" => $categories,
467
- "tvc_p" => $product->get_price()
468
- );
469
  }
470
-
471
- if (empty($prodpage_detail_json)) { //prod page array
 
472
  $prodpage_detail_json = array();
473
  }
474
  //prod page detail view json
475
- $this->wc_version_compare("tvc_po=" . json_encode($prodpage_detail_json) . ";");
476
  $code = '
477
  gtag("event", "view_item", {
478
  "event_category":"Enhanced-Ecommerce",
@@ -489,8 +479,8 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
489
  ';
490
  //check woocommerce version
491
  if(is_product()){
492
- $this->wc_version_compare($code);
493
- }
494
  }
495
 
496
  /**
@@ -502,18 +492,17 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
502
  */
503
  public function bind_product_metadata() {
504
 
505
-
506
  if ($this->disable_tracking($this->ga_eeT)) {
507
  return;
508
  }
509
 
510
  global $product,$woocommerce;
511
  if (version_compare($woocommerce->version, "2.7", "<")) {
512
- $category = get_the_terms($product->Id, "product_cat");
513
- } else {
514
- $category = get_the_terms($product->get_id(), "product_cat");
515
- }
516
-
517
  $categories = "";
518
 
519
  if ($category) {
@@ -530,60 +519,60 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
530
  if (!is_array($homepage_json_fp) && !is_array($homepage_json_rp) && !is_array($homepage_json_ATC_link)) {
531
  $homepage_json_fp = array();
532
  $homepage_json_rp = array();
533
- $homepage_json_ATC_link=array();
534
  }
535
 
536
- // ATC link Array
537
- if(version_compare($woocommerce->version, "2.7", "<")){
538
- $homepage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->id));
539
- }else{
540
- $homepage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->get_id()));
541
- }
542
- //check if product is featured product or not
543
  if ($product->is_featured()) {
544
- //check if product is already exists in homepage featured json
545
- if(version_compare($woocommerce->version, "2.7", "<")){
546
  if(!array_key_exists(get_permalink($product->id),$homepage_json_fp)){
547
- $homepage_json_fp[get_permalink($product->id)] = array(
548
- "tvc_id" => esc_html($product->id),
549
- "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->id),
550
- "tvc_n" => esc_html($product->get_title()),
551
- "tvc_p" => esc_html($product->get_price()),
552
- "tvc_c" => esc_html($categories),
553
- "ATC-link"=>$product->add_to_cart_url()
554
- );
555
- //else add product in homepage recent product json
556
- }else {
557
- $homepage_json_rp[get_permalink($product->id)] =array(
558
- "tvc_id" => esc_html($product->id),
559
- "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->id),
560
- "tvc_n" => esc_html($product->get_title()),
561
- "tvc_p" => esc_html($product->get_price()),
562
- "tvc_c" => esc_html($categories)
563
- );
564
- }
565
- }else{
566
  if(!array_key_exists(get_permalink($product->get_id()),$homepage_json_fp)){
567
- $homepage_json_fp[get_permalink($product->get_id())] = array(
568
- "tvc_id" => esc_html($product->get_id()),
569
- "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->get_id()),
570
- "tvc_n" => esc_html($product->get_title()),
571
- "tvc_p" => esc_html($product->get_price()),
572
- "tvc_c" => esc_html($categories),
573
- "ATC-link"=>$product->add_to_cart_url()
574
- );
575
- //else add product in homepage recent product json
576
- }else {
577
- $homepage_json_rp[get_permalink($product->get_id())] =array(
578
- "tvc_id" => esc_html($product->get_id()),
579
- "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->get_id()),
580
- "tvc_n" => esc_html($product->get_title()),
581
- "tvc_p" => esc_html($product->get_price()),
582
- "tvc_c" => esc_html($categories)
583
- );
584
- }
585
- }
586
-
587
  } else {
588
  //else prod add in homepage recent json
589
  if(version_compare($woocommerce->version, "2.7", "<")){
@@ -593,7 +582,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
593
  "tvc_n" => esc_html($product->get_title()),
594
  "tvc_p" => esc_html($product->get_price()),
595
  "tvc_c" => esc_html($categories)
596
- );
597
  }else{
598
  $homepage_json_rp[get_permalink($product->get_id())] =array(
599
  "tvc_id" => esc_html($product->get_id()),
@@ -601,9 +590,9 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
601
  "tvc_n" => esc_html($product->get_title()),
602
  "tvc_p" => esc_html($product->get_price()),
603
  "tvc_c" => esc_html($categories)
604
- );
605
  }
606
-
607
  }
608
  }
609
  //if product page then related product page array
@@ -615,58 +604,57 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
615
  // ATC link Array
616
  if(version_compare($woocommerce->version, "2.7", "<")){
617
  $prodpage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->id));
618
-
619
- $prodpage_json_relProd[get_permalink($product->id)] = array(
620
- "tvc_id" => esc_html($product->id),
621
- "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->id),
622
- "tvc_n" => esc_html($product->get_title()),
623
- "tvc_p" => esc_html($product->get_price()),
624
- "tvc_c" => esc_html($categories),
625
  );
626
  }else{
627
- $prodpage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->get_id()));
628
-
629
- $prodpage_json_relProd[get_permalink($product->get_id())] = array(
630
- "tvc_id" => esc_html($product->get_id()),
631
- "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->get_id()),
632
- "tvc_n" => esc_html($product->get_title()),
633
- "tvc_p" => esc_html($product->get_price()),
634
- "tvc_c" => esc_html($categories)
635
-
636
  );
637
  }
638
  }
639
  //category page, search page and shop page json
640
  else if (is_product_category() || is_search() || is_shop()) {
641
- if (!is_array($catpage_json) && !is_array($catpage_json_ATC_link)){
642
- $catpage_json=array();
643
- $catpage_json_ATC_link=array();
644
- }
645
- //cat page ATC array
646
- if(version_compare($woocommerce->version, "2.7", "<")){
647
  $catpage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->id));
648
 
649
- $catpage_json[get_permalink($product->id)] =array(
650
- "tvc_id" => esc_html($product->id),
651
- "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->id),
652
- "tvc_n" => esc_html($product->get_title()),
653
- "tvc_p" => esc_html($product->get_price()),
654
- "tvc_c" => esc_html($categories),
655
  );
656
- }else{
657
  $catpage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->get_id()));
658
 
659
  $catpage_json[get_permalink($product->get_id())] =array(
660
- "tvc_id" => esc_html($product->get_id()),
661
- "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->get_id()),
662
- "tvc_n" => esc_html($product->get_title()),
663
- "tvc_p" => esc_html($product->get_price()),
664
- "tvc_c" => esc_html($categories)
665
-
666
  );
667
- }
668
-
669
  }
 
670
  }
671
 
672
  /**
@@ -679,10 +667,10 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
679
  if ($this->disable_tracking($this->ga_eeT)) {
680
  return;
681
  }
682
-
683
  //get impression threshold
684
  $impression_threshold = $this->ga_imTh;
685
-
686
  //Product impression on Home Page
687
  global $homepage_json_fp,$homepage_json_ATC_link, $homepage_json_rp,$prodpage_json_relProd,$catpage_json,$prodpage_json_ATC_link,$catpage_json_ATC_link;
688
  //home page json for featured products and recent product sections
@@ -694,7 +682,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
694
  $homepage_json_fp=array(); //define empty array so if empty then in json will be []
695
  }
696
  if(empty($homepage_json_rp)){ //home page recent product array
697
- $homepage_json_rp=array();
698
  }
699
  if(empty($prodpage_json_relProd)){ //prod page related section array
700
  $prodpage_json_relProd=array();
@@ -718,7 +706,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
718
  //category page json
719
  $this->wc_version_compare("tvc_pgc=" . json_encode($catpage_json) . ";");
720
  $this->wc_version_compare("catpage_json_ATC_link=" . json_encode($catpage_json_ATC_link) . ";");
721
-
722
  $hmpg_impressions_jQ = '
723
  var items = [];
724
  //set local currencies
@@ -809,7 +797,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
809
 
810
  ';
811
  if(is_home() || is_front_page()){
812
- $hmpg_impressions_jQ .='
813
  if(tvc_fp.length !== 0){
814
  t_products_impre_clicks(tvc_fp,"fp");
815
  }
@@ -852,10 +840,10 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
852
  prod_exists_in_JSON(t_url,tvc_pgc,"srch");
853
  });
854
 
855
- ';
856
  }else if (is_product()) {
857
- //product page releted products
858
- $hmpg_impressions_jQ .='
859
  if(tvc_rdp.length !== 0){
860
  t_products_impre_clicks(tvc_rdp,"rdp");
861
  }
@@ -904,7 +892,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
904
  });
905
 
906
 
907
- ';
908
  }
909
  //common ATC link for Category page , Shop Page and Search Page
910
  if(is_product_category() || is_shop() || is_search()){
@@ -920,7 +908,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
920
  prod_ATC_link_exists(t_url,catpage_json_ATC_link,tvc_pgc,t_qty);
921
  });
922
  ';
923
- }
924
  //on home page, product page , category page
925
  if (is_home() || is_front_page() || is_product() || is_product_category() || is_search() || is_shop()){
926
  $this->wc_version_compare($hmpg_impressions_jQ);
@@ -939,19 +927,18 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
939
  }
940
  global $woocommerce;
941
  $cartpage_prod_array_main = array();
942
- //echo "<pre>".print_r($woocommerce->cart->cart_contents,TRUE)."</pre>";
943
  foreach ($woocommerce->cart->cart_contents as $key => $item) {
944
  //Version compare
945
  if (version_compare($woocommerce->version, "2.7", "<")) {
946
- $prod_meta = get_product($item["product_id"]);
947
  } else {
948
- $prod_meta = wc_get_product($item["product_id"]);
949
  }
950
  if (version_compare($woocommerce->version, "3.3", "<")) {
951
- $cart_remove_link=html_entity_decode($woocommerce->cart->get_remove_url($key));
952
  } else {
953
- $cart_remove_link=html_entity_decode(wc_get_cart_remove_url($key));
954
- }
955
  $category = get_the_terms($item["product_id"], "product_cat");
956
  $categories = "";
957
  if ($category) {
@@ -963,8 +950,8 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
963
  $categories = rtrim($categories, ",");
964
  if(version_compare($woocommerce->version, "2.7", "<")){
965
  $cartpage_prod_array_main[$cart_remove_link] =array(
966
- "tvc_id" => esc_html($prod_meta->id),
967
- "tvc_i" => esc_html($prod_meta->get_sku() ? $prod_meta->get_sku() : $prod_meta->id),
968
  "tvc_n" => html_entity_decode($prod_meta->get_title()),
969
  "tvc_p" => esc_html($prod_meta->get_price()),
970
  "tvc_c" => esc_html($categories),
@@ -1035,7 +1022,6 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
1035
 
1036
  $code_step_1 = $code . 'gtag("event", "begin_checkout", {"event_category":"Enhanced-Ecommerce",
1037
  "event_label":"checkout_step_1","items":items,"non_interaction": true });';
1038
- //$code_step_1 .= 'gtag("event", "set_checkout_option", {"checkout_step": 1})';
1039
 
1040
  //check woocommerce version and add code
1041
  $this->wc_version_compare($code_step_1);
@@ -1131,9 +1117,9 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
1131
  foreach ($woocommerce->cart->cart_contents as $item) {
1132
  //Version Compare
1133
  if ( version_compare($woocommerce->version, "2.7", "<")) {
1134
- $p = get_product($item["product_id"]);
1135
  } else {
1136
- $p = wc_get_product($item["product_id"]);
1137
  }
1138
 
1139
  $category = get_the_terms($item["product_id"], "product_cat");
@@ -1146,26 +1132,26 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
1146
  //remove last comma(,) if multiple categories are there
1147
  $categories = rtrim($categories, ",");
1148
  if(version_compare($woocommerce->version, "2.7", "<")){
1149
- $chkout_json[get_permalink($p->id)] = array(
1150
- "tvc_id" => esc_html($p->id),
1151
- "tvc_i" => esc_js($p->get_sku() ? $p->get_sku() : $p->id),
1152
- "tvc_n" => html_entity_decode($p->get_title()),
1153
- "tvc_p" => esc_js($p->get_price()),
1154
- "tvc_c" => $categories,
1155
- "tvc_q" => esc_js($item["quantity"]),
1156
- "isfeatured"=>$p->is_featured()
1157
  );
1158
  }else{
1159
  $chkout_json[get_permalink($p->get_id())] = array(
1160
- "tvc_id" => esc_html($p->get_id()),
1161
- "tvc_i" => esc_js($p->get_sku() ? $p->get_sku() : $p->get_id()),
1162
- "tvc_n" => html_entity_decode($p->get_title()),
1163
- "tvc_p" => esc_js($p->get_price()),
1164
- "tvc_c" => $categories,
1165
- "tvc_q" => esc_js($item["quantity"]),
1166
- "isfeatured"=>$p->is_featured()
1167
  );
1168
- }
1169
  }
1170
  //return $code;
1171
  //make product data json on check out page
21
  * @author Chiranjiv Pathak <chiranjiv@tatvic.com>
22
  */
23
  class Enhanced_Ecommerce_Google_Analytics_Public {
24
+ /**
25
  * Init and hook in the integration.
26
  *
27
  * @access public
29
  */
30
  //set plugin version
31
  public $tvc_eeVer = '2.2.0';
32
+
33
+ protected $tvc_aga;
34
+
35
+ protected $ga_id;
36
+
37
+ protected $ga_LC;
38
+
39
+ protected $ga_ST;
40
+
41
+ protected $ga_gCkout;
42
+
43
+ protected $ga_eeT;
44
+
45
+ protected $ga_DF;
46
+
47
+ protected $ga_imTh;
48
+
49
+ protected $ga_OPTOUT;
50
+
51
+ protected $ga_PrivacyPolicy;
52
+
53
+ protected $ga_IPA;
54
+
55
  public function __construct($plugin_name, $version) {
56
+
57
+ $this->plugin_name = $plugin_name;
58
+ $this->version = $version;
59
+ $this->tvc_aga = $this->get_option("tvc_aga");
 
 
 
 
 
 
 
 
 
 
 
60
  $this->ga_id = $this->get_option("ga_id");
61
  $this->ga_ST = $this->get_option("ga_ST");
62
  $this->ga_gCkout = $this->get_option("ga_gCkout") == "on" ? true : false; //guest checkout
63
  $this->ga_gUser = $this->get_option("ga_gUser") == "on" ? true : false; //guest checkout
64
  $this->ga_eeT = $this->get_option("ga_eeT");
65
  $this->ga_DF = $this->get_option("ga_DF") == "on" ? true : false;
66
+ $this->ga_imTh = $this->get_option("ga_Impr") == "" ? 6 : $this->get_option("ga_Impr");
67
  $this->ga_OPTOUT = $this->get_option("ga_OPTOUT") == "on" ? true : false; //Google Analytics Opt Out
68
  $this->ga_PrivacyPolicy = $this->get_option("ga_PrivacyPolicy") == "on" ? true : false;
69
  $this->ga_IPA = $this->get_option("ga_IPA") == "on" ? true : false; //IP Anony.
70
+
71
+ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
72
+ // Put your plugin code here
73
+ add_action('woocommerce_init' , function (){
74
+ $this->ga_LC = get_woocommerce_currency(); //Local Currency from Back end
75
+ $this->wc_version_compare("tvc_lc=" . json_encode($this->ga_LC) . ";");
76
+ });
77
+ }
78
+ }
79
+ public function get_option($key){
80
+ $ee_options = array();
81
+ $my_option = get_option( 'ee_options' );
82
+ if(!empty($my_option)){
83
+ $ee_options = unserialize($my_option);
84
+ }
85
+ if(isset($ee_options[$key])){
86
+ return $ee_options[$key];
87
+ }
88
  }
 
 
 
 
 
 
 
 
 
 
89
  /**
90
  * Get store meta data for trouble shoot
91
  * @access public
96
  global $woocommerce;
97
  $tvc_sMetaData = array();
98
 
99
+ $tvc_sMetaData = array(
100
+ 'tvc_wcv' => $woocommerce->version,
101
+ 'tvc_wpv' => get_bloginfo('version'),
102
+ 'tvc_eev' => $this->tvc_eeVer,
103
+ 'tvc_cnf' => array(
104
+ 't_ee' => $this->ga_eeT,
105
+ 't_df' => $this->ga_DF,
106
+ 't_gUser'=>$this->ga_gUser,
107
+ 't_UAen'=>$this->ga_ST,
108
+ 't_thr' => $this->ga_imTh,
109
+ 't_IPA' => $this->ga_IPA,
110
+ 't_OptOut' => $this->ga_OPTOUT,
111
+ 't_PrivacyPolicy' => $this->ga_PrivacyPolicy,
112
+ )
113
+ );
114
+ $this->wc_version_compare("tvc_smd=" . json_encode($tvc_sMetaData) . ";");
115
  }
116
 
117
+ /**
118
  * add dev id
119
  *
120
  * @access public
133
  function add_plugin_details() {
134
  echo '<!--Enhanced Ecommerce Google Analytics Plugin for Woocommerce by Tatvic Plugin Version:'.$this->tvc_eeVer.'-->';
135
  }
136
+
137
  /**
138
  * Check if tracking is disabled
139
  *
155
  */
156
  function wc_version_compare($codeSnippet) {
157
  global $woocommerce;
158
+
159
  if (version_compare($woocommerce->version, "2.1", ">=")) {
160
  wc_enqueue_js($codeSnippet);
161
  } else {
163
  }
164
  }
165
  /**
166
+ * Enhanced Ecommerce GA plugin Settings
167
  *
168
  * @access public
169
  * @return void
181
  return;
182
  }
183
  //common validation----end
184
+ $set_domain_name = "auto";
185
  // IP Anonymization
186
  if ($this->ga_IPA) {
187
  $ga_ip_anonymization = '"anonymize_ip":true,';
189
  $ga_ip_anonymization ="";
190
  }
191
  if($this->ga_OPTOUT) {
192
+ echo '<script>
193
  // Set to the same value as the web property used on the site
194
  var gaProperty = "'.$tracking_id.'";
195
 
216
  gtag("config", "'.esc_js($tracking_id).'",{'.$ga_ip_anonymization.' "cookie_domain":"'.$set_domain_name.'"});
217
  </script>
218
  ';
219
+ echo $code;
220
+ }
221
+
222
  /**
223
  * Google Analytics eCommerce tracking
224
  *
227
  * @return void
228
  */
229
  function ecommerce_tracking_code($order_id) {
230
+
231
  global $woocommerce;
232
  if ($this->disable_tracking($this->ga_eeT) || current_user_can("manage_options") || get_post_meta($order_id, "_tracked", true) == 1)
233
  return;
265
  foreach ($order->get_items() as $item) {
266
  $_product = $order->get_product_from_item($item);
267
  if (isset($_product->variation_data)) {
268
+ $categories=esc_js(wc_get_formatted_variation($_product->get_variation_attributes(), true));
269
+
270
  } else {
271
  $out = array();
272
  if(version_compare($woocommerce->version, "2.7", "<")){
273
+ $categories = get_the_terms($_product->ID, "product_cat");
274
  }else{
275
+ $categories = get_the_terms($_product->get_id(), "product_cat");
276
  }
277
 
278
  if ($categories) {
284
  }
285
  //orderpage Prod json
286
  if(version_compare($woocommerce->version, "2.7", "<")){
287
+ $orderpage_prod_Array[get_permalink($_product->ID)]=array(
288
+ "tvc_id" => esc_html($_product->ID),
289
+ "tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->ID),
290
  "tvc_n" => html_entity_decode($item["name"]),
291
  "tvc_p" => esc_js($order->get_item_total($item)),
292
  "tvc_c" => $categories,
293
  "tvc_q"=>esc_js($item["qty"])
294
+ );
295
  }else{
296
+ $orderpage_prod_Array[get_permalink($_product->get_id())]=array(
297
  "tvc_id" => esc_html($_product->get_id()),
298
  "tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->get_id()),
299
  "tvc_n" => html_entity_decode($_product->get_title()),
300
  "tvc_p" => esc_js($order->get_item_total($item)),
301
  "tvc_c" => $categories,
302
  "tvc_q"=>esc_js($item["qty"])
303
+ );
304
+ }
305
  }
306
  //make json for prod meta data on order page
307
+ $this->wc_version_compare("tvc_oc=" . json_encode($orderpage_prod_Array) . ";");
308
  }
309
 
310
+ //get shipping cost based on version >2.1 get_total_shipping() < get_shipping
311
+ if (version_compare($woocommerce->version, "2.1", ">=")) {
312
+ $tvc_sc = $order->get_total_shipping();
313
+ } else {
314
+ $tvc_sc = $order->get_shipping();
315
+ }
316
+ //orderpage transcation data json
317
+ $orderpage_trans_Array=array(
318
+ "id"=> esc_js($order->get_order_number()), // Transaction ID. Required
319
+ "affiliation"=> esc_js(get_bloginfo('name')), // Affiliation or store name
320
+ "revenue"=>esc_js($order->get_total()), // Grand Total
321
+ "tax"=> esc_js($order->get_total_tax()), // Tax
322
+ "shipping"=> esc_js($tvc_sc), // Shipping
323
+ "coupon"=>$coupons_list
324
+ );
325
+ //make json for trans data on order page
326
+ $this->wc_version_compare("tvc_td=" . json_encode($orderpage_trans_Array) . ";");
327
+
328
+ $code ='
329
  var items = [];
330
  //set local currencies
331
  gtag("set", {"currency": tvc_lc});
371
  if (!is_single())
372
  return;
373
  global $product,$woocommerce;
374
+
375
  if(version_compare($woocommerce->version, "2.7", "<")){
376
+ $category = get_the_terms($product->ID, "product_cat");
377
  }else{
378
  $category = get_the_terms($product->get_id(), "product_cat");
379
  }
388
 
389
  $code = '
390
  var items = [];
391
+ //set local currencies
392
  gtag("set", {"currency": tvc_lc});
393
  jQuery("[class*=single_add_to_cart_button]").click(function() {
394
 
395
+ // Enhanced E-commerce Add to cart clicks
396
  gtag("event", "add_to_cart", {
397
  "event_category":"Enhanced-Ecommerce",
398
  "event_label":"add_to_cart_click",
420
  */
421
  public function product_detail_view() {
422
 
 
423
  if ($this->disable_tracking($this->ga_eeT)) {
424
  return;
425
  }
426
 
427
  global $product,$woocommerce;
428
  if(version_compare($woocommerce->version, "2.7", "<")){
429
+ $category = get_the_terms($product->ID, "product_cat");
430
  }else{
431
  $category = get_the_terms($product->get_id(), "product_cat");
432
  }
441
  //product detail view json
442
  if(version_compare($woocommerce->version, "2.7", "<")){
443
  $prodpage_detail_json = array(
444
+ "tvc_id" => esc_html($product->id),
445
+ "tvc_i" => $product->get_sku() ? $product->get_sku() : $product->id,
446
+ "tvc_n" => $product->get_title(),
447
+ "tvc_c" => $categories,
448
+ "tvc_p" => $product->get_price()
449
+ );
450
  }else{
451
  $prodpage_detail_json = array(
452
+ "tvc_id" => esc_html($product->get_id()),
453
+ "tvc_i" => $product->get_sku() ? $product->get_sku() : $product->get_id(),
454
+ "tvc_n" => $product->get_title(),
455
+ "tvc_c" => $categories,
456
+ "tvc_p" => $product->get_price()
457
+ );
458
  }
459
+
460
+ if (empty($prodpage_detail_json)) {
461
+ //prod page array
462
  $prodpage_detail_json = array();
463
  }
464
  //prod page detail view json
465
+ $this->wc_version_compare("tvc_po=" . json_encode($prodpage_detail_json) . ";");
466
  $code = '
467
  gtag("event", "view_item", {
468
  "event_category":"Enhanced-Ecommerce",
479
  ';
480
  //check woocommerce version
481
  if(is_product()){
482
+ $this->wc_version_compare($code);
483
+ }
484
  }
485
 
486
  /**
492
  */
493
  public function bind_product_metadata() {
494
 
 
495
  if ($this->disable_tracking($this->ga_eeT)) {
496
  return;
497
  }
498
 
499
  global $product,$woocommerce;
500
  if (version_compare($woocommerce->version, "2.7", "<")) {
501
+ $category = get_the_terms($product->Id, "product_cat");
502
+ } else {
503
+ $category = get_the_terms($product->get_id(), "product_cat");
504
+ }
505
+
506
  $categories = "";
507
 
508
  if ($category) {
519
  if (!is_array($homepage_json_fp) && !is_array($homepage_json_rp) && !is_array($homepage_json_ATC_link)) {
520
  $homepage_json_fp = array();
521
  $homepage_json_rp = array();
522
+ $homepage_json_ATC_link=array();
523
  }
524
 
525
+ // ATC link Array
526
+ if(version_compare($woocommerce->version, "2.7", "<")){
527
+ $homepage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->id));
528
+ }else{
529
+ $homepage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->get_id()));
530
+ }
531
+ //check if product is featured product or not
532
  if ($product->is_featured()) {
533
+ //check if product is already exists in homepage featured json
534
+ if(version_compare($woocommerce->version, "2.7", "<")){
535
  if(!array_key_exists(get_permalink($product->id),$homepage_json_fp)){
536
+ $homepage_json_fp[get_permalink($product->id)] = array(
537
+ "tvc_id" => esc_html($product->id),
538
+ "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->id),
539
+ "tvc_n" => esc_html($product->get_title()),
540
+ "tvc_p" => esc_html($product->get_price()),
541
+ "tvc_c" => esc_html($categories),
542
+ "ATC-link"=>$product->add_to_cart_url()
543
+ );
544
+ //else add product in homepage recent product json
545
+ }else {
546
+ $homepage_json_rp[get_permalink($product->id)] =array(
547
+ "tvc_id" => esc_html($product->id),
548
+ "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->id),
549
+ "tvc_n" => esc_html($product->get_title()),
550
+ "tvc_p" => esc_html($product->get_price()),
551
+ "tvc_c" => esc_html($categories)
552
+ );
553
+ }
554
+ }else{
555
  if(!array_key_exists(get_permalink($product->get_id()),$homepage_json_fp)){
556
+ $homepage_json_fp[get_permalink($product->get_id())] = array(
557
+ "tvc_id" => esc_html($product->get_id()),
558
+ "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->get_id()),
559
+ "tvc_n" => esc_html($product->get_title()),
560
+ "tvc_p" => esc_html($product->get_price()),
561
+ "tvc_c" => esc_html($categories),
562
+ "ATC-link"=>$product->add_to_cart_url()
563
+ );
564
+ //else add product in homepage recent product json
565
+ }else {
566
+ $homepage_json_rp[get_permalink($product->get_id())] =array(
567
+ "tvc_id" => esc_html($product->get_id()),
568
+ "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->get_id()),
569
+ "tvc_n" => esc_html($product->get_title()),
570
+ "tvc_p" => esc_html($product->get_price()),
571
+ "tvc_c" => esc_html($categories)
572
+ );
573
+ }
574
+ }
575
+
576
  } else {
577
  //else prod add in homepage recent json
578
  if(version_compare($woocommerce->version, "2.7", "<")){
582
  "tvc_n" => esc_html($product->get_title()),
583
  "tvc_p" => esc_html($product->get_price()),
584
  "tvc_c" => esc_html($categories)
585
+ );
586
  }else{
587
  $homepage_json_rp[get_permalink($product->get_id())] =array(
588
  "tvc_id" => esc_html($product->get_id()),
590
  "tvc_n" => esc_html($product->get_title()),
591
  "tvc_p" => esc_html($product->get_price()),
592
  "tvc_c" => esc_html($categories)
593
+ );
594
  }
595
+
596
  }
597
  }
598
  //if product page then related product page array
604
  // ATC link Array
605
  if(version_compare($woocommerce->version, "2.7", "<")){
606
  $prodpage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->id));
607
+
608
+ $prodpage_json_relProd[get_permalink($product->id)] = array(
609
+ "tvc_id" => esc_html($product->id),
610
+ "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->id),
611
+ "tvc_n" => esc_html($product->get_title()),
612
+ "tvc_p" => esc_html($product->get_price()),
613
+ "tvc_c" => esc_html($categories),
614
  );
615
  }else{
616
+ $prodpage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->get_id()));
617
+
618
+ $prodpage_json_relProd[get_permalink($product->get_id())] = array(
619
+ "tvc_id" => esc_html($product->get_id()),
620
+ "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->get_id()),
621
+ "tvc_n" => esc_html($product->get_title()),
622
+ "tvc_p" => esc_html($product->get_price()),
623
+ "tvc_c" => esc_html($categories)
624
+
625
  );
626
  }
627
  }
628
  //category page, search page and shop page json
629
  else if (is_product_category() || is_search() || is_shop()) {
630
+ if (!is_array($catpage_json) && !is_array($catpage_json_ATC_link)){
631
+ $catpage_json=array();
632
+ $catpage_json_ATC_link=array();
633
+ }
634
+ //cat page ATC array
635
+ if(version_compare($woocommerce->version, "2.7", "<")){
636
  $catpage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->id));
637
 
638
+ $catpage_json[get_permalink($product->id)] =array(
639
+ "tvc_id" => esc_html($product->id),
640
+ "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->id),
641
+ "tvc_n" => esc_html($product->get_title()),
642
+ "tvc_p" => esc_html($product->get_price()),
643
+ "tvc_c" => esc_html($categories),
644
  );
645
+ }else{
646
  $catpage_json_ATC_link[$product->add_to_cart_url()]=array("ATC-link"=>get_permalink($product->get_id()));
647
 
648
  $catpage_json[get_permalink($product->get_id())] =array(
649
+ "tvc_id" => esc_html($product->get_id()),
650
+ "tvc_i" => esc_html($product->get_sku() ? $product->get_sku() : $product->get_id()),
651
+ "tvc_n" => esc_html($product->get_title()),
652
+ "tvc_p" => esc_html($product->get_price()),
653
+ "tvc_c" => esc_html($categories)
654
+
655
  );
 
 
656
  }
657
+ }
658
  }
659
 
660
  /**
667
  if ($this->disable_tracking($this->ga_eeT)) {
668
  return;
669
  }
670
+
671
  //get impression threshold
672
  $impression_threshold = $this->ga_imTh;
673
+
674
  //Product impression on Home Page
675
  global $homepage_json_fp,$homepage_json_ATC_link, $homepage_json_rp,$prodpage_json_relProd,$catpage_json,$prodpage_json_ATC_link,$catpage_json_ATC_link;
676
  //home page json for featured products and recent product sections
682
  $homepage_json_fp=array(); //define empty array so if empty then in json will be []
683
  }
684
  if(empty($homepage_json_rp)){ //home page recent product array
685
+ $homepage_json_rp=array();
686
  }
687
  if(empty($prodpage_json_relProd)){ //prod page related section array
688
  $prodpage_json_relProd=array();
706
  //category page json
707
  $this->wc_version_compare("tvc_pgc=" . json_encode($catpage_json) . ";");
708
  $this->wc_version_compare("catpage_json_ATC_link=" . json_encode($catpage_json_ATC_link) . ";");
709
+
710
  $hmpg_impressions_jQ = '
711
  var items = [];
712
  //set local currencies
797
 
798
  ';
799
  if(is_home() || is_front_page()){
800
+ $hmpg_impressions_jQ .='
801
  if(tvc_fp.length !== 0){
802
  t_products_impre_clicks(tvc_fp,"fp");
803
  }
840
  prod_exists_in_JSON(t_url,tvc_pgc,"srch");
841
  });
842
 
843
+ ';
844
  }else if (is_product()) {
845
+ //product page releted products
846
+ $hmpg_impressions_jQ .='
847
  if(tvc_rdp.length !== 0){
848
  t_products_impre_clicks(tvc_rdp,"rdp");
849
  }
892
  });
893
 
894
 
895
+ ';
896
  }
897
  //common ATC link for Category page , Shop Page and Search Page
898
  if(is_product_category() || is_shop() || is_search()){
908
  prod_ATC_link_exists(t_url,catpage_json_ATC_link,tvc_pgc,t_qty);
909
  });
910
  ';
911
+ }
912
  //on home page, product page , category page
913
  if (is_home() || is_front_page() || is_product() || is_product_category() || is_search() || is_shop()){
914
  $this->wc_version_compare($hmpg_impressions_jQ);
927
  }
928
  global $woocommerce;
929
  $cartpage_prod_array_main = array();
 
930
  foreach ($woocommerce->cart->cart_contents as $key => $item) {
931
  //Version compare
932
  if (version_compare($woocommerce->version, "2.7", "<")) {
933
+ $prod_meta = get_product($item["product_id"]);
934
  } else {
935
+ $prod_meta = wc_get_product($item["product_id"]);
936
  }
937
  if (version_compare($woocommerce->version, "3.3", "<")) {
938
+ $cart_remove_link=html_entity_decode($woocommerce->cart->get_remove_url($key));
939
  } else {
940
+ $cart_remove_link=html_entity_decode(wc_get_cart_remove_url($key));
941
+ }
942
  $category = get_the_terms($item["product_id"], "product_cat");
943
  $categories = "";
944
  if ($category) {
950
  $categories = rtrim($categories, ",");
951
  if(version_compare($woocommerce->version, "2.7", "<")){
952
  $cartpage_prod_array_main[$cart_remove_link] =array(
953
+ "tvc_id" => esc_html($prod_meta->ID),
954
+ "tvc_i" => esc_html($prod_meta->get_sku() ? $prod_meta->get_sku() : $prod_meta->ID),
955
  "tvc_n" => html_entity_decode($prod_meta->get_title()),
956
  "tvc_p" => esc_html($prod_meta->get_price()),
957
  "tvc_c" => esc_html($categories),
1022
 
1023
  $code_step_1 = $code . 'gtag("event", "begin_checkout", {"event_category":"Enhanced-Ecommerce",
1024
  "event_label":"checkout_step_1","items":items,"non_interaction": true });';
 
1025
 
1026
  //check woocommerce version and add code
1027
  $this->wc_version_compare($code_step_1);
1117
  foreach ($woocommerce->cart->cart_contents as $item) {
1118
  //Version Compare
1119
  if ( version_compare($woocommerce->version, "2.7", "<")) {
1120
+ $p = get_product($item["product_id"]);
1121
  } else {
1122
+ $p = wc_get_product($item["product_id"]);
1123
  }
1124
 
1125
  $category = get_the_terms($item["product_id"], "product_cat");
1132
  //remove last comma(,) if multiple categories are there
1133
  $categories = rtrim($categories, ",");
1134
  if(version_compare($woocommerce->version, "2.7", "<")){
1135
+ $chkout_json[get_permalink($p->ID)] = array(
1136
+ "tvc_id" => esc_html($p->ID),
1137
+ "tvc_i" => esc_js($p->get_sku() ? $p->get_sku() : $p->ID),
1138
+ "tvc_n" => html_entity_decode($p->get_title()),
1139
+ "tvc_p" => esc_js($p->get_price()),
1140
+ "tvc_c" => $categories,
1141
+ "tvc_q" => esc_js($item["quantity"]),
1142
+ "isfeatured"=>$p->is_featured()
1143
  );
1144
  }else{
1145
  $chkout_json[get_permalink($p->get_id())] = array(
1146
+ "tvc_id" => esc_html($p->get_id()),
1147
+ "tvc_i" => esc_js($p->get_sku() ? $p->get_sku() : $p->get_id()),
1148
+ "tvc_n" => html_entity_decode($p->get_title()),
1149
+ "tvc_p" => esc_js($p->get_price()),
1150
+ "tvc_c" => $categories,
1151
+ "tvc_q" => esc_js($item["quantity"]),
1152
+ "isfeatured"=>$p->is_featured()
1153
  );
1154
+ }
1155
  }
1156
  //return $code;
1157
  //make product data json on check out page
readme.txt CHANGED
@@ -1,22 +1,23 @@
1
  === Enhanced Ecommerce Google Analytics Plugin for WooCommerce ===
2
  Contributors: Tatvic
3
- Plugin Name: Enhanced Ecommerce for Woocommerce store
4
  Plugin URI: http://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/
5
- Tags: Google Analytics, Universal Analytics, Enhanced E-commerce, E-commerce, 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: 3.6
9
  Tested up to: 5.2
10
  Requires PHP: 5.6
11
- Stable tag: 2.2.0
12
- Version: 2.2.0
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
16
  Provides integration between Enhanced Ecommerce feature of Google Analytics and WooCommerce.
17
 
18
  == Description ==
19
- <a href="https://www.tatvic.com/enhanced-ecommerce-google-analytics-plugin-woocommerce/" target="_blank">Enhanced Ecommerce Google Analytics</a> is a Free Plugin for Woocommerce stores which allows you to use the newly launched feature of Google Analytics – Enhanced Ecommerce.You can track the user behavior across your e-commerce store starting from product views to thank you page. Enhanced Ecommerce is only supported by Universal Analytics.
 
20
 
21
  = Features of Plugin =
22
  1. Quick & Easy installation from the wordpress interface
@@ -49,7 +50,7 @@ Provides integration between Enhanced Ecommerce feature of Google Analytics and
49
 
50
 
51
  = Need an Advanced Google Analytics Plugin? =
52
- We have an Advanced Google Analytics Plugin for WooCommerce which includes tracking of 9 Reports of Enhanced Ecommerce, User ID Tracking, Product Refund, I.P. Anonymization, Adwords Conversion Tracking, Facebook Pixel Tracking, 15+ Custom Dimenensions & Metrics & much more. <a href="https://1.envato.market/Yvn3R" target="_blank">Learn More</a>
53
 
54
  == Note : ==
55
  == Our plugin does not support the below features out of the box ==
@@ -61,14 +62,14 @@ We have an Advanced Google Analytics Plugin for WooCommerce which includes track
61
 
62
  == Installation ==
63
 
64
- 1. Download the plugin file to your system and unzip it
65
- 2. Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation’s wp-content/plugins/ directory
66
- 3. Activate the plugin from the Plugins menu within the WordPress admin
67
- 4. Enter your Universal Analytics ID for the plugin to enable the tracking code
68
 
69
  == Screenshots ==
70
  1. Enable Enhanced E-commerce for your profile/view. This is a profile / view level setting and can be accessed under Admin > View > E-commerce Settings. Also, add meaningful labels for your checkout steps. We recommend you to label as, Step 1 : Checkout View; Step 2 : Login; Step 3 : Proceed to payment;
71
- 2. Next, you need to activate your plugin from the Settings page by clicking the checkbox – “Add Enhanced Ecommerce Tracking Code". You can access the same from: Tatvic EE Plugin > Enhanced Ecommerce for Woocommerce.
72
  3. To Track Guest Users, Check the box – Add Code to Track the Login Steps of Guest Users. If you have a Guest Check out & if it’s Unchecked, then it might cause an uneven funnel reporting in Google Analytics.
73
 
74
  == Frequently Asked Questions ==
@@ -90,7 +91,7 @@ As our plugin automatically tracks all the Enhanced Ecommerce data ( including p
90
 
91
  = Does this plugin match with GDPR compliance? =
92
 
93
- Yes, our plugin is under GDPR complaince. For more information, read the <a href="https://www.tatvic.com/privacy-policy/?ref=plugin_policy&utm_source=plugin_backend&utm_medium=woocommerce_free_plugin&utm_campaign=GDPR_complaince_ecomm_plugins" target="_blank">privacy policy</a> of our plugin.
94
 
95
  = Why are my PayPal transaction data not getting recorded in GA? =
96
 
@@ -134,9 +135,9 @@ You can Find all The Enhanced Ecommerce Reports in your Analytics Account under
134
 
135
  Currently our plugin does not support products with variant & hence you may not see their transaction data in GA. This feature is only available with the <a href="https://1.envato.market/Yvn3R" target="_blank">premium version</a> of our plugin.
136
 
137
- = Does this plugin provide Adwords Conversion Tracking? =
138
 
139
- The free version of our plugin does not provide Adwords Conversion Tracking feature. This feature is only available with the <a href="https://1.envato.market/Yvn3R" target="_blank">premium version</a> of our plugin.
140
 
141
  = Does this plugin provide Facebook Pixel Tracking? =
142
 
@@ -146,7 +147,7 @@ The free version of our plugin does not provide Facebook Pixel Tracking feature.
146
 
147
  The free version of our plugin does not provide Google Optimize Snippet Adding Support. This feature is only available with the <a href="https://1.envato.market/Yvn3R" target="_blank">premium version</a> of our plugin.
148
 
149
- = I have noticed that some transactions are missing in my GA account, compared to my Woocmmerce backend (Orders) =
150
 
151
  Possible reasons for not getting the accurate Transactions (in sales performance report) are as below :
152
 
@@ -201,6 +202,10 @@ To avoid sending your own transaction data or sessions data in Google Analytics,
201
 
202
  == Changelog ==
203
 
 
 
 
 
204
  = 2.2.0 - 25/06/2019 =
205
  * Minor Bug Fix
206
 
@@ -211,7 +216,7 @@ To avoid sending your own transaction data or sessions data in Google Analytics,
211
  * Minor Bug Fix for category page event
212
 
213
  = 2.1.7 - 29/04/2019 =
214
- * Compatibility with WC 3.6
215
  * Minor Bug Fixes
216
 
217
  = 2.1.6 - 26/12/2018 =
@@ -221,16 +226,16 @@ To avoid sending your own transaction data or sessions data in Google Analytics,
221
  * Minor Bug Fixes
222
 
223
  = 2.1.4 - 05/11/2018 =
224
- * Woocommerce 3.5 compatibility
225
  * Minor Bug Fixes
226
 
227
  = 2.1.3 - 17/10/2018 =
228
  * Fixed: Product name issue on Order Received Page
229
- * Fixed: Session Isssue
230
  * Minor Bug Fixes
231
 
232
  = 2.1.2 - 14/09/2018 =
233
- * Multisite admin sidebar Issue resolved
234
  * Optimization in Impression Call
235
  * Minor Bug Fixes
236
 
@@ -260,7 +265,7 @@ To avoid sending your own transaction data or sessions data in Google Analytics,
260
  * Minor Bug Fixes & Optimization.
261
 
262
  = 1.2.2 - 31/01/2018 =
263
- * Compatibility with Woocommerce 3.3
264
  * Minor Bug Fixes & Optimization.
265
 
266
  = 1.2.1.2 - 26/12/2017 =
@@ -274,7 +279,7 @@ To avoid sending your own transaction data or sessions data in Google Analytics,
274
  * Quick Bug Fixes.
275
 
276
  = 1.2.0 - 17/10/2017 =
277
- * Compatibility with Woocommerce 3.2
278
  * Minor Bug Fixes & Optimization.
279
 
280
  = 1.1.2 - 04/09/2017 =
@@ -293,11 +298,11 @@ To avoid sending your own transaction data or sessions data in Google Analytics,
293
  * Minor Bug Fixes.
294
 
295
  = 1.0.20 - 14/04/2017 =
296
- * Fixed - Compatibility with Woocommerce 3.x
297
  * Minor Bug Fixes.
298
 
299
  = 1.0.19 - 21/12/2016 =
300
- * Fixed - Compatibility with Wordpress 4.7 & Woocommerce 2.6.x
301
  * Minor Bug Fixes.
302
 
303
  = 1.0.18 - 11/04/2016 =
@@ -305,10 +310,10 @@ To avoid sending your own transaction data or sessions data in Google Analytics,
305
 
306
  = 1.0.17 - 19/02/2016 =
307
  * Fixed - Notice: Undefined index: tab
308
- * Minor Bug Fixes as per Wordpress Guidlines
309
 
310
  = 1.0.16 - 01/04/2015 =
311
- * Minor Bug Fixes as per Wordpress Guidlines
312
 
313
  = 1.0.15 - 28/03/2015 =
314
  * Email Field made optional
@@ -316,7 +321,7 @@ To avoid sending your own transaction data or sessions data in Google Analytics,
316
  = 1.0.14 - 10/02/2015 =
317
  * Fixed - session_start() function warning
318
  * Fixed - Notice: Undefined variable: coupons_list
319
- * Fixed - woocommerce deprecated function warning
320
 
321
  = 1.0.13 - 19/12/2014 =
322
  * Currency as field removed from the plugin. Reason: we now automatically passed the currency which you may have set in WooCommerce store
1
  === Enhanced Ecommerce Google Analytics Plugin for WooCommerce ===
2
  Contributors: Tatvic
3
+ Plugin Name: Enhanced Ecommerce for WooCommerce Store
4
  Plugin URI: http://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/
5
+ Tags: Google Analytics, Universal Analytics, Enhanced E-commerce, E-commerce, 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: 3.6
9
  Tested up to: 5.2
10
  Requires PHP: 5.6
11
+ Stable tag: 2.2.1
12
+ Version: 2.2.1
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
16
  Provides integration between Enhanced Ecommerce feature of Google Analytics and WooCommerce.
17
 
18
  == Description ==
19
+
20
+ <a href="https://www.tatvic.com/enhanced-ecommerce-google-analytics-plugin-woocommerce/" target="_blank">Enhanced Ecommerce Google Analytics</a> is a Free Plugin for WooCommerce stores which allows businesses to make the most of the Google Analytics - Enhanced Ecommerce feature. You can track user behavior across your store starting from home page to thankyou page and take informed decisions to drive business/marketing outcomes. Enhanced Ecommerce is supported by Universal Analytics.
21
 
22
  = Features of Plugin =
23
  1. Quick & Easy installation from the wordpress interface
50
 
51
 
52
  = Need an Advanced Google Analytics Plugin? =
53
+ We have an Advanced Google Analytics Plugin for WooCommerce which includes tracking of all the 9 Reports of Enhanced Ecommerce, User ID Tracking, Product Refund, I.P. Anonymization, Google Ads Conversion Tracking, Facebook Pixel Tracking, 20+ Custom Dimensions & Metrics & much more. <a href="https://1.envato.market/Yvn3R" target="_blank">Learn More</a>
54
 
55
  == Note : ==
56
  == Our plugin does not support the below features out of the box ==
62
 
63
  == Installation ==
64
 
65
+ 1. Download the plugin file to your system and unzip it.
66
+ 2. Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation’s wp-content/plugins/ directory.
67
+ 3. Activate the plugin from the Plugins menu within the WordPress admin.
68
+ 4. Enter your Universal Analytics ID for the plugin to enable the tracking code.
69
 
70
  == Screenshots ==
71
  1. Enable Enhanced E-commerce for your profile/view. This is a profile / view level setting and can be accessed under Admin > View > E-commerce Settings. Also, add meaningful labels for your checkout steps. We recommend you to label as, Step 1 : Checkout View; Step 2 : Login; Step 3 : Proceed to payment;
72
+ 2. Next, you need to activate your plugin from the Settings page by clicking the checkbox – “Add Enhanced Ecommerce Tracking Code". You can access the same from: Tatvic EE Plugin > Enhanced Ecommerce for WooCommerce.
73
  3. To Track Guest Users, Check the box – Add Code to Track the Login Steps of Guest Users. If you have a Guest Check out & if it’s Unchecked, then it might cause an uneven funnel reporting in Google Analytics.
74
 
75
  == Frequently Asked Questions ==
91
 
92
  = Does this plugin match with GDPR compliance? =
93
 
94
+ Yes, our plugin is under GDPR compliance. For more information, read the <a href="https://www.tatvic.com/privacy-policy/?ref=plugin_policy&utm_source=plugin_backend&utm_medium=woocommerce_free_plugin&utm_campaign=GDPR_complaince_ecomm_plugins" target="_blank">privacy policy</a> of our plugin.
95
 
96
  = Why are my PayPal transaction data not getting recorded in GA? =
97
 
135
 
136
  Currently our plugin does not support products with variant & hence you may not see their transaction data in GA. This feature is only available with the <a href="https://1.envato.market/Yvn3R" target="_blank">premium version</a> of our plugin.
137
 
138
+ = Does this plugin provide Google Ads Conversion Tracking? =
139
 
140
+ The free version of our plugin does not provide Google Ads Conversion Tracking feature. This feature is only available with the <a href="https://1.envato.market/Yvn3R" target="_blank">premium version</a> of our plugin.
141
 
142
  = Does this plugin provide Facebook Pixel Tracking? =
143
 
147
 
148
  The free version of our plugin does not provide Google Optimize Snippet Adding Support. This feature is only available with the <a href="https://1.envato.market/Yvn3R" target="_blank">premium version</a> of our plugin.
149
 
150
+ = I have noticed that some transactions are missing in my GA account, compared to my WooCommerce backend (Orders) =
151
 
152
  Possible reasons for not getting the accurate Transactions (in sales performance report) are as below :
153
 
202
 
203
  == Changelog ==
204
 
205
+ = 2.2.1 - 24/09/2019 =
206
+ * Compatibility with WooCommerce 3.7.0
207
+ * Minor Bug Fixes
208
+
209
  = 2.2.0 - 25/06/2019 =
210
  * Minor Bug Fix
211
 
216
  * Minor Bug Fix for category page event
217
 
218
  = 2.1.7 - 29/04/2019 =
219
+ * Compatibility with WooCommerce 3.6
220
  * Minor Bug Fixes
221
 
222
  = 2.1.6 - 26/12/2018 =
226
  * Minor Bug Fixes
227
 
228
  = 2.1.4 - 05/11/2018 =
229
+ * Compatibility with WooCommerce 3.5
230
  * Minor Bug Fixes
231
 
232
  = 2.1.3 - 17/10/2018 =
233
  * Fixed: Product name issue on Order Received Page
234
+ * Fixed: Session Issue
235
  * Minor Bug Fixes
236
 
237
  = 2.1.2 - 14/09/2018 =
238
+ * Multisites admin sidebar Issue resolved
239
  * Optimization in Impression Call
240
  * Minor Bug Fixes
241
 
265
  * Minor Bug Fixes & Optimization.
266
 
267
  = 1.2.2 - 31/01/2018 =
268
+ * Compatibility with WooCommerce 3.3
269
  * Minor Bug Fixes & Optimization.
270
 
271
  = 1.2.1.2 - 26/12/2017 =
279
  * Quick Bug Fixes.
280
 
281
  = 1.2.0 - 17/10/2017 =
282
+ * Compatibility with WooCommerce 3.2
283
  * Minor Bug Fixes & Optimization.
284
 
285
  = 1.1.2 - 04/09/2017 =
298
  * Minor Bug Fixes.
299
 
300
  = 1.0.20 - 14/04/2017 =
301
+ * Fixed - Compatibility with WooCommerce 3.x
302
  * Minor Bug Fixes.
303
 
304
  = 1.0.19 - 21/12/2016 =
305
+ * Fixed - Compatibility with Wordpress 4.7 & WooCommerce 2.6.x
306
  * Minor Bug Fixes.
307
 
308
  = 1.0.18 - 11/04/2016 =
310
 
311
  = 1.0.17 - 19/02/2016 =
312
  * Fixed - Notice: Undefined index: tab
313
+ * Minor Bug Fixes as per Wordpress Guidelines
314
 
315
  = 1.0.16 - 01/04/2015 =
316
+ * Minor Bug Fixes as per Wordpress Guidelines
317
 
318
  = 1.0.15 - 28/03/2015 =
319
  * Email Field made optional
321
  = 1.0.14 - 10/02/2015 =
322
  * Fixed - session_start() function warning
323
  * Fixed - Notice: Undefined variable: coupons_list
324
+ * Fixed - WooCommerce deprecated function warning
325
 
326
  = 1.0.13 - 19/12/2014 =
327
  * Currency as field removed from the plugin. Reason: we now automatically passed the currency which you may have set in WooCommerce store