Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 5.0.0

Version Description

  • 20/10/2022 =
  • Conversios is geared up for this festive season and with that Conversios is coming up with an array of much demanded features for its users.
  • Conversios is the best plugin available in the market for Google Analytics tracking for WooCommerce stores. It is for sure the fastest and the most efficient (95% accuracy guaranteed) plugin for data collection in Google Analytics and GA4.
  • At Conversios, we thrive to be your one stop solution for all the MarTech needs and keeping that in focus, we are bringing up 2 major feature updates that many of you were demanding for a while.
  • What are we bringing for you? Google Tag Manager based single click implementation for Google Analytics, Google Analytics 4, and multiple ad pixel integrations like Meta, Snapchat, Tiktok, Pinterest, Google Ads, Twitter, Microsoft Bing Ads Use your own Google Tag Manager account with the conversios plugin.
  • What will you get out of it?
    1. Google Tag Manager based implementation helps in data collection accuracy and you have more control over your tags implemented on the website.
    2. Many websites page speed decreases because of gtag.js implementation as it renders multiple Javascripts on the website. Google Tag Manager based implementation uses datalayer to push data to GA or other ad channels and it renders only once on your web page. Hence, your site speed will be intact with this approach.
    3. Debugging which events are tracking correctly or not becomes a lot easier in Google Tag Manager based implementation. Hence, less possibility of data leakage from your web store and more insights from the visitors.
    4. Google Tag Manager based implementation will prepare you for the next privacy-centric industry revolution leveraging first party cookies. Sooner or later stores like yours will have to go for server side tagging. GTM based implementation is our first step for you in that direction.
    5. If you want us to add any other pixel in the plugin, shout out and that will be done in 3 business days.
Download this release

Release Info

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

Code changes from version 4.9.4 to 5.0.0

Files changed (35) hide show
  1. admin/class-conversios-admin.php +6 -3
  2. admin/class-conversios-onboarding.php +3 -2
  3. admin/class-enhanced-ecommerce-google-analytics-admin.php +39 -21
  4. admin/class-tvc-admin-auto-product-sync-helper.php +54 -21
  5. admin/class-tvc-admin-helper.php +276 -120
  6. admin/css/enhanced-ecommerce-google-analytics-admin.css +13 -0
  7. admin/css/style.css +27 -9
  8. admin/helper/class-onboarding-helper.php +30 -6
  9. admin/images/bing_icon.png +0 -0
  10. admin/images/fb-icon.png +0 -0
  11. admin/images/fevicon.gif +0 -0
  12. admin/images/pinterest_icon.png +0 -0
  13. admin/images/snapchat_icon.png +0 -0
  14. admin/images/tiKtok_icon.png +0 -0
  15. admin/images/twitter_icon.png +0 -0
  16. admin/js/tvc-ee-custom.js +14 -14
  17. admin/partials/class-conversios-header.php +5 -5
  18. admin/partials/general-fields.php +716 -520
  19. enhanced-ecommerce-google-analytics.php +11 -6
  20. includes/class-enhanced-ecommerce-google-analytics.php +6 -1
  21. includes/data/class-tvc-ajax-file.php +243 -3
  22. includes/setup/CustomApi.php +12 -8
  23. includes/setup/class-tatvic-category-selector-element.php +1 -1
  24. includes/setup/class-tvc-product-sync-helper.php +259 -101
  25. includes/setup/google-shopping-feed-gaa-config.php +39 -47
  26. includes/setup/google-shopping-feed-sync-product.php +96 -6
  27. includes/setup/plugins/datepicker/jquery-ui.css +1311 -0
  28. includes/setup/pmax-add.php +10 -6
  29. includes/setup/pmax-edit.php +2 -2
  30. includes/setup/tatvic-category-wrapper.php +35 -1
  31. public/class-con-settings.php +190 -0
  32. public/class-enhanced-ecommerce-google-analytics-public-pro.php +755 -182
  33. public/class-enhanced-ecommerce-google-analytics-public.php +645 -213
  34. public/js/con-gtm-google-analytics.js +343 -0
  35. readme.txt +110 -298
admin/class-conversios-admin.php CHANGED
@@ -177,8 +177,10 @@ if ( ! class_exists( 'Conversios_Admin' ) ) {
177
  wp_register_style('conversios-daterangepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/css/daterangepicker.css') );
178
  wp_enqueue_style('conversios-daterangepicker-css');
179
  }else if(sanitize_text_field($_GET['page']) == "conversios-pmax"){
180
- wp_register_style('tvc-bootstrap-datepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL. '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.css'));
181
- wp_enqueue_style('tvc-bootstrap-datepicker-css');
 
 
182
  }
183
  //all conversios page css
184
  wp_enqueue_style('conversios-style-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/style.css'), array(), esc_attr($this->version), 'all' );
@@ -208,7 +210,8 @@ if ( ! class_exists( 'Conversios_Admin' ) ) {
208
  //wp_enqueue_script( 'conversios-chart-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js') );
209
  wp_enqueue_script( 'conversios-pmax-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/pmax-custom.js'), array( 'jquery' ), esc_attr($this->version), false );
210
  wp_register_script('tvc-bootstrap-datepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js'));
211
- wp_enqueue_script('tvc-bootstrap-datepicker-js');
 
212
  }
213
  }
214
  }
177
  wp_register_style('conversios-daterangepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/css/daterangepicker.css') );
178
  wp_enqueue_style('conversios-daterangepicker-css');
179
  }else if(sanitize_text_field($_GET['page']) == "conversios-pmax"){
180
+ //wp_register_style('tvc-bootstrap-datepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL. '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.css'));
181
+ //wp_enqueue_style('tvc-bootstrap-datepicker-css');
182
+ wp_register_style( 'jquery-ui', esc_url_raw(ENHANCAD_PLUGIN_URL. '/includes/setup/plugins/datepicker/jquery-ui.css') );
183
+ wp_enqueue_style( 'jquery-ui' );
184
  }
185
  //all conversios page css
186
  wp_enqueue_style('conversios-style-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/style.css'), array(), esc_attr($this->version), 'all' );
210
  //wp_enqueue_script( 'conversios-chart-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js') );
211
  wp_enqueue_script( 'conversios-pmax-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/pmax-custom.js'), array( 'jquery' ), esc_attr($this->version), false );
212
  wp_register_script('tvc-bootstrap-datepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js'));
213
+ wp_enqueue_script('tvc-bootstrap-datepicker-js');
214
+ wp_enqueue_script( 'jquery-ui-datepicker' );
215
  }
216
  }
217
  }
admin/class-conversios-onboarding.php CHANGED
@@ -187,7 +187,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
187
  #wpadminbar{display: none;}
188
  </style>
189
  <div class="bodyrightpart onbordingbody-wapper">
190
- <div class="loader-section" id="loader-section"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/ajax-loader.gif');?>" alt="loader"></div>
191
  <div class="alert-message" id="tvc_onboarding_popup_box"></div>
192
  <div class="onbordingbody">
193
  <div class="site-header">
@@ -860,7 +860,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
860
  //console.log("ga4_acc_val",ga4_acc_val);
861
  //console.log("googleAds",googleAds);
862
  //console.log("gmc_field",gmc_field);
863
- if(ua_acc_val == 1 || ga4_acc_val == 1){
864
  call_list_analytics_account(tvc_data,1); //call analytics api first time
865
  }
866
 
@@ -1178,6 +1178,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
1178
  let tr_ads = save_google_ads_data(google_ads_id, tvc_data, subscription_id, false );
1179
  if(tr_ads){
1180
  go_next(this);
 
1181
  }
1182
  }
1183
 
187
  #wpadminbar{display: none;}
188
  </style>
189
  <div class="bodyrightpart onbordingbody-wapper">
190
+ <div class="loader-section" id="loader-section"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/fevicon.gif');?>" alt="loader"></div>
191
  <div class="alert-message" id="tvc_onboarding_popup_box"></div>
192
  <div class="onbordingbody">
193
  <div class="site-header">
860
  //console.log("ga4_acc_val",ga4_acc_val);
861
  //console.log("googleAds",googleAds);
862
  //console.log("gmc_field",gmc_field);
863
+ if(subscription_id != "" && (ua_acc_val == 1 || ga4_acc_val == 1)){
864
  call_list_analytics_account(tvc_data,1); //call analytics api first time
865
  }
866
 
1178
  let tr_ads = save_google_ads_data(google_ads_id, tvc_data, subscription_id, false );
1179
  if(tr_ads){
1180
  go_next(this);
1181
+ list_google_merchant_account(tvc_data);
1182
  }
1183
  }
1184
 
admin/class-enhanced-ecommerce-google-analytics-admin.php CHANGED
@@ -56,7 +56,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
56
  if(isset($ee_additional_data['dismissed_ee_adimin_notic_a']) && $ee_additional_data['dismissed_ee_adimin_notic_a'] == 1){
57
  }else{
58
  if(!$this->get_subscriptionId()){
59
- echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_a">
60
  <p>'. esc_html__("Tatvic EE plugin is now fully compatible with Google Analytics 4. Also, explore the new features of Google Shopping and Dynamic remarketing to reach million of shoppers across Google and scale your eCommerce business faster.","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("CONFIGURE NOW","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
61
  </div>';
62
  }
@@ -67,7 +67,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
67
  if(isset($google_detail['setting']) && $google_detail['setting']){
68
  $googleDetail = $google_detail['setting'];
69
  if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id =="" && $this->subscriptionId != "" ){
70
- echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_b">
71
  <p>'. esc_html__("Leverage the power of Google Shopping to reach out millions of shoppers across Google. Automate entire Google Shopping and get eligible for free listing when user searches on Google for products similar to your eCommerce business.","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("Automate now","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
72
  </div>';
73
 
@@ -76,7 +76,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
76
  }
77
  if(isset($ee_additional_data['dismissed_ee_adimin_notic_c']) && $ee_additional_data['dismissed_ee_adimin_notic_c'] == 1){
78
  }else{
79
- echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_c">
80
  <p>'. esc_html__("Now access important eCommerce KPIs and Google Ads campaign performance data directly in your wordpress backend to improve your marketing ROI.","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("View it from here.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
81
  </div>';
82
 
@@ -87,7 +87,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
87
  }else{
88
 
89
  if($fb_pixel_id == ""){
90
- echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_d">
91
  <img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/fb-pixel.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Introducing the all-new Facebook Pixel Tracking in Conversios today!","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios-google-analytics#fb_pixel_id').'"><b><u>'. esc_html__(" Check it out for yourself.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
92
  </div>';
93
  }
@@ -97,7 +97,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
97
  }else if(( isset($ee_additional_data['dismissed_ee_adimin_notic_d']) && $ee_additional_data['dismissed_ee_adimin_notic_d'] == 1) || $fb_pixel_id != ""){
98
  $gm_id = isset($ee_settings['gm_id'])?$ee_settings['gm_id']:"";
99
  if($gm_id != ""){
100
- echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_e">
101
  <img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/icon-dashboard.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Your GA4 Dashboard is just a click away !","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios&ga_type=ga4').'"><b><u>'. esc_html__(" Go to GA4 Dashboard.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
102
  </div>';
103
  }
@@ -105,27 +105,44 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
105
 
106
  if(isset($ee_additional_data['dismissed_ee_adimin_notic_f']) && $ee_additional_data['dismissed_ee_adimin_notic_f'] == 1){
107
  }else {
108
- echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_f"><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Grow your business with Performance Max Campaigns. You can create a campaign through our plugin with just a few clicks, and promote products across Google Platforms,","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios-pmax').'"><b><u>'. esc_html__(" Try now.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
109
  </div>';
110
 
111
  }
112
  ?>
113
  <script>
114
- var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
115
- (function( $ ) {
116
- jQuery( function() {
117
- jQuery( '.notice' ).on( 'click', '.notice-dismiss', function( event, el ) {
118
- var ee_notice_dismiss_id = jQuery(this).parent('.is-dismissible').attr("data-id");
119
- jQuery.post(tvc_ajax_url,{
120
- action: "tvc_call_notice_dismiss",
121
- data:{ee_notice_dismiss_id:ee_notice_dismiss_id},
122
- dataType: "json"
123
- },function( response ){
 
124
  });
125
  });
126
- });
127
- })( jQuery );
128
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  <?php
130
  }
131
 
@@ -146,7 +163,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
146
  }else{
147
  wp_register_style('plugin-bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/css/bootstrap.min.css') );
148
  }
149
- wp_enqueue_style('plugin-bootstrap');
150
  wp_enqueue_style('custom-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/custom-style.css'), array(), esc_attr($this->version), 'all' );
151
  //if(is_rtl()){ }
152
  if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
@@ -203,8 +220,9 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
203
  wp_enqueue_script('plugin-select2');
204
  wp_register_script('plugin-chart', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js'));
205
  wp_enqueue_script('plugin-chart');
206
- wp_register_script('tvc-bootstrap-datepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js'));
207
- wp_enqueue_script('tvc-bootstrap-datepicker-js');
 
208
  }
209
  }
210
  }
56
  if(isset($ee_additional_data['dismissed_ee_adimin_notic_a']) && $ee_additional_data['dismissed_ee_adimin_notic_a'] == 1){
57
  }else{
58
  if(!$this->get_subscriptionId()){
59
+ echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_a">
60
  <p>'. esc_html__("Tatvic EE plugin is now fully compatible with Google Analytics 4. Also, explore the new features of Google Shopping and Dynamic remarketing to reach million of shoppers across Google and scale your eCommerce business faster.","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("CONFIGURE NOW","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
61
  </div>';
62
  }
67
  if(isset($google_detail['setting']) && $google_detail['setting']){
68
  $googleDetail = $google_detail['setting'];
69
  if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id =="" && $this->subscriptionId != "" ){
70
+ echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_b">
71
  <p>'. esc_html__("Leverage the power of Google Shopping to reach out millions of shoppers across Google. Automate entire Google Shopping and get eligible for free listing when user searches on Google for products similar to your eCommerce business.","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("Automate now","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
72
  </div>';
73
 
76
  }
77
  if(isset($ee_additional_data['dismissed_ee_adimin_notic_c']) && $ee_additional_data['dismissed_ee_adimin_notic_c'] == 1){
78
  }else{
79
+ echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_c">
80
  <p>'. esc_html__("Now access important eCommerce KPIs and Google Ads campaign performance data directly in your wordpress backend to improve your marketing ROI.","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("View it from here.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
81
  </div>';
82
 
87
  }else{
88
 
89
  if($fb_pixel_id == ""){
90
+ echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_d">
91
  <img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/fb-pixel.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Introducing the all-new Facebook Pixel Tracking in Conversios today!","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios-google-analytics#fb_pixel_id').'"><b><u>'. esc_html__(" Check it out for yourself.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
92
  </div>';
93
  }
97
  }else if(( isset($ee_additional_data['dismissed_ee_adimin_notic_d']) && $ee_additional_data['dismissed_ee_adimin_notic_d'] == 1) || $fb_pixel_id != ""){
98
  $gm_id = isset($ee_settings['gm_id'])?$ee_settings['gm_id']:"";
99
  if($gm_id != ""){
100
+ echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_e">
101
  <img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/icon-dashboard.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Your GA4 Dashboard is just a click away !","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios&ga_type=ga4').'"><b><u>'. esc_html__(" Go to GA4 Dashboard.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
102
  </div>';
103
  }
105
 
106
  if(isset($ee_additional_data['dismissed_ee_adimin_notic_f']) && $ee_additional_data['dismissed_ee_adimin_notic_f'] == 1){
107
  }else {
108
+ echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_f"><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Grow your business with Performance Max Campaigns. You can create a campaign through our plugin with just a few clicks, and promote products across Google Platforms,","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios-pmax').'"><b><u>'. esc_html__(" Try now.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
109
  </div>';
110
 
111
  }
112
  ?>
113
  <script>
114
+ var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
115
+ (function( $ ) {
116
+ jQuery( function() {
117
+ jQuery( '.notice.con-admn-notice' ).on( 'click', '.notice-dismiss', function( event, el ) {
118
+ var ee_notice_dismiss_id = jQuery(this).parent('.is-dismissible').attr("data-id");
119
+ jQuery.post(tvc_ajax_url,{
120
+ action: "tvc_call_notice_dismiss",
121
+ data:{ee_notice_dismiss_id:ee_notice_dismiss_id},
122
+ dataType: "json"
123
+ },function( response ){
124
+ });
125
  });
126
  });
127
+ })( jQuery );
 
128
  </script>
129
+
130
+ <script>
131
+ var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
132
+ (function( $ ) {
133
+ jQuery( function() {
134
+ jQuery( '.notice-dismiss_trigger' ).on( 'click', '.notice-dismiss', function( event, el ) {
135
+ var ee_notice_dismiss_id_trigger = jQuery(this).parent('.is-dismissible').attr("data-id");
136
+ jQuery.post(tvc_ajax_url,{
137
+ action: "tvc_call_notice_dismiss_trigger",
138
+ data:{ee_notice_dismiss_id_trigger:ee_notice_dismiss_id_trigger},
139
+ dataType: "json"
140
+ },function( response ){
141
+ });
142
+ });
143
+ });
144
+ })( jQuery );
145
+ </script>
146
  <?php
147
  }
148
 
163
  }else{
164
  wp_register_style('plugin-bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/css/bootstrap.min.css') );
165
  }
166
+ wp_enqueue_style('plugin-bootstrap');
167
  wp_enqueue_style('custom-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/custom-style.css'), array(), esc_attr($this->version), 'all' );
168
  //if(is_rtl()){ }
169
  if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
220
  wp_enqueue_script('plugin-select2');
221
  wp_register_script('plugin-chart', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js'));
222
  wp_enqueue_script('plugin-chart');
223
+ //wp_register_script('tvc-bootstrap-datepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js'));
224
+ //wp_enqueue_script('tvc-bootstrap-datepicker-js');
225
+ wp_enqueue_script( 'jquery-ui-datepicker' );
226
  }
227
  }
228
  }
admin/class-tvc-admin-auto-product-sync-helper.php CHANGED
@@ -17,11 +17,13 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
17
  add_action('admin_init', array($this,'add_table_in_db'));
18
  $this->customApiObj = new CustomApi();
19
  $this->time_space = $this->TVC_Admin_Helper->get_auto_sync_time_space();
 
20
  $this->batch_size = $this->TVC_Admin_Helper->get_auto_sync_batch_size();
21
  //add_action('admin_init',array($this,'add_woo_req'));
22
 
23
  add_action('admin_init',array($this,'add_schedule_event'));
24
  add_action( 'ee_auto_product_sync_check', array($this, 'call_auto_sync_product' ), 10, 1 );
 
25
 
26
  //add_action('admin_init',array($this,'call_auto_sync_product_ttt'));
27
  }
@@ -162,27 +164,52 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
162
  * update batch wise product sync data in DB table "ee_product_sync_data"
163
  */
164
  public function update_last_sync_in_db_batch_wise($products){
165
- $ee_prod_mapped_attrs = unserialize(get_option('ee_prod_mapped_attrs'));
166
- if( $ee_prod_mapped_attrs != "" ){
167
- global $wpdb;
168
- $product_ids = implode(',', array_column($products, 'w_product_id'));
169
- $where ='`w_product_id` in ('.$product_ids.')';
170
- $pids = $this->TVC_Admin_DB_Helper->tvc_get_results_in_array('ee_product_sync_data', $where, array('w_product_id'), true);
171
- foreach($products as $key => $product) {
172
- $t_data = array(
173
- 'w_product_id'=>esc_sql($product->w_product_id),
174
- 'w_cat_id'=>esc_sql($product->w_cat_id),
175
- 'g_cat_id'=>esc_sql($product->g_cat_id),
176
- 'g_attribute_mapping'=> json_encode($ee_prod_mapped_attrs),
177
- 'update_date'=>esc_sql(date('Y-m-d'))
178
- );
179
- if(!in_array($product->w_product_id, $pids)){
180
- $this->TVC_Admin_DB_Helper->tvc_add_row('ee_product_sync_data', $t_data, array("%d", "%d", "%d", "%s", "%s") );
181
- }else{
182
- $this->TVC_Admin_DB_Helper->tvc_update_row('ee_product_sync_data', $t_data, array('w_product_id'=> esc_sql($product->w_product_id), 'w_cat_id'=> esc_sql($product->w_cat_id) ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  }
184
- }
185
- wp_reset_postdata();
 
 
186
  }
187
  }
188
 
@@ -514,7 +541,7 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
514
  if($row_count >0){
515
  if ( function_exists( 'as_next_scheduled_action' ) && false === as_next_scheduled_action( 'ee_auto_product_sync_check' ) ) {
516
  //strtotime( 'midnight tonight' )
517
- as_schedule_recurring_action( strtotime( "+2 minutes" ), esc_attr($this->time_space), 'ee_auto_product_sync_check',array("last_sync_product_id"=>0),"product_sync");
518
  }
519
  }
520
  }
@@ -599,6 +626,12 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
599
  return $schedules;
600
  }
601
  */
 
 
 
 
 
 
602
  }// end Class
603
  }
604
  new TVC_Admin_Auto_Product_sync_Helper();
17
  add_action('admin_init', array($this,'add_table_in_db'));
18
  $this->customApiObj = new CustomApi();
19
  $this->time_space = $this->TVC_Admin_Helper->get_auto_sync_time_space();
20
+ $this->timestamp = $this->TVC_Admin_Helper->get_first_auto_sync_timestamp();
21
  $this->batch_size = $this->TVC_Admin_Helper->get_auto_sync_batch_size();
22
  //add_action('admin_init',array($this,'add_woo_req'));
23
 
24
  add_action('admin_init',array($this,'add_schedule_event'));
25
  add_action( 'ee_auto_product_sync_check', array($this, 'call_auto_sync_product' ), 10, 1 );
26
+ add_filter( 'cron_schedules', array($this,'tvc_add_cron_interval_for_product_sync') );
27
 
28
  //add_action('admin_init',array($this,'call_auto_sync_product_ttt'));
29
  }
164
  * update batch wise product sync data in DB table "ee_product_sync_data"
165
  */
166
  public function update_last_sync_in_db_batch_wise($products){
167
+ try {
168
+ $ee_prod_mapped_attrs = unserialize(get_option('ee_prod_mapped_attrs'));
169
+ if( $ee_prod_mapped_attrs != "" ){
170
+ global $wpdb;
171
+ $product_ids = implode(',', array_column($products, 'w_product_id'));
172
+ $where ='`w_product_id` in ('.$product_ids.')';
173
+ $pids = $this->TVC_Admin_DB_Helper->tvc_get_results_in_array('ee_product_sync_data', $where, array('w_product_id'), true);
174
+ foreach($products as $key => $product) {
175
+ $t_data = array(
176
+ 'w_product_id'=>esc_sql($product->w_product_id),
177
+ 'w_cat_id'=>esc_sql($product->w_cat_id),
178
+ 'g_cat_id'=>esc_sql($product->g_cat_id),
179
+ 'g_attribute_mapping'=> json_encode($ee_prod_mapped_attrs),
180
+ 'update_date'=>esc_sql(date('Y-m-d'))
181
+ );
182
+ if(!in_array($product->w_product_id, $pids)){
183
+ $this->TVC_Admin_DB_Helper->tvc_add_row('ee_product_sync_data', $t_data, array("%d", "%d", "%d", "%s", "%s") );
184
+ }else{
185
+ $this->TVC_Admin_DB_Helper->tvc_update_row('ee_product_sync_data', $t_data, array('w_product_id'=> esc_sql($product->w_product_id), 'w_cat_id'=> esc_sql($product->w_cat_id) ));
186
+ }
187
+ }
188
+ wp_reset_postdata();
189
+ }
190
+ } catch (Exception $e) {
191
+ $this->TVC_Admin_Helper->plugin_log($e->getMessage(), 'product_sync');
192
+ }
193
+ }
194
+
195
+ /*
196
+ * Update batch wise product sync data in DB table "ee_prouct_pre_sync_data"
197
+ */
198
+ public function update_product_status_pre_sync_data($products){
199
+ try {
200
+ $ee_prod_mapped_attrs = unserialize(get_option('ee_prod_mapped_attrs'));
201
+ if( $ee_prod_mapped_attrs != "" ){
202
+ foreach($products as $product) {
203
+ $t_data = array(
204
+ 'update_date'=>esc_sql(date( 'Y-m-d H:i:s', current_time( 'timestamp') )),
205
+ 'status'=>esc_sql(1)
206
+ );
207
+ $this->TVC_Admin_DB_Helper->tvc_update_row('ee_prouct_pre_sync_data', $t_data, array('w_product_id'=> esc_sql($product->w_product_id), 'w_cat_id'=> esc_sql($product->w_cat_id) ));
208
  }
209
+ wp_reset_postdata();
210
+ }
211
+ } catch (Exception $e) {
212
+ $this->TVC_Admin_Helper->plugin_log($e->getMessage(), 'product_sync');
213
  }
214
  }
215
 
541
  if($row_count >0){
542
  if ( function_exists( 'as_next_scheduled_action' ) && false === as_next_scheduled_action( 'ee_auto_product_sync_check' ) ) {
543
  //strtotime( 'midnight tonight' )
544
+ as_schedule_recurring_action( esc_attr($this->timestamp), esc_attr($this->time_space), 'ee_auto_product_sync_check',array("last_sync_product_id"=>0),"product_sync");
545
  }
546
  }
547
  }
626
  return $schedules;
627
  }
628
  */
629
+ public function tvc_add_cron_interval_for_product_sync( $schedules ) {
630
+ $schedules['product_sync_interval'] = array(
631
+ 'interval' => 180,
632
+ 'display' => esc_html__( 'Every Five Seconds' ) );
633
+ return $schedules;
634
+ }
635
  }// end Class
636
  }
637
  new TVC_Admin_Auto_Product_sync_Helper();
admin/class-tvc-admin-helper.php CHANGED
@@ -25,8 +25,8 @@ Class TVC_Admin_Helper{
25
  $this->TVC_Admin_DB_Helper = new TVC_Admin_DB_Helper();
26
  add_action('init',array($this, 'init'));
27
  add_action( 'init', array( $this, 'tvc_upgrade_function' ), 9999 );
28
- }
29
-
30
  public function includes() {
31
  if (!class_exists('CustomApi.php')) {
32
  require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
@@ -124,29 +124,33 @@ Class TVC_Admin_Helper{
124
  * verstion auto updated
125
  */
126
  public function need_auto_update_db(){
127
- $old_ee_auto_update_id = esc_attr(sanitize_text_field("tvc_4.5.1"));
128
- $new_ee_auto_update_id = esc_attr(sanitize_text_field("tvc_4.5.5"));
129
- $ee_auto_update_id = get_option('ee_auto_update_id');
130
- if($ee_auto_update_id!=""){
131
- if( $ee_auto_update_id != $new_ee_auto_update_id){
132
- global $wpdb;
133
- $tablename = $wpdb->prefix ."ee_products_sync_list";
134
- $wpdb->query("DROP TABLE IF EXISTS ".$tablename);
135
- $tablename = $wpdb->prefix ."ee_product_sync_data";
136
- $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
137
- $tablename = $wpdb->prefix ."ee_product_sync_call";
138
- $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
139
- new TVC_Admin_Auto_Product_sync_Helper();
140
- update_option("ee_auto_update_id", $new_ee_auto_update_id );
141
- }
142
- if($ee_auto_update_id == "tvc_4.5.1"){
143
- //tvc_4.5.1
144
- $this->update_subscription_details_api_to_db();
145
- }
146
- }else{
147
- update_option("ee_auto_update_id", $old_ee_auto_update_id );
148
- }
149
- }
 
 
 
 
150
  /*
151
  * Check auto update time
152
  */
@@ -206,7 +210,7 @@ Class TVC_Admin_Helper{
206
  $syncProductStat = array("total" =>0, "approved" => 0, "disapproved" => 0, "pending" => 0 );
207
  if( $merchantId != ""){
208
  $api_rs = $this->import_gmc_products_sync_in_db($next_page_token);
209
- if( $api_rs["next_page_token"] == "" ){
210
  $product_status = $this->TVC_Admin_DB_Helper->tvc_get_counts_groupby('ee_products_sync_list','google_status');
211
  foreach ($product_status as $key => $value) {
212
  if(isset($value['google_status']) ){
@@ -240,7 +244,7 @@ Class TVC_Admin_Helper{
240
 
241
  $campaigns_list = "";
242
  if(isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != ""){
243
- $this->update_remarketing_snippets();
244
  $shopping_api = new ShoppingApi();
245
  $campaigns_list_res = $shopping_api->getCampaigns();
246
  if(isset($campaigns_list_res->data) && isset($campaigns_list_res->status) && $campaigns_list_res->status == 200) {
@@ -418,13 +422,9 @@ Class TVC_Admin_Helper{
418
  /*
419
  * get additional data from DB
420
  */
421
- public function get_ee_additional_data(){
422
- if(!empty($this->ee_additional_data)){
423
- return $this->ee_additional_data;
424
- }else{
425
- $this->ee_additional_data = unserialize(get_option('ee_additional_data'));
426
- return $this->ee_additional_data;
427
- }
428
  }
429
 
430
  public function save_ee_options_settings($settings){
@@ -780,17 +780,17 @@ Class TVC_Admin_Helper{
780
  $notice_text ="";
781
  $call_js_function_args="";
782
  if (isset($googleDetail->is_site_verified) && isset($googleDetail->is_domain_claim) && $googleDetail->is_site_verified == '0' && $googleDetail->is_domain_claim == '0') {
783
- $title = esc_html__("Site verification and Domain claim for merchant center account failed.","enhanced-e-commerce-for-woocommerce-store");
784
  $message = esc_html__("Without a verified and claimed website, your product will get disapproved.","enhanced-e-commerce-for-woocommerce-store");
785
- $call_js_function_args = "both";
786
  }else if(isset($googleDetail->is_site_verified) && $googleDetail->is_site_verified == '0'){
787
- $title = esc_html__("Site verification for merchant center account failed.","enhanced-e-commerce-for-woocommerce-store");
788
  $message = esc_html__("Without a verified website, your product will get disapproved.","enhanced-e-commerce-for-woocommerce-store");
789
- $call_js_function_args = "site_verified";
790
  }else if(isset($googleDetail->is_domain_claim) && $googleDetail->is_domain_claim == '0'){
791
- $title = esc_html__("Site claimed website for merchant center account failed.","enhanced-e-commerce-for-woocommerce-store");
792
  $message = esc_html__("Without a claimed website, your product will get disapproved.","enhanced-e-commerce-for-woocommerce-store");
793
- $call_js_function_args = "domain_claim";
794
  }
795
  if($message!= "" && $title != ""){
796
  ?>
@@ -801,7 +801,7 @@ Class TVC_Admin_Helper{
801
  </div>
802
  <div class="erralertrigt">
803
  <h6><?php echo esc_attr($title); ?></h6>
804
- <p><?php echo esc_attr($message); ?> <a href="javascript:void(0)" id="call_both_verification" onclick="call_tvc_site_verified_and_domain_claim('<?php echo esc_attr($call_js_function_args); ?>');"><?php esc_html_e("Click here","enhanced-e-commerce-for-woocommerce-store"); ?></a> <?php esc_html_e("to verify and claim the domain.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
805
  </div>
806
  </div>
807
  </div>
@@ -980,6 +980,18 @@ Class TVC_Admin_Helper{
980
  }
981
  }
982
 
 
 
 
 
 
 
 
 
 
 
 
 
983
  public function get_auto_sync_batch_size(){
984
  $plan_id = $this->get_plan_id();
985
  $ee_additional_data = $this->get_ee_additional_data();
@@ -1029,84 +1041,7 @@ Class TVC_Admin_Helper{
1029
  public function get_ee_msg_nofification_list(){
1030
  return unserialize(get_option('ee_msg_nofifications'));
1031
  }
1032
- /*public function add_ee_msg_nofification($key, $html, $title = null, $link = null, $link_title = null, $overwrite= false, $link_type = "internal"){
1033
- $ee_msg_list = $this->get_ee_msg_nofification_list();
1034
- if((!isset($ee_msg_list[$key]) && $html !="") ||($overwrite == true && isset($ee_msg_list[$key]) && $html !="")){
1035
- $msg = array();
1036
- $date_formate=get_option('date_format')." ".get_option('time_format');
1037
- if($date_formate ==""){
1038
- $date_formate = 'M-d-Y';
1039
- }
1040
- $msg["title"] = isset($title)?$title:"";
1041
- $msg["date"] = date( $date_formate, current_time( 'timestamp' ) );
1042
- $msg["html"] = base64_encode((isset($html))?$html:"");
1043
- if($link != ""){
1044
- $msg["link"] = $link;
1045
- $msg["link_title"] = (isset($link_title) && $link_title)?$link_title:"Learn more";
1046
- $msg["link_type"] = $link_type;
1047
- }
1048
- $msg["active"] = 1;
1049
- $ee_msg_list[$key] = $msg;
1050
- $this->set_ee_msg_nofification_list($ee_msg_list);
1051
- }
1052
- }
1053
-
1054
- public function add_tvc_fixed_nofification(){
1055
- $nofifications = [];
1056
-
1057
- $nofifications["tvc_f_notif_1"] = array(
1058
- "tittle"=>esc_html__("Congratulations..!! You are one step closer.","enhanced-e-commerce-for-woocommerce-store"),
1059
- "html"=>esc_html__("Thanks for installing the new avatar of Enhanced Ecommerce for WooCommerce plugin. Explore the full potential of Google Analytics, Google Ads and Google shopping by setting up all your Google accounts and take data driven decisions to scale your eCommerce business faster.", "enhanced-e-commerce-for-woocommerce-store")
1060
- );
1061
- $nofifications["tvc_f_notif_2"] = array(
1062
- "tittle"=>esc_html__("Share your feedback.","enhanced-e-commerce-for-woocommerce-store"),
1063
- "html"=>esc_html__("Your feedback is very important to us. Please write about your experience and the new feature requests here.","enhanced-e-commerce-for-woocommerce-store"),
1064
- "link"=>"https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/",
1065
- "link_title"=>esc_html__("Share Feedback", "enhanced-e-commerce-for-woocommerce-store"),
1066
- "link_type"=>"external"
1067
- );
1068
-
1069
- $google_detail = $this->get_ee_options_data();
1070
- if(isset($google_detail['setting'])){
1071
- $googleDetail = $google_detail['setting'];
1072
-
1073
- if(isset($googleDetail->subscription_expiry_date) && !in_array($googleDetail->plan_id, array("1"))){
1074
- $current = strtotime("now");
1075
- //echo "<br>curent date: ".date( 'M-d-Y H:i',$current);
1076
- $subscription_expiry_time = strtotime($googleDetail->subscription_expiry_date);
1077
- //echo "<br>subscription expiry date: ".date( 'M-d-Y H:i',$subscription_expiry_time);
1078
- $diffrent_day = floor(( $subscription_expiry_time - $current)/(60*60*24) +1);
1079
- if($diffrent_day < 6 && $diffrent_day > 0){
1080
- $befor_day = $diffrent_day." ".($diffrent_day == 1 ? 'day':'days');
1081
- $nofifications["tvc_pay_not_".date("YYYY_m_d",$current)] = array(
1082
- "tittle"=>"Gentle reminder",
1083
- "html"=>"Your plan is expiring in ".$befor_day.". Payment will be auto debited from your configured paypal account on “next billing date”."
1084
- );
1085
- }
1086
- $diffrent_day = floor(( $current - $subscription_expiry_time)/(60*60*24)-1);
1087
-
1088
- if($diffrent_day == 6 ){
1089
- $nofifications["tvc_expired_plan_not_".date("YYYY_m_d",$current)] = array(
1090
- "tittle"=>"Plan Expired..!!",
1091
- "html"=>esc_html__("Your plan is expired now. Contact “analytics2@tatvic.com” or call us at “(415) 968-6313” to renew your plan.", "enhanced-e-commerce-for-woocommerce-store")
1092
- );
1093
- }
1094
- }
1095
-
1096
- }
1097
-
1098
- if(!empty($nofifications)){
1099
- foreach ($nofifications as $key => $value){
1100
- if(isset($value["html"]) && $value["html"] != ""){
1101
- $n_link = isset($value["link"])?$value["link"]:"";
1102
- $n_link_title = isset($value["link_title"])?$value["link_title"]:"";
1103
- $link_type = isset($value["link_type"])?$value["link_type"]:"";
1104
- $this->add_ee_msg_nofification( $key, $value["html"], $value["tittle"], $n_link, $n_link_title, "", $link_type);
1105
- }
1106
- }
1107
- }
1108
- } */
1109
-
1110
  public function active_licence($licence_key, $subscription_id){
1111
  if($licence_key != ""){
1112
  $customObj = new CustomApi();
@@ -1175,6 +1110,134 @@ Class TVC_Admin_Helper{
1175
  }
1176
  }
1177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1178
  /*
1179
  * conver curency code to currency symbols
1180
  */
@@ -1201,5 +1264,98 @@ Class TVC_Admin_Helper{
1201
  }else{
1202
  return $code;
1203
  }
1204
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1205
  }
25
  $this->TVC_Admin_DB_Helper = new TVC_Admin_DB_Helper();
26
  add_action('init',array($this, 'init'));
27
  add_action( 'init', array( $this, 'tvc_upgrade_function' ), 9999 );
28
+ }
29
+
30
  public function includes() {
31
  if (!class_exists('CustomApi.php')) {
32
  require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
124
  * verstion auto updated
125
  */
126
  public function need_auto_update_db(){
127
+ $old_ee_auto_update_id = esc_attr(sanitize_text_field("tvc_4.5.5"));
128
+ $new_ee_auto_update_id = esc_attr(sanitize_text_field("tvc_4.5.6"));
129
+ $ee_auto_update_id = get_option('ee_auto_update_id');
130
+ if($ee_auto_update_id!=""){
131
+ if( $ee_auto_update_id != $new_ee_auto_update_id){
132
+ global $wpdb;
133
+ try {
134
+ $table = $wpdb->prefix ."ee_prouct_pre_sync_data";
135
+ $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table ) );
136
+ if ( $wpdb->get_var( $query ) === $table ) {
137
+ $table = esc_sql($table);
138
+ $wpdb->query("ALTER TABLE $table ADD `create_date` DATETIME NULL DEFAULT CURRENT_TIMESTAMP AFTER `product_sync_profile_id`");
139
+ $wpdb->query("ALTER TABLE $table CHANGE `update_date` `update_date` DATETIME NULL");
140
+ }
141
+ } catch (Exception $e) {
142
+
143
+ }
144
+ update_option("ee_auto_update_id", $new_ee_auto_update_id );
145
+ }
146
+ if($ee_auto_update_id == "tvc_4.5.1"){
147
+ //tvc_4.5.1
148
+ $this->update_subscription_details_api_to_db();
149
+ }
150
+ }else{
151
+ update_option("ee_auto_update_id", $old_ee_auto_update_id );
152
+ }
153
+ }
154
  /*
155
  * Check auto update time
156
  */
210
  $syncProductStat = array("total" =>0, "approved" => 0, "disapproved" => 0, "pending" => 0 );
211
  if( $merchantId != ""){
212
  $api_rs = $this->import_gmc_products_sync_in_db($next_page_token);
213
+ if(isset($api_rs["next_page_token"]) && $api_rs["next_page_token"] == "" ){
214
  $product_status = $this->TVC_Admin_DB_Helper->tvc_get_counts_groupby('ee_products_sync_list','google_status');
215
  foreach ($product_status as $key => $value) {
216
  if(isset($value['google_status']) ){
244
 
245
  $campaigns_list = "";
246
  if(isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != ""){
247
+ //$this->update_remarketing_snippets();
248
  $shopping_api = new ShoppingApi();
249
  $campaigns_list_res = $shopping_api->getCampaigns();
250
  if(isset($campaigns_list_res->data) && isset($campaigns_list_res->status) && $campaigns_list_res->status == 200) {
422
  /*
423
  * get additional data from DB
424
  */
425
+ public function get_ee_additional_data(){
426
+ $this->ee_additional_data = unserialize(get_option('ee_additional_data'));
427
+ return $this->ee_additional_data;
 
 
 
 
428
  }
429
 
430
  public function save_ee_options_settings($settings){
780
  $notice_text ="";
781
  $call_js_function_args="";
782
  if (isset($googleDetail->is_site_verified) && isset($googleDetail->is_domain_claim) && $googleDetail->is_site_verified == '0' && $googleDetail->is_domain_claim == '0') {
783
+ /*$title = esc_html__("Site verification and Domain claim for merchant center account failed.","enhanced-e-commerce-for-woocommerce-store");
784
  $message = esc_html__("Without a verified and claimed website, your product will get disapproved.","enhanced-e-commerce-for-woocommerce-store");
785
+ $call_js_function_args = "both";*/
786
  }else if(isset($googleDetail->is_site_verified) && $googleDetail->is_site_verified == '0'){
787
+ /*$title = esc_html__("Site verification for merchant center account failed.","enhanced-e-commerce-for-woocommerce-store");
788
  $message = esc_html__("Without a verified website, your product will get disapproved.","enhanced-e-commerce-for-woocommerce-store");
789
+ $call_js_function_args = "site_verified";*/
790
  }else if(isset($googleDetail->is_domain_claim) && $googleDetail->is_domain_claim == '0'){
791
+ /*$title = esc_html__("Site claimed website for merchant center account failed.","enhanced-e-commerce-for-woocommerce-store");
792
  $message = esc_html__("Without a claimed website, your product will get disapproved.","enhanced-e-commerce-for-woocommerce-store");
793
+ $call_js_function_args = "domain_claim";*/
794
  }
795
  if($message!= "" && $title != ""){
796
  ?>
801
  </div>
802
  <div class="erralertrigt">
803
  <h6><?php echo esc_attr($title); ?></h6>
804
+ <!--<p><?php echo esc_attr($message); ?> <a href="javascript:void(0)" id="call_both_verification" onclick="call_tvc_site_verified_and_domain_claim('<?php echo esc_attr($call_js_function_args); ?>');"><?php esc_html_e("Click here","enhanced-e-commerce-for-woocommerce-store"); ?></a> <?php esc_html_e("to verify and claim the domain.","enhanced-e-commerce-for-woocommerce-store"); ?></p>-->
805
  </div>
806
  </div>
807
  </div>
980
  }
981
  }
982
 
983
+ public function get_first_auto_sync_timestamp(){
984
+ $plan_id = $this->get_plan_id();
985
+ $ee_additional_data = $this->get_ee_additional_data();
986
+ $product_sync_duration = (isset($ee_additional_data['product_sync_duration']) && $ee_additional_data['product_sync_duration'])?$ee_additional_data['product_sync_duration']:"";
987
+ $pro_snyc_time_limit = (int)(isset($ee_additional_data['pro_snyc_time_limit']) && $ee_additional_data['pro_snyc_time_limit'] > 0)?$ee_additional_data['pro_snyc_time_limit']:"";
988
+ if( $product_sync_duration != "" && $pro_snyc_time_limit > 0 && $plan_id != 1){
989
+ return strtotime($pro_snyc_time_limit." ".$product_sync_duration);
990
+ }else{
991
+ return strtotime("25 days");
992
+ }
993
+ }
994
+
995
  public function get_auto_sync_batch_size(){
996
  $plan_id = $this->get_plan_id();
997
  $ee_additional_data = $this->get_ee_additional_data();
1041
  public function get_ee_msg_nofification_list(){
1042
  return unserialize(get_option('ee_msg_nofifications'));
1043
  }
1044
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1045
  public function active_licence($licence_key, $subscription_id){
1046
  if($licence_key != ""){
1047
  $customObj = new CustomApi();
1110
  }
1111
  }
1112
 
1113
+ public function tvc_display_admin_notices(){
1114
+ $ee_additional_data = $this->get_ee_additional_data();
1115
+ if(isset($ee_additional_data['admin_notices'])&& !empty($ee_additional_data['admin_notices'])){
1116
+ foreach($ee_additional_data['admin_notices'] as $key => $admin_notice){
1117
+ if(!empty($admin_notice['link_title']) && !empty($admin_notice['status']) && $admin_notice['status'] = "1"){ ?>
1118
+ <div class="notice notice-info notice-dismiss_trigger is-dismissible" data-id='<?php echo esc_attr($key); ?>'>
1119
+ <?php echo '<p>'. esc_html__($admin_notice['content'],"enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw($admin_notice["link"]).'" target="_blank" ><b><u>'. esc_html__($admin_notice['link_title'],"enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
1120
+ </div>';
1121
+ }
1122
+ }
1123
+ }
1124
+ }
1125
+ //tvc_add_data_admin_notice function for adding the admin notices
1126
+ public function tvc_add_admin_notice($slug, $link_title, $content, $status, $link = null, $value = null, $title = null){
1127
+ $ee_additional_data = $this->get_ee_additional_data();
1128
+ if(!isset($ee_additional_data['admin_notices'][$slug])){
1129
+ $ee_additional_data['admin_notices'][$slug] = array("link_title"=>$link_title,"content"=>$content,"status"=> $status,"title"=>$title, "value"=> $value,"link"=>$link );
1130
+ $this->set_ee_additional_data($ee_additional_data);
1131
+ }
1132
+ }
1133
+ //tvc_dismiss_admin_notice function for dismissing the admin notices
1134
+ public function tvc_dismiss_admin_notice($slug, $title, $content, $status, $value = null){
1135
+ $ee_additional_data = $this->get_ee_additional_data();
1136
+ if(isset($ee_additional_data['admin_notices'][$slug])){
1137
+ $ee_additional_data['admin_notices'][$slug] = array("title"=>$title,"content"=>$content,"status"=> $status, "value"=> $value);
1138
+ $this->set_ee_additional_data($ee_additional_data);
1139
+ }
1140
+ }
1141
+ public function tvc_add_data_admin_notice(){
1142
+ $tvc_add_data_admin_notice = $this->get_ee_options_settings();
1143
+ $con_subscription_id = $this->get_subscriptionId();
1144
+ //when user google signed in
1145
+ if($con_subscription_id != "" && $con_subscription_id != null ){
1146
+ $link_title = "User Manual Guide";
1147
+ $content = "You have not linked Google Analytics, Google Ads and Google Merchant Center accounts with Conversios plugin. Set up the conversios plugin now and boost your sales. Refer User Manual guide to get started,";
1148
+ $status = "0";
1149
+ $this->tvc_dismiss_admin_notice("no_google_signin", $link_title, $content, $status);
1150
+ //getting the review from user.
1151
+ if(!isset($_POST['conversios_onboarding_nonce'])){
1152
+ $ee_additional_data = $this->get_ee_additional_data();
1153
+ if(!isset($ee_additional_data['con_created_at'])){
1154
+ //if exisiting user and created date is not there
1155
+ $ee_additional_data = $this->get_ee_additional_data();
1156
+ $ee_additional_data['con_created_at'] = "";
1157
+ $ee_additional_data['con_updated_at'] = date('Y-m-d');
1158
+ $this->set_ee_additional_data($ee_additional_data);
1159
+ //add admin notice if created date is not there
1160
+ $link_title = "review here.";
1161
+ $content = "You have successfully started recording all the important ecommerce events in Google Analytics account using Conversios plugin. Let us know your experience by sharing your";
1162
+ $status = "1";
1163
+ $link = "https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#reviews";
1164
+ $this->tvc_add_admin_notice("review_for_days" , $link_title , $content, $status, $link );
1165
+ }else if(isset($ee_additional_data['con_created_at']) && $ee_additional_data['con_created_at'] != ''){
1166
+ //existing user if created date is available
1167
+ $current_date = date('Y-m-d');
1168
+ $created_date=date_create($ee_additional_data['con_created_at']);
1169
+ $today = date_create($current_date);
1170
+ $diff=date_diff($created_date,$today);
1171
+ $day_diff = $diff->format("%a");
1172
+ if($day_diff>= 15){
1173
+ $link_title = "review here.";
1174
+ $content = "You have successfully started recording all the important ecommerce events in Google Analytics account using Conversios plugin. Let us know your experience by sharing your";
1175
+ $status = "1";
1176
+ $link = "https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#reviews";
1177
+ $this->tvc_add_admin_notice("review_for_days" , $link_title , $content, $status, $link);
1178
+ }
1179
+ }
1180
+ }
1181
+ //if user has not selected merchant center account.
1182
+ if(!isset($tvc_add_data_admin_notice['google_merchant_id']) || (isset($tvc_add_data_admin_notice['google_merchant_id']) && $tvc_add_data_admin_notice['google_merchant_id'] == '')){
1183
+ $link_title = "Link Google Merchant account";
1184
+ $content = "You have not linked Google Merchant Account account with conversios plugin yet. Increase your sales by linking the Google Merchant Account, Refer the user manual to link the account";
1185
+ $status = "1";
1186
+ $this->tvc_add_admin_notice("no_merchant_account" , $link_title , $content, $status);
1187
+ }else{
1188
+ $link_title = "Link Google Merchant account";
1189
+ $content = "You have not linked Google Merchant Account account with conversios plugin yet. Increase your sales by linking the Google Merchant Account, Refer the user manual to link the account";
1190
+ $status = "0";
1191
+ $this->tvc_dismiss_admin_notice("no_merchant_account", $link_title, $content, $status);
1192
+ }
1193
+ //if user has not selected Google Ads account.
1194
+ if(!isset($tvc_add_data_admin_notice['google_ads_id']) || (isset($tvc_add_data_admin_notice['google_ads_id']) && $tvc_add_data_admin_notice['google_ads_id'] == '')){
1195
+ $link_title = "Link Google Ads account";
1196
+ $content = "You have not linked Google Ads account with conversios plugin yet. Increase your sales by linking the Google Ads account, Refer the user manual to link the account";
1197
+ $status = "1";
1198
+ $link = "admin.php?page=conversios_onboarding";
1199
+ $this->tvc_add_admin_notice("no_google_ads_account" , $link_title , $content, $status, $link);
1200
+ }else{
1201
+ $link_title = "Link Google Ads account";
1202
+ $content = "You have not linked Google Ads account with conversios plugin yet. Increase your sales by linking the Google Ads account, Refer the user manual to link the account";
1203
+ $status = "0";
1204
+ $this->tvc_dismiss_admin_notice("no_google_ads_account", $link_title, $content, $status);
1205
+ }
1206
+ //if user has not selected GA4 account.
1207
+ if(!isset($tvc_add_data_admin_notice['gm_id']) || (isset($tvc_add_data_admin_notice['gm_id']) && $tvc_add_data_admin_notice['gm_id'] == '')){
1208
+ $link_title = "Link Google Analytics 4 account";
1209
+ $content = "You have not linked Google Analytics 4 account with conversios plugin yet. Increase your sales by linking the Google Analytics 4 account, Refer the user manual to link the account";
1210
+ $status = "1";
1211
+ $link = "admin.php?page=conversios_onboarding";
1212
+ $this->tvc_add_admin_notice("no_ga4_account" , $link_title , $content, $status, $link);
1213
+ }else{
1214
+ $link_title = "Link Google Analytics 4 account";
1215
+ $content = "You have not linked Google Analytics 4 account with conversios plugin yet. Increase your sales by linking the Google Analytics 4 account, Refer the user manual to link the account";
1216
+ $status = "0";
1217
+ $this->tvc_dismiss_admin_notice("no_ga4_account", $link_title, $content, $status);
1218
+ }
1219
+ //if user has not selected Google Analytics account.
1220
+ if(!isset($tvc_add_data_admin_notice['ga_id']) || (isset($tvc_add_data_admin_notice['ga_id']) && $tvc_add_data_admin_notice['ga_id'] == '')){
1221
+ $link_title = "Link Google Analytics account";
1222
+ $content = "You have not linked Google Analytics account with conversios plugin yet. Increase your sales by linking the Google Analytics account, Refer the user manual to link the account";
1223
+ $status = "1";
1224
+ $link = "admin.php?page=conversios_onboarding";
1225
+ $this->tvc_add_admin_notice("no_ga_account" , $link_title , $content, $status, $link);
1226
+ }else{
1227
+ $link_title = "Link Google Analytics account";
1228
+ $content = "You have not linked Google Analytics account with conversios plugin yet. Increase your sales by linking the Google Analytics account, Refer the user manual to link the account";
1229
+ $status = "0";
1230
+ $this->tvc_dismiss_admin_notice("no_ga_account", $link_title, $content, $status);
1231
+ }
1232
+ }else{
1233
+ //when user will not do google sign in
1234
+ $link_title = " User Manual Guide";
1235
+ $content = "You have not linked Google Analytics, Google Ads and Google Merchant Center accounts with Conversios plugin. Set up the conversios plugin now and boost your sales. Refer User Manual guide to get started,";
1236
+ $status = "1";
1237
+ $link = "https://conversios.io/help-center/Installation-Manual.pdf";
1238
+ $this->tvc_add_admin_notice("no_google_signin", $link_title, $content, $status, $link);
1239
+ }
1240
+ }
1241
  /*
1242
  * conver curency code to currency symbols
1243
  */
1264
  }else{
1265
  return $code;
1266
  }
1267
+ }
1268
+ /*pixel validation */
1269
+ public function is_facebook_pixel_id( $string ) {
1270
+ if (empty($string)) {
1271
+ return true;
1272
+ }
1273
+ $re = '/^\d{14,16}$/m';
1274
+ return $this->con_validate_with_regex($re, $string);
1275
+ }
1276
+ public function is_bing_uet_tag_id( $string ) {
1277
+ if (empty($string)) {
1278
+ return true;
1279
+ }
1280
+ $re = '/^\d{7,9}$/m';
1281
+ return $this->con_validate_with_regex($re, $string);
1282
+ }
1283
+ public function is_twitter_pixel_id( $string ) {
1284
+ if (empty($string)) {
1285
+ return true;
1286
+ }
1287
+ $re = '/^[a-z0-9]{5,7}$/m';
1288
+ return $this->con_validate_with_regex($re, $string);
1289
+ }
1290
+ public function is_pinterest_pixel_id( $string ) {
1291
+ if (empty($string)) {
1292
+ return true;
1293
+ }
1294
+ $re = '/^\d{13}$/m';
1295
+ return $this->con_validate_with_regex($re, $string);
1296
+ }
1297
+ public function is_snapchat_pixel_id( $string ) {
1298
+ if (empty($string)) {
1299
+ return true;
1300
+ }
1301
+ $re = '/^[a-z0-9\-]*$/m';
1302
+ return $this->con_validate_with_regex($re, $string);
1303
+ }
1304
+ public function is_tiktok_pixel_id( $string ) {
1305
+ if (empty($string)) {
1306
+ return true;
1307
+ }
1308
+ $re = '/^[A-Z0-9]{20,20}$/m';
1309
+ return $this->con_validate_with_regex($re, $string);
1310
+ }
1311
+ public function con_validate_with_regex( $re, $string ) {
1312
+ // validate if string matches the regex $re
1313
+ if (preg_match($re, $string)){
1314
+ return true;
1315
+ } else {
1316
+ return false;
1317
+ }
1318
+ }
1319
+
1320
+ public function validate_pixels(){
1321
+ $errors = array();
1322
+ if(isset($_POST["fb_pixel_id"]) && $_POST["fb_pixel_id"] != "" && !$this->is_facebook_pixel_id($_POST["fb_pixel_id"])){
1323
+ unset($_POST["fb_pixel_id"]);
1324
+ $errors[] = array("error" => true, "message" => esc_html__("You entered wrong facebook pixel ID.", "enhanced-e-commerce-for-woocommerce-store"));
1325
+ }
1326
+ if(isset($_POST["microsoft_ads_pixel_id"]) && $_POST["microsoft_ads_pixel_id"] != "" && !$this->is_bing_uet_tag_id($_POST["microsoft_ads_pixel_id"])){
1327
+ unset($_POST["microsoft_ads_pixel_id"]);
1328
+ $errors[] = array("error" => true, "message" => esc_html__("You entered wrong microsoft ads pixel ID.", "enhanced-e-commerce-for-woocommerce-store"));
1329
+ }
1330
+ if(isset($_POST["twitter_ads_pixel_id"]) && $_POST["twitter_ads_pixel_id"] != "" && !$this->is_twitter_pixel_id($_POST["twitter_ads_pixel_id"])){
1331
+ unset($_POST["twitter_ads_pixel_id"]);
1332
+ $errors[] = array("error" => true, "message" => esc_html__("You entered wrong twitter ads pixel ID.", "enhanced-e-commerce-for-woocommerce-store"));
1333
+ }
1334
+ if(isset($_POST["pinterest_ads_pixel_id"]) && $_POST["pinterest_ads_pixel_id"] != "" && !$this->is_pinterest_pixel_id($_POST["pinterest_ads_pixel_id"])){
1335
+ unset($_POST["pinterest_ads_pixel_id"]);
1336
+ $errors[] = array("error" => true, "message" => esc_html__("You entered wrong pinterest ads pixel ID.", "enhanced-e-commerce-for-woocommerce-store"));
1337
+ }
1338
+ if(isset($_POST["snapchat_ads_pixel_id"]) && $_POST["snapchat_ads_pixel_id"] != "" && !$this->is_snapchat_pixel_id($_POST["snapchat_ads_pixel_id"])){
1339
+ unset($_POST["snapchat_ads_pixel_id"]);
1340
+ $errors[] = array("error" => true, "message" => esc_html__("You entered wrong napchat ads pixel ID.", "enhanced-e-commerce-for-woocommerce-store"));
1341
+ }
1342
+ if(isset($_POST["tiKtok_ads_pixel_id"]) && $_POST["tiKtok_ads_pixel_id"] != "" && !$this->is_tiktok_pixel_id($_POST["tiKtok_ads_pixel_id"])){
1343
+ unset($_POST["tiKtok_ads_pixel_id"]);
1344
+ $errors[] = array("error" => true, "message" => esc_html__("You entered wrong tiKtok ads pixel ID.", "enhanced-e-commerce-for-woocommerce-store"));
1345
+ }
1346
+ return $errors;
1347
+ }
1348
+ /*
1349
+ * Add Plugin logs
1350
+ */
1351
+ public function plugin_log($message, $file = 'plugin') {
1352
+ // Get WordPress uploads directory.
1353
+ if(is_array($message)) {
1354
+ $message = json_encode($message);
1355
+ }
1356
+ $log = new WC_Logger();
1357
+ $log->log( 'Conversios Product Sync Log ', $message );
1358
+ //error_log($message);
1359
+ return true;
1360
+ }
1361
  }
admin/css/enhanced-ecommerce-google-analytics-admin.css CHANGED
@@ -714,4 +714,17 @@ img{
714
 
715
  .list-image img {
716
  max-width: 18px;
 
 
 
 
 
 
 
 
 
 
 
 
 
717
  }
714
 
715
  .list-image img {
716
  max-width: 18px;
717
+ }
718
+
719
+ .not-count {
720
+ position: absolute;
721
+ top: -5px;
722
+ right: -15px;
723
+ width: 20px;
724
+ height: 20px;
725
+ line-height: 20px;
726
+ text-align: center;
727
+ padding: 0;
728
+ border-radius: 50%;
729
+ background-color: #2D62ED;
730
  }
admin/css/style.css CHANGED
@@ -30,13 +30,15 @@
30
  .rate_us span{margin-right: 3px; /*vertical-align: bottom;*/}
31
  .rate_us img{max-width: 120px;}
32
  /*dasboard*/
33
- select.data_collection_method{
34
  border: 1px solid #C6C6C6;
35
  border-radius: 6px;
36
  box-sizing: border-box;
37
  cursor: pointer;
38
  -webkit-user-select: none;
39
  padding-right: 30px;
 
 
40
  }
41
  .btn-11 {
42
  overflow: hidden;
@@ -195,7 +197,7 @@ select.data_collection_method{
195
  z-index: 999;
196
  }
197
  .loader-section img {
198
- max-width: 50px;
199
  }
200
  .site-header{left: 160px !important;}
201
  button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{background-color:#CCCCCC;color:#ffffff;}
@@ -563,7 +565,7 @@ input[type="radio"], input[type="checkbox"]{margin:0;}
563
  .onbrdpp-body p strong{color:#1e1e1e;}
564
  .onbrdpp-body h5{margin-bottom:15px;}
565
  .onbrdpp-body ul,.onbrdpp-body ol{padding:0;margin:0;}
566
- .onbrdpp-body ul li, .onbrdpp-body ol li{font-size:16px;line-height:24px;margin-bottom:12px;}
567
  .onbrdpp-body ul li:last-child, .onbrdpp-body ol li:last-child{margin-bottom:0px;}
568
  .onbrdpp-body ol{padding-left:20px;}
569
  .onbrdpp-body ol li{padding-left:5px;}
@@ -652,7 +654,7 @@ input[type="radio"], input[type="checkbox"]{margin:0;}
652
  .hdrcntcbx{padding-left:15px;margin-left:15px;border-left:1px solid #C6C6C6;font-size:14px;line-height:22px;}
653
  .hdrcntcbx span{color:#0083FC;display:inline-block;}
654
  .hdrtpright{display:flex;padding:0 15px;max-width:33.333333%;flex:0 0 33.33333%;justify-content:flex-end;}
655
- .hustleplanbtn .cvrs-btn{font-size:12px;padding:6px 12px;}
656
  .hdrnotiwrp{display:flex;margin-left:22px;align-items:flex-start;}
657
  .notialrt{background-color:#FA424D;color:#ffffff;font-size:10px;line-height:12px;border-radius:30px;padding:2px 4px 2px;margin-left:-10px;}
658
 
@@ -1156,10 +1158,13 @@ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{b
1156
  #ee_plugin_form select{
1157
  min-width: 480px;
1158
  }
 
1159
  #ee_plugin_form select.select-sm { min-width: 80px; border-radius: 6px; padding: 1px 5px; margin: 0; display: inline-block;}
1160
- table .tracking-trigger td{ padding: 0 0 0.5rem 1rem !important;}
1161
  #ee_plugin_form input[type="text"], #ee_plugin_form input[type="number"], .tracking-trigger .fromfiled{ min-width: 285px; height: 32px; margin-bottom: 5px;}
1162
  #ee_plugin_form .tracking-trigger input[type="text"].select-sm{min-width: 10px; max-width: 80px;}
 
 
1163
  /**********PMax CSS ************/
1164
  .search-box { background: url('../images/search-icon.png');
1165
  background-repeat: no-repeat;
@@ -1351,21 +1356,21 @@ img.img-upload {
1351
  .pmax-campaign .cmp_urls .fromfiled{max-width: 500px;}
1352
  .pmax-campaign .cmp_urls .form-col-8 {width: 45%;}
1353
  /*.pmax-campaign .fromfiled.smtext{max-width: 200px;}*/
1354
- .google-account-analytics .ga-title.con_faq_title{cursor: pointer; position: relative; background-color: #F1F1F1; padding: 10px 5px;}
1355
  .google-account-analytics .ga-title.con_faq_title.active{ margin-bottom: 8px;}
1356
  .con_faq_title img.faq_icon{position: absolute; right: 10px; transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1357
  .con_faq_title.active img.faq_icon{transform: rotate(180deg); transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1358
- .sec_con_integration {opacity: 0; position: fixed; visibility: hidden; transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1359
  .sec_con_integration.active{ opacity: 1; position: relative; visibility: visible; transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1360
  .sec_con_integration .tvc-hide{transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1361
- .sec_con_integration .tvc-tooltip{position: relative; display: inline-block; width: auto; top: 0px; float: right; right: -4px;}
1362
  .sec_con_integration .tvc-tooltip .tvc-tooltiptext{line-height: 1.2; bottom: 6px; left: 125%; top: auto; min-width: 380px;}
1363
  .tvc-css-selector-sec .tvc-tooltip{top: -6px; right: 13px;}
1364
  .tracking-trigger th span{display: inline-block;}
1365
  .sec_con_integration th .tvc-tooltip{top: -7px; right: -3px;}
1366
  .tvc_ee_plugin_form .tvc-tooltip{position: relative; display: inline-block; width: auto;}
1367
  .tvc_ee_plugin_form .tvc-tooltip .tvc-tooltiptext{line-height: 1.2; bottom: 0px; left: 125%; top: auto; min-width: 380px; padding: 5px 8px;}
1368
-
1369
 
1370
  .tvc-auto-product-sync-form .ga-title{position: relative;}
1371
  .tvc_ee_plugin_form .sec_con_integration.advance-setting .tvc-tooltip{top: inherit; float: inherit; right: inherit;}
@@ -1437,3 +1442,16 @@ site-verified-pos{
1437
  border-bottom-width: 0px;
1438
  box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);
1439
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  .rate_us span{margin-right: 3px; /*vertical-align: bottom;*/}
31
  .rate_us img{max-width: 120px;}
32
  /*dasboard*/
33
+ #ee_plugin_form select.data_collection_method{
34
  border: 1px solid #C6C6C6;
35
  border-radius: 6px;
36
  box-sizing: border-box;
37
  cursor: pointer;
38
  -webkit-user-select: none;
39
  padding-right: 30px;
40
+ min-width: 450px;
41
+ max-width: 450px;
42
  }
43
  .btn-11 {
44
  overflow: hidden;
197
  z-index: 999;
198
  }
199
  .loader-section img {
200
+ /*max-width: 50px;*/
201
  }
202
  .site-header{left: 160px !important;}
203
  button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{background-color:#CCCCCC;color:#ffffff;}
565
  .onbrdpp-body p strong{color:#1e1e1e;}
566
  .onbrdpp-body h5{margin-bottom:15px;}
567
  .onbrdpp-body ul,.onbrdpp-body ol{padding:0;margin:0;}
568
+ .onbrdpp-body ul li, .onbrdpp-body ol li{font-size:14px;line-height:24px;margin-bottom:12px;}
569
  .onbrdpp-body ul li:last-child, .onbrdpp-body ol li:last-child{margin-bottom:0px;}
570
  .onbrdpp-body ol{padding-left:20px;}
571
  .onbrdpp-body ol li{padding-left:5px;}
654
  .hdrcntcbx{padding-left:15px;margin-left:15px;border-left:1px solid #C6C6C6;font-size:14px;line-height:22px;}
655
  .hdrcntcbx span{color:#0083FC;display:inline-block;}
656
  .hdrtpright{display:flex;padding:0 15px;max-width:33.333333%;flex:0 0 33.33333%;justify-content:flex-end;}
657
+ .hustleplanbtn .cvrs-btn{font-size:12px;padding:6px 12px; margin-left: 20px;}
658
  .hdrnotiwrp{display:flex;margin-left:22px;align-items:flex-start;}
659
  .notialrt{background-color:#FA424D;color:#ffffff;font-size:10px;line-height:12px;border-radius:30px;padding:2px 4px 2px;margin-left:-10px;}
660
 
1158
  #ee_plugin_form select{
1159
  min-width: 480px;
1160
  }
1161
+ #ee_plugin_form select.select-lsm{min-width: 170px; border-radius: 6px; padding: 1px 5px; margin: 0; display: inline-block;}
1162
  #ee_plugin_form select.select-sm { min-width: 80px; border-radius: 6px; padding: 1px 5px; margin: 0; display: inline-block;}
1163
+ table.tracking-trigger td{ padding: 0 0 0.5rem 1rem !important;}
1164
  #ee_plugin_form input[type="text"], #ee_plugin_form input[type="number"], .tracking-trigger .fromfiled{ min-width: 285px; height: 32px; margin-bottom: 5px;}
1165
  #ee_plugin_form .tracking-trigger input[type="text"].select-sm{min-width: 10px; max-width: 80px;}
1166
+ #ee_plugin_form table th{width: 35%;}
1167
+ #ee_plugin_form h4{color: #002BFC; opacity: 0.6;}
1168
  /**********PMax CSS ************/
1169
  .search-box { background: url('../images/search-icon.png');
1170
  background-repeat: no-repeat;
1356
  .pmax-campaign .cmp_urls .fromfiled{max-width: 500px;}
1357
  .pmax-campaign .cmp_urls .form-col-8 {width: 45%;}
1358
  /*.pmax-campaign .fromfiled.smtext{max-width: 200px;}*/
1359
+ .google-account-analytics .ga-title.con_faq_title{cursor: pointer; position: relative; background-color: #F1F1F1; padding: 10px 5px; margin-bottom: 10px;}
1360
  .google-account-analytics .ga-title.con_faq_title.active{ margin-bottom: 8px;}
1361
  .con_faq_title img.faq_icon{position: absolute; right: 10px; transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1362
  .con_faq_title.active img.faq_icon{transform: rotate(180deg); transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1363
+ .sec_con_integration {color: #000; margin-bottom: 10px; margin-left: 15px; opacity: 0; position: fixed; visibility: hidden; transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1364
  .sec_con_integration.active{ opacity: 1; position: relative; visibility: visible; transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1365
  .sec_con_integration .tvc-hide{transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
1366
+ .sec_con_integration .tvc-tooltip{position: relative; display: inline-block; width: auto; top: 0px;}
1367
  .sec_con_integration .tvc-tooltip .tvc-tooltiptext{line-height: 1.2; bottom: 6px; left: 125%; top: auto; min-width: 380px;}
1368
  .tvc-css-selector-sec .tvc-tooltip{top: -6px; right: 13px;}
1369
  .tracking-trigger th span{display: inline-block;}
1370
  .sec_con_integration th .tvc-tooltip{top: -7px; right: -3px;}
1371
  .tvc_ee_plugin_form .tvc-tooltip{position: relative; display: inline-block; width: auto;}
1372
  .tvc_ee_plugin_form .tvc-tooltip .tvc-tooltiptext{line-height: 1.2; bottom: 0px; left: 125%; top: auto; min-width: 380px; padding: 5px 8px;}
1373
+ .sec_con_integration label.align-middle{display: block;}
1374
 
1375
  .tvc-auto-product-sync-form .ga-title{position: relative;}
1376
  .tvc_ee_plugin_form .sec_con_integration.advance-setting .tvc-tooltip{top: inherit; float: inherit; right: inherit;}
1442
  border-bottom-width: 0px;
1443
  box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);
1444
  }
1445
+ .con-setting-container{border-bottom: 1px solid #dcdcde; margin:10px 15px;}
1446
+ .con-setting-container-last{margin:10px 15px;}
1447
+ .use_your_gtm_id input[type="text"]{display: inline-block; margin-top: 5px;}
1448
+ .use_your_gtm_id input[type="text"].tvc-hide{display: none;}
1449
+ .con_new_features{background-color: #f71a1a;
1450
+ padding: 0 2px;
1451
+ color: #fff;
1452
+ font-size: 13px;
1453
+ font-weight: 200;
1454
+ margin-left: 2px;
1455
+ vertical-align: top;
1456
+ margin-top: -5px;
1457
+ display: inline-block;}
admin/helper/class-onboarding-helper.php CHANGED
@@ -366,12 +366,8 @@ if(!class_exists('Conversios_Onboarding_Helper')):
366
  $settings['ga4_api_secret'] = isset($old_setting['ga4_api_secret'])?$old_setting['ga4_api_secret']:"";
367
  $settings['ga_CG'] = isset($old_setting['ga_CG'])?$old_setting['ga_CG']:"";
368
  $settings['ga_optimize_id'] = isset($old_setting['ga_optimize_id'])?$old_setting['ga_optimize_id']:"";
369
-
370
- /*$settings['tvc_conversion_tracking_type'] = isset($old_setting['tvc_conversion_tracking_type'])?$old_setting['tvc_conversion_tracking_type']:"";
371
- $settings['tvc_product_detail_conversion_tracking_type'] = isset($old_setting['tvc_product_detail_conversion_tracking_type'])?$old_setting['tvc_product_detail_conversion_tracking_type']:"";
372
- $settings['tvc_checkout_conversion_tracking_type'] = isset($old_setting['tvc_checkout_conversion_tracking_type'])?$old_setting['tvc_checkout_conversion_tracking_type']:"";*/
373
 
374
- $tracking_integration = array("tvc_product_list_data_collection_method", "tvc_product_detail_data_collection_method", "tvc_checkout_data_collection_method", "tvc_thankyou_data_collection_method", "tvc_product_detail_addtocart_selector", "tvc_product_detail_addtocart_selector_type", "tvc_product_detail_addtocart_selector_val", "tvc_checkout_step_2_selector", "tvc_checkout_step_2_selector_type", "tvc_checkout_step_2_selector_val", "tvc_checkout_step_3_selector", "tvc_checkout_step_3_selector_type", "tvc_checkout_step_3_selector_val");
375
  foreach($tracking_integration as $val){
376
  $settings[$val] = isset($old_setting[$val])?sanitize_text_field($old_setting[$val]):"";
377
  }
@@ -404,7 +400,19 @@ if(!class_exists('Conversios_Onboarding_Helper')):
404
  */
405
  if(property_exists($tvc_data,"g_mail") && sanitize_email($tvc_data->g_mail)){
406
  update_option('ee_customer_gmail', $tvc_data->g_mail);
 
 
 
 
 
 
 
 
 
 
 
407
  }
 
408
  $return_url = "admin.php?page=conversios-google-shopping-feed&tab=gaa_config_page";
409
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
410
  if( sanitize_text_field($googleDetail->google_merchant_center_id) != "" && sanitize_text_field($googleDetail->google_ads_id) != ""){
@@ -743,6 +751,14 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
743
  $return->status = $result->status;
744
  $return->data = $result->data;
745
  $return->error = false;
 
 
 
 
 
 
 
 
746
  return $return;
747
  }else{
748
  $return->error = true;
@@ -796,7 +812,15 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
796
  $response_message = wp_remote_retrieve_response_message($request);
797
  $response_body = json_decode(wp_remote_retrieve_body($request));
798
  if ((isset($response_body->error) && $response_body->error == '') || (!isset($response_body->error)) ) {
799
- return $response_body;
 
 
 
 
 
 
 
 
800
  } else {
801
  $return = new \stdClass();
802
  $return->error = true;
366
  $settings['ga4_api_secret'] = isset($old_setting['ga4_api_secret'])?$old_setting['ga4_api_secret']:"";
367
  $settings['ga_CG'] = isset($old_setting['ga_CG'])?$old_setting['ga_CG']:"";
368
  $settings['ga_optimize_id'] = isset($old_setting['ga_optimize_id'])?$old_setting['ga_optimize_id']:"";
 
 
 
 
369
 
370
+ $tracking_integration = array("tracking_method", "want_to_use_your_gtm", "use_your_gtm_id", "tvc_product_list_data_collection_method", "tvc_product_detail_data_collection_method", "tvc_checkout_data_collection_method", "tvc_thankyou_data_collection_method", "tvc_product_detail_addtocart_selector", "tvc_product_detail_addtocart_selector_type", "tvc_product_detail_addtocart_selector_val", "tvc_checkout_step_2_selector", "tvc_checkout_step_2_selector_type", "tvc_checkout_step_2_selector_val", "tvc_checkout_step_3_selector", "tvc_checkout_step_3_selector_type", "tvc_checkout_step_3_selector_val", "microsoft_ads_pixel_id", "twitter_ads_pixel_id", "pinterest_ads_pixel_id", "snapchat_ads_pixel_id", "tiKtok_ads_pixel_id");
371
  foreach($tracking_integration as $val){
372
  $settings[$val] = isset($old_setting[$val])?sanitize_text_field($old_setting[$val]):"";
373
  }
400
  */
401
  if(property_exists($tvc_data,"g_mail") && sanitize_email($tvc_data->g_mail)){
402
  update_option('ee_customer_gmail', $tvc_data->g_mail);
403
+ }
404
+ //is not work for existing user && $ee_additional_data['con_created_at'] != ""
405
+ if(isset($ee_additional_data['con_created_at'])){
406
+ $ee_additional_data = $TVC_Admin_Helper->get_ee_additional_data();
407
+ $ee_additional_data['con_updated_at'] = date('Y-m-d');
408
+ $TVC_Admin_Helper->set_ee_additional_data($ee_additional_data);
409
+ }else{
410
+ $ee_additional_data = $TVC_Admin_Helper->get_ee_additional_data();
411
+ $ee_additional_data['con_created_at'] = date('Y-m-d');
412
+ $ee_additional_data['con_updated_at'] = date('Y-m-d');
413
+ $TVC_Admin_Helper->set_ee_additional_data($ee_additional_data);
414
  }
415
+
416
  $return_url = "admin.php?page=conversios-google-shopping-feed&tab=gaa_config_page";
417
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
418
  if( sanitize_text_field($googleDetail->google_merchant_center_id) != "" && sanitize_text_field($googleDetail->google_ads_id) != ""){
751
  $return->status = $result->status;
752
  $return->data = $result->data;
753
  $return->error = false;
754
+ //admin notice when user created new google ads account.
755
+ $TVC_Admin_Helper = new TVC_Admin_Helper();
756
+ $link_title = "Create Performance max campaign now.";
757
+ $content = "Create your first Google Ads performance max campaign using the plugin and get $500 as free credits.";
758
+ $status = "1";
759
+ $link = "admin.php?page=conversios-pmax";
760
+ $created_google_ads_id = $result->data->adwords_id;
761
+ $TVC_Admin_Helper->tvc_add_admin_notice("created_googleads_account", $link_title, $content, $status, $link, $created_google_ads_id);
762
  return $return;
763
  }else{
764
  $return->error = true;
812
  $response_message = wp_remote_retrieve_response_message($request);
813
  $response_body = json_decode(wp_remote_retrieve_body($request));
814
  if ((isset($response_body->error) && $response_body->error == '') || (!isset($response_body->error)) ) {
815
+ //create merchant account admin notices
816
+ $TVC_Admin_Helper = new TVC_Admin_Helper();
817
+ $link_title = "Create Performance max campaign now.";
818
+ $content = "Create your first Google Ads performance max campaign using the plugin and get $500 as free credits.";
819
+ $status = "1";
820
+ $created_merchant_id = $response_body->account->id;
821
+ $link = "admin.php?page=conversios-pmax";
822
+ $TVC_Admin_Helper->tvc_add_admin_notice("created_merchant_account", $link_title, $content, $status, $link, $created_merchant_id);
823
+ return $response_body;
824
  } else {
825
  $return = new \stdClass();
826
  $return->error = true;
admin/images/bing_icon.png ADDED
Binary file
admin/images/fb-icon.png CHANGED
Binary file
admin/images/fevicon.gif ADDED
Binary file
admin/images/pinterest_icon.png ADDED
Binary file
admin/images/snapchat_icon.png ADDED
Binary file
admin/images/tiKtok_icon.png ADDED
Binary file
admin/images/twitter_icon.png ADDED
Binary file
admin/js/tvc-ee-custom.js CHANGED
@@ -75,7 +75,7 @@ var tvc_helper = {
75
  // Shopping and Google Ads Performance
76
  post_data['action']='get_google_ads_reports_chart';
77
  var v_this = this;
78
- $.ajax({
79
  type: "POST",
80
  dataType: "json",
81
  url: tvc_ajax_url,
@@ -99,7 +99,7 @@ var tvc_helper = {
99
  //Compaign Performance
100
  post_data['action']='get_google_ads_campaign_performance';
101
  var v_this = this;
102
- $.ajax({
103
  type: "POST",
104
  dataType: "json",
105
  url: tvc_ajax_url,
@@ -130,7 +130,7 @@ var tvc_helper = {
130
  var v_this = this;
131
  if(data != undefined && Object.keys(data).length > 0){
132
  var i=0;
133
- $.each(data, function (propKey, propValue) {
134
  if(i<5){
135
  //table_row = ''; table_row_last = '';
136
  status = (propValue['active'] == 1)?'active':'deactivate';
@@ -203,7 +203,7 @@ var tvc_helper = {
203
  if(data.hasOwnProperty('graph_type')){
204
  labels_key = data['graph_type'];
205
  }
206
- $.each(s_1_div_id, function (propKey, propValue) {
207
  if(data.hasOwnProperty(propValue['id'])){
208
  if(propValue['chart_id']!= undefined && propValue['is_chart'] != undefined && propValue['chart_type'] != undefined){
209
 
@@ -242,7 +242,7 @@ var tvc_helper = {
242
  var t_labels = "";
243
 
244
  //var d_backgroundColors = ['#FF6384','#22CFCF','#0ea50b','#FF9F40','#FFCD56']
245
- $.each(chart_data, function (key, value) {
246
  if(labels_key != "" && value.hasOwnProperty(labels_key)){
247
  t_labels =value[labels_key];
248
  }else{
@@ -327,7 +327,7 @@ var tvc_helper = {
327
  google_analytics_reports_call_api:function(post_data){
328
  var v_this = this;
329
  var g_mail = post_data.g_mail;
330
- $.ajax({
331
  type: "POST",
332
  dataType: "json",
333
  url: tvc_ajax_url,
@@ -469,7 +469,7 @@ var tvc_helper = {
469
  }
470
  if(Object.keys(s_1_div_id).length > 0){
471
  var temp_val =""; var temp_div_id = "";
472
- $.each(s_1_div_id, function (propKey, propValue) {
473
  if(basic_data.hasOwnProperty(propValue['id'])){
474
  temp_val = basic_data[propValue['id']];
475
  temp_div_id = "#s1_"+propValue['id']+" > .dash-smry-value";
@@ -492,7 +492,7 @@ var tvc_helper = {
492
  var table_row = '';
493
  var product_revenue_per = 0;
494
  if(p_p_r != undefined && Object.keys(p_p_r).length > 0){
495
- $.each(p_p_r, function (propKey, propValue) {
496
  table_row = '';
497
  if(ga_swatch == "ga3"){
498
  product_revenue_per = ((propValue['itemRevenue']*100)/basic_data.transactionRevenue).toFixed(1);
@@ -536,7 +536,7 @@ var tvc_helper = {
536
  //console.log(m_p_r);
537
  var table_row = '';
538
 
539
- $.each(m_p_r, function (propKey, propValue) {
540
  table_row = '';
541
  if(ga_swatch == "ga3"){
542
  table_row += '<tr><td class="prdnm-cell">'+((propValue["medium"]!=undefined)?propValue["medium"]:0)+'</td>';
@@ -810,12 +810,12 @@ var tvc_helper = {
810
  remove_loader_for_analytics_reports:function(){
811
  var reg_section = this.get_analytics_reports_section();
812
  if(Object.keys(reg_section).length > 0){
813
- $.each(reg_section, function (propKey, propValue) {
814
  if(propValue.hasOwnProperty('main-class') && propValue.hasOwnProperty('loading-type')){
815
  if(propValue['loading-type'] == 'bgcolor'){
816
  //jQuery("."+propValue['main-class']).addClass("is_loading");
817
  if(Object.keys(propValue['ajax_fields']).length > 0){
818
- $.each(propValue['ajax_fields'], function (propKey, propValue) {
819
  jQuery("."+propValue['class']).removeClass("loading-bg-effect");
820
  });
821
  }
@@ -851,7 +851,7 @@ var tvc_helper = {
851
  }
852
 
853
  if(Object.keys(chart_ids).length > 0){
854
- $.each(chart_ids, function (propKey, propValue) {
855
  var canvas = document.getElementById(propKey);
856
  if( canvas != null){
857
  var is_blank = v_this.is_canvas_blank(canvas);
@@ -866,12 +866,12 @@ var tvc_helper = {
866
  add_loader_for_analytics_reports:function(){
867
  var reg_section = this.get_analytics_reports_section();
868
  if(Object.keys(reg_section).length > 0){
869
- $.each(reg_section, function (propKey, propValue) {
870
  if(propValue.hasOwnProperty('main-class') && propValue.hasOwnProperty('loading-type')){
871
  if(propValue['loading-type'] == 'bgcolor'){
872
  //jQuery("."+propValue['main-class']).addClass("is_loading");
873
  if(Object.keys(propValue['ajax_fields']).length > 0){
874
- $.each(propValue['ajax_fields'], function (propKey, propValue) {
875
  jQuery("."+propValue['class']).addClass("loading-bg-effect");
876
  });
877
  }
75
  // Shopping and Google Ads Performance
76
  post_data['action']='get_google_ads_reports_chart';
77
  var v_this = this;
78
+ jQuery.ajax({
79
  type: "POST",
80
  dataType: "json",
81
  url: tvc_ajax_url,
99
  //Compaign Performance
100
  post_data['action']='get_google_ads_campaign_performance';
101
  var v_this = this;
102
+ jQuery.ajax({
103
  type: "POST",
104
  dataType: "json",
105
  url: tvc_ajax_url,
130
  var v_this = this;
131
  if(data != undefined && Object.keys(data).length > 0){
132
  var i=0;
133
+ jQuery.each(data, function (propKey, propValue) {
134
  if(i<5){
135
  //table_row = ''; table_row_last = '';
136
  status = (propValue['active'] == 1)?'active':'deactivate';
203
  if(data.hasOwnProperty('graph_type')){
204
  labels_key = data['graph_type'];
205
  }
206
+ jQuery.each(s_1_div_id, function (propKey, propValue) {
207
  if(data.hasOwnProperty(propValue['id'])){
208
  if(propValue['chart_id']!= undefined && propValue['is_chart'] != undefined && propValue['chart_type'] != undefined){
209
 
242
  var t_labels = "";
243
 
244
  //var d_backgroundColors = ['#FF6384','#22CFCF','#0ea50b','#FF9F40','#FFCD56']
245
+ jQuery.each(chart_data, function (key, value) {
246
  if(labels_key != "" && value.hasOwnProperty(labels_key)){
247
  t_labels =value[labels_key];
248
  }else{
327
  google_analytics_reports_call_api:function(post_data){
328
  var v_this = this;
329
  var g_mail = post_data.g_mail;
330
+ jQuery.ajax({
331
  type: "POST",
332
  dataType: "json",
333
  url: tvc_ajax_url,
469
  }
470
  if(Object.keys(s_1_div_id).length > 0){
471
  var temp_val =""; var temp_div_id = "";
472
+ jQuery.each(s_1_div_id, function (propKey, propValue) {
473
  if(basic_data.hasOwnProperty(propValue['id'])){
474
  temp_val = basic_data[propValue['id']];
475
  temp_div_id = "#s1_"+propValue['id']+" > .dash-smry-value";
492
  var table_row = '';
493
  var product_revenue_per = 0;
494
  if(p_p_r != undefined && Object.keys(p_p_r).length > 0){
495
+ jQuery.each(p_p_r, function (propKey, propValue) {
496
  table_row = '';
497
  if(ga_swatch == "ga3"){
498
  product_revenue_per = ((propValue['itemRevenue']*100)/basic_data.transactionRevenue).toFixed(1);
536
  //console.log(m_p_r);
537
  var table_row = '';
538
 
539
+ jQuery.each(m_p_r, function (propKey, propValue) {
540
  table_row = '';
541
  if(ga_swatch == "ga3"){
542
  table_row += '<tr><td class="prdnm-cell">'+((propValue["medium"]!=undefined)?propValue["medium"]:0)+'</td>';
810
  remove_loader_for_analytics_reports:function(){
811
  var reg_section = this.get_analytics_reports_section();
812
  if(Object.keys(reg_section).length > 0){
813
+ jQuery.each(reg_section, function (propKey, propValue) {
814
  if(propValue.hasOwnProperty('main-class') && propValue.hasOwnProperty('loading-type')){
815
  if(propValue['loading-type'] == 'bgcolor'){
816
  //jQuery("."+propValue['main-class']).addClass("is_loading");
817
  if(Object.keys(propValue['ajax_fields']).length > 0){
818
+ jQuery.each(propValue['ajax_fields'], function (propKey, propValue) {
819
  jQuery("."+propValue['class']).removeClass("loading-bg-effect");
820
  });
821
  }
851
  }
852
 
853
  if(Object.keys(chart_ids).length > 0){
854
+ jQuery.each(chart_ids, function (propKey, propValue) {
855
  var canvas = document.getElementById(propKey);
856
  if( canvas != null){
857
  var is_blank = v_this.is_canvas_blank(canvas);
866
  add_loader_for_analytics_reports:function(){
867
  var reg_section = this.get_analytics_reports_section();
868
  if(Object.keys(reg_section).length > 0){
869
+ jQuery.each(reg_section, function (propKey, propValue) {
870
  if(propValue.hasOwnProperty('main-class') && propValue.hasOwnProperty('loading-type')){
871
  if(propValue['loading-type'] == 'bgcolor'){
872
  //jQuery("."+propValue['main-class']).addClass("is_loading");
873
  if(Object.keys(propValue['ajax_fields']).length > 0){
874
+ jQuery.each(propValue['ajax_fields'], function (propKey, propValue) {
875
  jQuery("."+propValue['class']).addClass("loading-bg-effect");
876
  });
877
  }
admin/partials/class-conversios-header.php CHANGED
@@ -104,7 +104,7 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
104
  </div>
105
  </div>
106
  <div class="hdrtpright">
107
- <div class="hustleplanbtn">
108
  <a href="<?php echo esc_url_raw($this->site_url.'conversios-account'); ?>"><button class="cvrs-btn greenbtn"><?php echo esc_attr($plan_name); ?></button></a>
109
  </div>
110
  </div>
@@ -139,7 +139,7 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
139
  'acitve_icon'=>esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/active-conversios-menu.png")
140
  ),
141
  'conversios-google-analytics'=>array('title'=>esc_html__('Pixel Settings','enhanced-e-commerce-for-woocommerce-store')),
142
- 'conversios-google-shopping-feed'=>array('title'=>esc_html__('Product Sync','enhanced-e-commerce-for-woocommerce-store'), 'slug' =>'conversios-google-shopping-feed&tab=sync_product_page'),
143
  'conversios-pmax'=>array('title'=>esc_html__('Performance Max','enhanced-e-commerce-for-woocommerce-store'),
144
  'icon'=>esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/conversios-google-ads-menu.png"),
145
  'acitve_icon'=>esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/active-conversios-google-ads-menu.png")
@@ -194,9 +194,9 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
194
  <span class="navinfonavtext"><?php echo esc_attr($value['title']); ?></span>
195
  </a>
196
  <div class="con-dropdown-content">
197
- <a href="<?php echo esc_url_raw("admin.php?page=conversios-google-shopping-feed&tab=sync_product_page"); ?>">Product Sync</a>
198
- <a href="<?php echo esc_url_raw("admin.php?page=conversios-google-shopping-feed&tab=gaa_config_page"); ?>">Shopping Configuration</a>
199
- <a href="<?php echo esc_url_raw("admin.php?page=conversios-google-shopping-feed&tab=shopping_campaigns_page"); ?>">Smart Shopping Campaigns</a>
200
  </div>
201
  </div>
202
  </li>
104
  </div>
105
  </div>
106
  <div class="hdrtpright">
107
+ <div class="hustleplanbtn">
108
  <a href="<?php echo esc_url_raw($this->site_url.'conversios-account'); ?>"><button class="cvrs-btn greenbtn"><?php echo esc_attr($plan_name); ?></button></a>
109
  </div>
110
  </div>
139
  'acitve_icon'=>esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/active-conversios-menu.png")
140
  ),
141
  'conversios-google-analytics'=>array('title'=>esc_html__('Pixel Settings','enhanced-e-commerce-for-woocommerce-store')),
142
+ 'conversios-google-shopping-feed'=>array('title'=>esc_html__('Product Feed','enhanced-e-commerce-for-woocommerce-store'), 'slug' =>'conversios-google-shopping-feed&tab=sync_product_page'),
143
  'conversios-pmax'=>array('title'=>esc_html__('Performance Max','enhanced-e-commerce-for-woocommerce-store'),
144
  'icon'=>esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/conversios-google-ads-menu.png"),
145
  'acitve_icon'=>esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/active-conversios-google-ads-menu.png")
194
  <span class="navinfonavtext"><?php echo esc_attr($value['title']); ?></span>
195
  </a>
196
  <div class="con-dropdown-content">
197
+ <a href="<?php echo esc_url_raw("admin.php?page=conversios-google-shopping-feed&tab=sync_product_page"); ?>">Product Feed</a>
198
+ <a href="<?php echo esc_url_raw("admin.php?page=conversios-google-shopping-feed&tab=gaa_config_page"); ?>">Shopping Configuration</a>
199
+ <a href="<?php echo esc_url_raw("admin.php?page=conversios-google-shopping-feed&tab=shopping_campaigns_page"); ?>">Smart Shopping Campaigns</a>
200
  </div>
201
  </div>
202
  </li>
admin/partials/general-fields.php CHANGED
@@ -4,110 +4,125 @@ $TVC_Admin_Helper = new TVC_Admin_Helper();
4
  $this->customApiObj = new CustomApi();
5
  $class="";
6
  $message_p = "";
7
- if (isset($_POST['ee_submit_plugin'])) {
8
- $settings = $TVC_Admin_Helper->get_ee_options_settings();
9
- if(!empty(sanitize_text_field($_POST['ga_id']))){
10
- $settings['tracking_option'] = "UA";
11
- }
12
- if(!empty(sanitize_text_field($_POST['gm_id']))){
13
- $settings['tracking_option'] = "GA4";
14
- }
15
- if(!empty(sanitize_text_field($_POST['gm_id'])) && !empty(sanitize_text_field($_POST['ga_id']))){
16
- $settings['tracking_option'] = "BOTH";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }
18
- update_option('ads_tracking_id', sanitize_text_field($_POST['google_ads_id']));
19
-
20
- $settings['ga_eeT'] = isset($_POST["ga_eeT"])?sanitize_text_field($_POST["ga_eeT"]):"";
21
- //content grouping start
22
- $settings['ga_CG'] = isset($_POST["ga_CG"])?sanitize_text_field($_POST["ga_CG"]):"";
23
- $settings['ga_optimize_id'] = isset($_POST["ga_optimize_id"])?sanitize_text_field($_POST["ga_optimize_id"]):"";
24
- //content grouping end
25
- $settings['ga_ST'] = isset($_POST["ga_ST"])?sanitize_text_field($_POST["ga_ST"]):"";
26
- $settings['gm_id'] = isset($_POST["gm_id"])?sanitize_text_field($_POST["gm_id"]):"";
27
- $settings['ga_id'] = isset($_POST["ga_id"])?sanitize_text_field($_POST["ga_id"]):"";
28
- $settings['google_ads_id'] = isset($_POST["google_ads_id"])?sanitize_text_field($_POST["google_ads_id"]):"";
29
- $settings['google_merchant_id'] = isset($_POST["google_merchant_id"])?sanitize_text_field($_POST["google_merchant_id"]):"";
30
- $settings['ga_gUser'] = isset($_POST["ga_gUser"])?sanitize_text_field($_POST["ga_gUser"]):"";
31
- //$_POST['ga_gCkout'] = 'on';
32
- $settings['ga_Impr'] = isset($_POST["ga_Impr"])?sanitize_text_field($_POST["ga_Impr"]):"1";
33
- $settings['ga_IPA'] = isset($_POST["ga_IPA"])?sanitize_text_field($_POST["ga_IPA"]):"";
34
- //$settings['ga_OPTOUT'] = isset($_POST["ga_OPTOUT"])?sanitize_text_field($_POST["ga_OPTOUT"]):"";
35
- $settings['ga_PrivacyPolicy'] = isset($_POST["ga_PrivacyPolicy"])?sanitize_text_field($_POST["ga_PrivacyPolicy"]):"";
36
- $settings['google-analytic'] = '';
37
- $tracking_integration = array("tvc_product_list_data_collection_method", "tvc_product_detail_data_collection_method", "tvc_checkout_data_collection_method", "tvc_thankyou_data_collection_method", "tvc_product_detail_addtocart_selector", "tvc_product_detail_addtocart_selector_type", "tvc_product_detail_addtocart_selector_val", "tvc_checkout_step_2_selector", "tvc_checkout_step_2_selector_type", "tvc_checkout_step_2_selector_val", "tvc_checkout_step_3_selector", "tvc_checkout_step_3_selector_type", "tvc_checkout_step_3_selector_val");
38
- foreach($tracking_integration as $val){
39
- $settings[$val] = isset($_POST[$val])?sanitize_text_field($_POST[$val]):"";
40
  }
41
-
42
- $settings['fb_pixel_id'] = isset($_POST["fb_pixel_id"])?sanitize_text_field($_POST["fb_pixel_id"]):"";
43
- $settings['ga4_api_secret'] = isset($_POST["ga4_api_secret"])?sanitize_text_field($_POST["ga4_api_secret"]):"";
44
-
45
- $TVC_Admin_Helper->save_ee_options_settings($settings);
46
- $TVC_Admin_Helper->update_app_status();
47
- //google ads start
48
- $response = $this->customApiObj->updateTrackingOption($_POST);
49
- $googleDetail = $this->google_detail;
50
- $googleDetail_setting = $this->google_detail['setting'];
51
- if(isset($_POST['remarketing_tags'])){
52
- update_option('ads_ert', sanitize_text_field($_POST['remarketing_tags']) );
53
- $googleDetail_setting->remarketing_tags = sanitize_text_field($_POST['remarketing_tags']);
54
  }else{
55
- update_option('ads_ert', 0);
56
- $googleDetail_setting->remarketing_tags = 0;
57
  }
58
- if(isset($_POST['dynamic_remarketing_tags'])){
59
- update_option('ads_edrt', sanitize_text_field($_POST['dynamic_remarketing_tags']) );
60
- $googleDetail_setting->dynamic_remarketing_tags = sanitize_text_field($_POST['dynamic_remarketing_tags']);
61
  }else{
62
- update_option('ads_edrt', 0);
63
- $googleDetail_setting->dynamic_remarketing_tags = 0;
64
  }
65
- if($this->plan_id != 1){
66
- if(isset($_POST['google_ads_conversion_tracking'])){
67
- update_option('google_ads_conversion_tracking', sanitize_text_field($_POST['google_ads_conversion_tracking']) );
68
- $googleDetail_setting->google_ads_conversion_tracking = sanitize_text_field($_POST['google_ads_conversion_tracking']);
69
- }else{
70
- update_option('google_ads_conversion_tracking', 0);
71
- $googleDetail_setting->google_ads_conversion_tracking = 0;
72
- }
73
- if(isset($_POST['ga_EC'])){
74
- update_option('ga_EC', sanitize_text_field($_POST['ga_EC']) );
75
- }else{
76
- update_option('ga_EC', 0);
77
- }
78
- if(isset($_POST['ee_conversio_send_to'])){
79
- update_option('ee_conversio_send_to', sanitize_text_field($_POST['ee_conversio_send_to']) );
80
- $googleDetail_setting->ee_conversio_send_to = sanitize_text_field($_POST['ee_conversio_send_to']);
81
- }
82
  }
83
- if(isset($_POST['link_google_analytics_with_google_ads'])){
84
- $googleDetail_setting->link_google_analytics_with_google_ads = sanitize_text_field($_POST['link_google_analytics_with_google_ads']);
85
- }else{
86
- $googleDetail_setting->link_google_analytics_with_google_ads = 0;
87
- }
88
- $googleDetail['setting'] = $googleDetail_setting;
89
- $TVC_Admin_Helper->set_ee_options_data($googleDetail);
90
- //google ads end
91
-
92
- $class='alert-message tvc-alert-success';
93
- $message_p = esc_html__( 'Your settings have been saved.', 'enhanced-e-commerce-for-woocommerce-store' );
 
 
 
94
  }
95
  $data = unserialize(get_option('ee_options'));
96
  $this->current_customer_id = $TVC_Admin_Helper->get_currentCustomerId();
97
  $subscription_id = $TVC_Admin_Helper->get_subscriptionId();
98
  $TVC_Admin_Helper->add_spinner_html();
99
- $google_detail = $TVC_Admin_Helper->get_ee_options_data();
100
- $googleDetail = "";
101
- $plan_id = 1;
102
- if(isset($google_detail['setting'])){
103
- $googleDetail = $google_detail['setting'];
104
- if(isset($googleDetail->plan_id) && !in_array($googleDetail->plan_id, array("1"))){
105
- $plan_id = $googleDetail->plan_id;
106
- }
107
- }
108
  ?>
109
  <div class="tab-content">
110
- <?php if($message_p){
 
 
 
 
 
 
 
 
 
111
  printf('<div class="%1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message_p));
112
  }?>
113
  <div class="tab-pane show active" id="googleShoppingFeed">
@@ -126,216 +141,485 @@ if(isset($google_detail['setting'])){
126
  <button type="submit" class="btn btn-primary" name="verify-licence-key"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/right-arrow.svg'); ?>" alt="active licence key"></button>
127
  </div>
128
  </div>
129
- </form>
130
-
131
  </div>
132
  </div>
133
- <?php }?>
134
- <div class="row mb-3">
135
- <div class="col-6 col-md-6 col-lg-6">
136
- <h2 class="ga-title"><?php esc_html_e("Connected Google Analytics Account:","enhanced-e-commerce-for-woocommerce-store"); ?></h2>
137
- </div>
138
- <div class="col-6 col-md-6 col-lg-6 text-right">
139
- <div class="acc-num">
140
- <p class="ga-text">
141
- <?php echo (isset($data['ga_id']) && $data['ga_id'] != '') ? $data['ga_id'] : '<span>'.esc_html__("Get started","enhanced-e-commerce-for-woocommerce-store").'</span>'; ?>
142
- </p>
143
- <?php
144
- if (isset($data['ga_id']) && $data['ga_id'] != '') {
145
- echo '<p class="ga-text text-right"><a href="' . esc_url_raw($this->url) . '" class="text-underline"><img src="'.esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
146
- } else {
147
- echo '<p class="ga-text text-right"><a href="' . esc_url_raw($this->url) . '" class="text-underline"><img src="'. esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }?>
149
- </div>
150
- </div>
151
- </div>
152
- <div class="row mb-3">
153
- <div class="col-6 col-md-6 col-lg-6">
154
- <h2 class="ga-title"><?php esc_html_e("Connected Google Analytics 4 Account:","enhanced-e-commerce-for-woocommerce-store"); ?></h2>
155
- </div>
156
- <div class="col-6 col-md-6 col-lg-6 text-right">
 
 
 
 
 
 
 
 
157
  <div class="acc-num">
158
  <p class="ga-text">
159
- <?php echo (isset($data['gm_id']) && $data['gm_id'] != '') ? esc_attr($data['gm_id']) : '<span>'.esc_html__("Get started","enhanced-e-commerce-for-woocommerce-store").'</span>'; ?>
160
  </p>
161
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  if (isset($data['gm_id']) && esc_attr($data['gm_id']) != '') {
163
  echo '<p class="ga-text text-right"><a href="' . esc_url_raw($this->url) . '" class="text-underline"><img src="'. esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
164
  } else {
165
  echo '<p class="ga-text text-right"><a href="' . esc_url_raw($this->url) . '" class="text-underline"><img src="'. esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
166
  }?>
167
  </div>
168
- </div>
169
- </div>
170
- <form id="ee_plugin_form" class="tvc_ee_plugin_form" name="google-analytic-setting-form" method="post" >
171
- <div class="ga-title con_tracking_integration con_faq_title" data-id="sec_con_integration_advset">
172
- <?php esc_html_e("Advance Setting","enhanced-e-commerce-for-woocommerce-store"); ?>
173
- <div class="tvc-tooltip">
174
- <span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e(" Advance Setting.","enhanced-e-commerce-for-woocommerce-store"); ?></span>
175
- <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
176
- </div>
177
- <img class="faq_icon" style="height: 20px;" src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/arrow-down-sign.png"); ?>" >
178
- </div>
179
- <div class="sec_con_integration advance-setting" id="sec_con_integration_advset">
180
- <table class="table">
181
- <tbody>
182
- <tr>
183
- <th width="155px">
184
- <label class="ga-title align-middle" for="tracking_code"><?php esc_html_e("Tracking Code","enhanced-e-commerce-for-woocommerce-store"); ?></label>
185
- </th>
186
- <td>
187
- <label class="align-middle">
188
- <?php $ga_ST = !empty($data['ga_ST']) ? 'checked' : ''; ?>
189
- <input type="checkbox" name="ga_ST" id="ga_ST" <?php echo esc_attr($ga_ST); ?> >
190
- <label class="custom-control-label" for="ga_ST"><?php esc_html_e("Add Global Site Tracking Code 'gtag.js'","enhanced-e-commerce-for-woocommerce-store"); ?></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  <div class="tvc-tooltip">
192
- <span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("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.","enhanced-e-commerce-for-woocommerce-store"); ?></span>
193
  <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
194
  </div>
195
- </label><br/>
196
- <label class="align-middle">
197
- <?php $ga_eeT = !empty($data['ga_eeT']) ? 'checked' : ''; ?>
198
- <input type="checkbox" name="ga_eeT" id="ga_eeT" <?php echo esc_attr($ga_eeT); ?> >
199
- <label class="custom-control-label" for="ga_eeT"><?php esc_html_e("Add Enhanced Ecommerce Tracking Code","enhanced-e-commerce-for-woocommerce-store"); ?></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  <div class="tvc-tooltip">
201
- <span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("This feature adds Enhanced Ecommerce Tracking Code to your Store.","enhanced-e-commerce-for-woocommerce-store"); ?></span>
202
  <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
203
  </div>
204
- </label><br/>
205
- <label class="align-middle">
206
- <?php $ga_gUser = !empty($data['ga_gUser']) ? 'checked' : ''; ?>
207
- <input type="checkbox" name="ga_gUser" id="ga_gUser" <?php echo esc_attr($ga_gUser); ?> >
208
- <label class="custom-control-label" for="ga_gUser"><?php esc_html_e("Add Code to Track the Login Step of Guest Users (Optional)","enhanced-e-commerce-for-woocommerce-store"); ?></label>
 
 
 
 
 
209
  <div class="tvc-tooltip">
210
- <span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("If you have Guest Check out enable, we recommend you to add this code.","enhanced-e-commerce-for-woocommerce-store"); ?></span>
211
  <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
212
- </div>
213
- </label>
214
- </td>
215
- </tr>
216
- <?php if(isset($data['gm_id']) && $data['gm_id'] != '' && $plan_id != 1){ ?>
217
- <tr>
218
- <th>
219
- <label class="ga-title align-middle"><?php esc_html_e("GA4 - API secrets ","enhanced-e-commerce-for-woocommerce-store"); ?><span class="tvc-pro"> (PRO)</span></label>
220
- </th>
221
- <td>
222
- <?php $ga4_api_secret = isset($data['ga4_api_secret'])?$data['ga4_api_secret']:""; ?>
223
- <input type="text" class="fromfiled" name="ga4_api_secret" id="ga4_api_secret" value="<?php echo esc_attr($ga4_api_secret); ?>">
224
- <div class="tvc-tooltip">
225
- <span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("How to get 'Measurement Protocol API Secret' in GA4: Click Admin > Click Data streams (Under Property) > Select the stream > Additional Settings - Measurement Protocol API secrets > Create a new API secret.","enhanced-e-commerce-for-woocommerce-store"); ?></span>
226
- <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
227
- </div>
228
- <br>To track refund order
229
- </td>
230
- </tr>
231
- <?php } ?>
232
- <tr>
233
- <th>
234
- <label class="ga-title align-middle" for= "ga_CG" ><?php esc_html_e("Content Grouping","enhanced-e-commerce-for-woocommerce-store"); ?> <span class="tvc-pro"> (PRO)</span></label>
235
- </th>
236
- <td>
237
- <label class="align-middle">
238
- <?php $ga_CG = (!empty($data['ga_CG'])) ? 'checked' : '';
239
- if($plan_id==1){ $ga_CG ="";}?>
240
- <input type="checkbox" name="ga_CG" id="ga_CG" <?php if($plan_id==1){?> onclick="return false;"<?php } ?> <?php echo esc_attr($ga_CG);?> >
241
- <label class="custom-control-label" for="ga_CG"><?php esc_html_e("Add Code to enable content grouping","enhanced-e-commerce-for-woocommerce-store"); ?></label>
242
- <div class="tvc-tooltip">
243
- <span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("Content grouping helps you group your web pages (content).","enhanced-e-commerce-for-woocommerce-store"); ?></span>
244
- <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
245
- </div>
246
- </label>
247
- </td>
248
- </tr>
249
- <tr>
250
- <th>
251
- <label class="ga-title align-middle" for= "ga_optimize" ><?php esc_html_e("Google Optimize","enhanced-e-commerce-for-woocommerce-store"); ?> <span class="tvc-pro"> (PRO)</span></label>
252
- </th>
253
- <td>
254
- <?php
255
- if($plan_id==1){?>
256
- <input type="text" name="ga_optimize_id" id="ga_optimize_id" value = "<?php echo !empty($data['ga_optimize_id']) ? esc_attr($data['ga_optimize_id']) : '';?>" placeholder="<?php esc_html_e("Google Optimize ID","enhanced-e-commerce-for-woocommerce-store"); ?>" disabled>
257
- <?php }else{ ?>
258
- <input type="text" name="ga_optimize_id" id="ga_optimize_id" value = "<?php echo !empty($data['ga_optimize_id']) ? esc_attr($data['ga_optimize_id']) : '';?>" placeholder="<?php esc_html_e("Google Optimize ID","enhanced-e-commerce-for-woocommerce-store"); ?>">
259
- <?php } ?>
260
- <div class="tvc-tooltip">
261
- <span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("Enter a valid google optimize container ID.","enhanced-e-commerce-for-woocommerce-store"); ?></span>
262
- <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
263
- </div>
264
-
265
- </td>
266
- </tr>
267
- <tr>
268
- <th>
269
- <label class="ga-title align-middle" for="ga_Impr"><?php esc_html_e("Impression Thresold","enhanced-e-commerce-for-woocommerce-store"); ?></label>
270
- </th>
271
- <td>
272
- <?php $ga_Impr = !empty($data['ga_Impr']) ? $data['ga_Impr'] : 6; ?>
273
- <input type="number" min="1" id="ga_Impr" name = "ga_Impr" value = "<?php echo esc_attr($ga_Impr); ?>">
274
- <label for="ga_Impr"></label>
275
- <div class="tvc-tooltip">
276
- <span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("This feature sets Impression threshold for category page. It sends hit after these many numbers of products impressions.","enhanced-e-commerce-for-woocommerce-store"); ?></span>
277
- <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
278
- </div>
279
- <p class="description"><b><?php esc_html_e("Note : To avoid processing load on server we recommend upto 6 Impression Thresold.","enhanced-e-commerce-for-woocommerce-store"); ?></b></p>
280
- </td>
281
- </tr>
282
- <tr>
283
- <th>
284
- <label class="ga-title align-middle" for="ga_IPA"><?php esc_html_e("I.P. Anoymization","enhanced-e-commerce-for-woocommerce-store"); ?></label>
285
- </th>
286
- <td>
287
- <label class="align-middle">
288
- <?php $ga_IPA = !empty($data['ga_IPA']) ? 'checked' : ''; ?>
289
- <input class="" type="checkbox" name="ga_IPA" id="ga_IPA" <?php echo esc_attr($ga_IPA); ?>>
290
- <label class="custom-control-label" for="ga_IPA"><?php esc_html_e("Enable I.P. Anonymization","enhanced-e-commerce-for-woocommerce-store"); ?></label>
291
  <div class="tvc-tooltip">
292
- <span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("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.","enhanced-e-commerce-for-woocommerce-store"); ?></span>
293
  <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
294
  </div>
295
- </label>
296
- </td>
297
- </tr>
298
- </tbody>
299
- </table>
300
- </div>
301
- <br />
302
- <div class="ga-title con_tracking_integration con_faq_title" data-id="sec_con_integration">
303
- <?php esc_html_e("Google Analytics Event Tracking - Custom Integration","enhanced-e-commerce-for-woocommerce-store"); ?>
304
- <div class="tvc-tooltip">