Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 4.6.5

Version Description

  • 16/02/2022 =
  • Fix - Fixed :- Onboarding loading issue for some users.
Download this release

Release Info

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

Code changes from version 4.6.4 to 4.6.5

admin/class-conversios-onboarding.php CHANGED
@@ -738,7 +738,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
738
  * Convesios custom script
739
  */
740
  //Step-0
741
- $(".google_connect_url").on( "click", function() {
742
  const w =600; const h=650;
743
  const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
744
  const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;
@@ -761,39 +761,39 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
761
  });
762
 
763
  //Step-1
764
- $(document).ready(function() {
765
- let tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
766
  if(tracking_option != ""){
767
  if(subscription_id != ""){
768
  call_list_analytics_web_properties(tracking_option, tvc_data);
769
  }
770
- $(".slctunivr-filed").slideUp();
771
- $("#"+tracking_option).slideDown();
772
  //is_validate_step("step_1");
773
  }
774
  var ua_page =2;
775
  var ga4_page =2;
776
- $('.tvc-ua-option-more').click(function(event){
777
- //let tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
778
  call_list_analytics_web_properties("UA", tvc_data, ua_page);
779
  ua_page++;
780
  event.stopPropagation();
781
  })
782
- $('.tvc-ga4-option-more').click(function(event){
783
- //let tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
784
  call_list_analytics_web_properties("GA4", tvc_data, ga4_page);
785
  ga4_page++;
786
  event.stopPropagation();
787
  })
788
 
789
- $("input[type=radio][name=analytic_tag_type]").on( "change", function() {
790
  let tracking_option = this.value;
791
  if(subscription_id != ""){
792
  call_list_analytics_web_properties(tracking_option, tvc_data);
793
  is_validate_step("step_1");
794
  }
795
- $(".slctunivr-filed").slideUp();
796
- $("#"+tracking_option).slideDown();
797
  });
798
  });
799
  if(subscription_id != ""){
@@ -803,24 +803,24 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
803
 
804
  //Step-2
805
  // create google ads account
806
- $("#ads-continue").on('click', function(e){
807
  e.preventDefault();
808
  create_google_ads_account(tvc_data);
809
- $('.ggladspp').removeClass('showpopup');
810
  });
811
  // skip google ads account selection
812
- $("#ads-skip-continue").on('click', function(e){
813
  e.preventDefault();
814
  save_google_ads_data("", tvc_data, subscription_id, true );
815
- go_next($("#step_2"));
816
  });
817
  //Step - 3
818
- $("#create_merchant_account").on('click', function(e){
819
  e.preventDefault();
820
  create_google_merchant_center_account(tvc_data);
821
  });
822
  //Click skip merchant center account on popup
823
- $("#merchant-center-skip-continue").on('click', function(e){
824
  e.preventDefault();
825
  if(is_validate_step("step_1")){
826
  save_merchant_data("", "", tvc_data, subscription_id, plan_id, true );
@@ -829,17 +829,17 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
829
  }
830
  })
831
  //Click finish button
832
- $("#step_3").on('click', function(e){
833
  e.preventDefault();
834
- let google_merchant_center_id = $("#new_merchant_id").text();
835
  let merchant_id = "NewMerchant";
836
  if( google_merchant_center_id == null || google_merchant_center_id =="" ){
837
- google_merchant_center_id = $('#google_merchant_center_id').val();
838
- merchant_id =$("#google_merchant_center_id").find(':selected').data('merchant_id');
839
  }
840
  if( google_merchant_center_id == null || google_merchant_center_id == "" ){
841
- $('#tvc_merchant_center_skip_confirm').addClass('showpopup');
842
- $('body').addClass('scrlnone');
843
  }else{
844
  if(is_validate_step("step_1")){
845
  save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, false );
@@ -849,17 +849,17 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
849
  }
850
  })
851
  //Click confirm button on confirm popup
852
- $('#confirm_selection').on('click', function(e){
853
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
854
- var tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
855
  var view_id = "";
856
  add_message("warning","Processing... Do not refresh.",false);
857
  if(tracking_option == "UA"){
858
- ga_view_id = $("#ua_web_property_id").find(':selected').data('profileid');
859
  }else{
860
- ga_view_id = $("#both_web_property_id").find(':selected').data('profileid');
861
  }
862
- $.ajax({
863
  type: "POST",
864
  dataType: "json",
865
  url: tvc_ajax_url,
@@ -885,16 +885,16 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
885
  /**
886
  * Convesios defoult html script
887
  */
888
- $(document).ready(function() {
889
- $( ".stepdtltop" ).each(function() {
890
- $(this).on("click", function(){
891
  if(subscription_id != ""){
892
- if($(this).attr("data-is-done") == "1"){
893
- if($(this).parent('.onbordording-step').hasClass("activestep")){
894
- $(this).parent('.onbordording-step').removeClass('activestep');
895
  }else{
896
- $('.onbordording-step').removeClass('activestep');
897
- $(this).parent('.onbordording-step').addClass('activestep');
898
  }
899
  }
900
  }else{
@@ -903,13 +903,13 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
903
  });
904
  });
905
 
906
- $( ".stpnxttrgr" ).each(function() {
907
- $(this).on("click", function(event){
908
- var step =$(this).attr("id");
909
  //step 1 next button call
910
  if(step == "step_1"){
911
  if(is_validate_step(step)){
912
- let tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
913
  save_analytics_web_properties( tracking_option, tvc_data, subscription_id );
914
  go_next(this);
915
  call_list_google_merchant_account(tvc_data);
@@ -918,9 +918,9 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
918
  //step 2 next button call
919
  if(step == "step_2" ){
920
  //event.preventDefault();
921
- let google_ads_id = $("#new_google_ads_id").text();
922
  if(google_ads_id ==null || google_ads_id ==""){
923
- google_ads_id = $('#ads-account').val();
924
  }
925
  let tr_ads = save_google_ads_data(google_ads_id, tvc_data, subscription_id, false );
926
  if(tr_ads){
@@ -932,62 +932,62 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
932
  });
933
 
934
  });
935
- $('.slctunivr-filed').slideUp();
936
  //
937
 
938
  function go_next(next_this){
939
- $(next_this).closest('.onbordording-step').find('.stepdtltop').attr("data-is-done","1");
940
- $(next_this).closest('.onbordording-step').addClass('selectedactivestep');
941
- $(next_this).closest('.onbordording-step').removeClass('activestep');
942
- $( next_this ).closest('.onbordording-step').next('.onbordording-step').addClass('activestep');
943
  }
944
  </script>
945
  <script>
946
- $(document).ready(function(){
947
- $(".slect2bx").select2();
948
  });
949
  </script>
950
  <!-- popup script -->
951
  <script>
952
- $(document).ready(function() {
953
  //open now google ads account popup
954
- $(".newggladsbtn").on( "click", function() {
955
- $('.ggladspp').addClass('showpopup');
956
- $('body').addClass('scrlnone');
957
  });
958
 
959
  //close any poup whie click on out side
960
- $('body').click(function(evt){
961
- if($(evt.target).closest('#step_2,.cretnewbtn,.finishbtn,.onbrdnpp-cntner, .crtemrchntpp .onbrdppmain').length)
962
  return;
963
- $('.onbrd-popupwrp').removeClass('showpopup');
964
- $('body').removeClass('scrlnone');
965
  });
966
  });
967
- $(".clsbtntrgr, .ppblubtn").on( "click", function() {
968
- $(this).closest('.onbrd-popupwrp').removeClass('showpopup');
969
- $('body').removeClass('scrlnone');
970
  });
971
  /*
972
- $(".sndinvitebtn").on( "click", function() {
973
 
974
- //$('.acccretpp').addClass('showpopup');
975
- //$('body').addClass('scrlnone');
976
  });
977
- $(".finishbtn").on( "click", function() {
978
- $('.congratepp').addClass('showpopup');
979
- $('body').addClass('scrlnone');
980
- $('.alertbx').removeClass('show');
981
  });*/
982
- $(".newmrchntbtn").on( "click", function() {
983
- $('.crtemrchntpp').addClass('showpopup');
984
- $('body').addClass('scrlnone');
985
  });
986
- /*$(".cretemrchntbtn").on( "click", function() {
987
- $('.mrchntalert').addClass('show');
988
  });
989
- $(".alertclsbtn").on( "click", function() {
990
- $(this).parent('.alertbx').removeClass('show');
991
  });*/
992
  </script>
993
  <?php
738
  * Convesios custom script
739
  */
740
  //Step-0
741
+ jQuery(".google_connect_url").on( "click", function() {
742
  const w =600; const h=650;
743
  const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
744
  const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;
761
  });
762
 
763
  //Step-1
764
+ jQuery(document).ready(function() {
765
+ let tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
766
  if(tracking_option != ""){
767
  if(subscription_id != ""){
768
  call_list_analytics_web_properties(tracking_option, tvc_data);
769
  }
770
+ jQuery(".slctunivr-filed").slideUp();
771
+ jQuery("#"+tracking_option).slideDown();
772
  //is_validate_step("step_1");
773
  }
774
  var ua_page =2;
775
  var ga4_page =2;
776
+ jQuery('.tvc-ua-option-more').click(function(event){
777
+ //let tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
778
  call_list_analytics_web_properties("UA", tvc_data, ua_page);
779
  ua_page++;
780
  event.stopPropagation();
781
  })
782
+ jQuery('.tvc-ga4-option-more').click(function(event){
783
+ //let tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
784
  call_list_analytics_web_properties("GA4", tvc_data, ga4_page);
785
  ga4_page++;
786
  event.stopPropagation();
787
  })
788
 
789
+ jQuery("input[type=radio][name=analytic_tag_type]").on( "change", function() {
790
  let tracking_option = this.value;
791
  if(subscription_id != ""){
792
  call_list_analytics_web_properties(tracking_option, tvc_data);
793
  is_validate_step("step_1");
794
  }
795
+ jQuery(".slctunivr-filed").slideUp();
796
+ jQuery("#"+tracking_option).slideDown();
797
  });
798
  });
799
  if(subscription_id != ""){
803
 
804
  //Step-2
805
  // create google ads account
806
+ jQuery("#ads-continue").on('click', function(e){
807
  e.preventDefault();
808
  create_google_ads_account(tvc_data);
809
+ jQuery('.ggladspp').removeClass('showpopup');
810
  });
811
  // skip google ads account selection
812
+ jQuery("#ads-skip-continue").on('click', function(e){
813
  e.preventDefault();
814
  save_google_ads_data("", tvc_data, subscription_id, true );
815
+ go_next(jQuery("#step_2"));
816
  });
817
  //Step - 3
818
+ jQuery("#create_merchant_account").on('click', function(e){
819
  e.preventDefault();
820
  create_google_merchant_center_account(tvc_data);
821
  });
822
  //Click skip merchant center account on popup
823
+ jQuery("#merchant-center-skip-continue").on('click', function(e){
824
  e.preventDefault();
825
  if(is_validate_step("step_1")){
826
  save_merchant_data("", "", tvc_data, subscription_id, plan_id, true );
829
  }
830
  })
831
  //Click finish button
832
+ jQuery("#step_3").on('click', function(e){
833
  e.preventDefault();
834
+ let google_merchant_center_id = jQuery("#new_merchant_id").text();
835
  let merchant_id = "NewMerchant";
836
  if( google_merchant_center_id == null || google_merchant_center_id =="" ){
837
+ google_merchant_center_id = jQuery('#google_merchant_center_id').val();
838
+ merchant_id =jQuery("#google_merchant_center_id").find(':selected').data('merchant_id');
839
  }
840
  if( google_merchant_center_id == null || google_merchant_center_id == "" ){
841
+ jQuery('#tvc_merchant_center_skip_confirm').addClass('showpopup');
842
+ jQuery('body').addClass('scrlnone');
843
  }else{
844
  if(is_validate_step("step_1")){
845
  save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, false );
849
  }
850
  })
851
  //Click confirm button on confirm popup
852
+ jQuery('#confirm_selection').on('click', function(e){
853
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
854
+ var tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
855
  var view_id = "";
856
  add_message("warning","Processing... Do not refresh.",false);
857
  if(tracking_option == "UA"){
858
+ ga_view_id = jQuery("#ua_web_property_id").find(':selected').data('profileid');
859
  }else{
860
+ ga_view_id = jQuery("#both_web_property_id").find(':selected').data('profileid');
861
  }
862
+ jQuery.ajax({
863
  type: "POST",
864
  dataType: "json",
865
  url: tvc_ajax_url,
885
  /**
886
  * Convesios defoult html script
887
  */
888
+ jQuery(document).ready(function() {
889
+ jQuery( ".stepdtltop" ).each(function() {
890
+ jQuery(this).on("click", function(){
891
  if(subscription_id != ""){
892
+ if(jQuery(this).attr("data-is-done") == "1"){
893
+ if(jQuery(this).parent('.onbordording-step').hasClass("activestep")){
894
+ jQuery(this).parent('.onbordording-step').removeClass('activestep');
895
  }else{
896
+ jQuery('.onbordording-step').removeClass('activestep');
897
+ jQuery(this).parent('.onbordording-step').addClass('activestep');
898
  }
899
  }
900
  }else{
903
  });
904
  });
905
 
906
+ jQuery( ".stpnxttrgr" ).each(function() {
907
+ jQuery(this).on("click", function(event){
908
+ var step =jQuery(this).attr("id");
909
  //step 1 next button call
910
  if(step == "step_1"){
911
  if(is_validate_step(step)){
912
+ let tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
913
  save_analytics_web_properties( tracking_option, tvc_data, subscription_id );
914
  go_next(this);
915
  call_list_google_merchant_account(tvc_data);
918
  //step 2 next button call
919
  if(step == "step_2" ){
920
  //event.preventDefault();
921
+ let google_ads_id = jQuery("#new_google_ads_id").text();
922
  if(google_ads_id ==null || google_ads_id ==""){
923
+ google_ads_id = jQuery('#ads-account').val();
924
  }
925
  let tr_ads = save_google_ads_data(google_ads_id, tvc_data, subscription_id, false );
926
  if(tr_ads){
932
  });
933
 
934
  });
935
+ jQuery('.slctunivr-filed').slideUp();
936
  //
937
 
938
  function go_next(next_this){
939
+ jQuery(next_this).closest('.onbordording-step').find('.stepdtltop').attr("data-is-done","1");
940
+ jQuery(next_this).closest('.onbordording-step').addClass('selectedactivestep');
941
+ jQuery(next_this).closest('.onbordording-step').removeClass('activestep');
942
+ jQuery( next_this ).closest('.onbordording-step').next('.onbordording-step').addClass('activestep');
943
  }
944
  </script>
945
  <script>
946
+ jQuery(document).ready(function(){
947
+ jQuery(".slect2bx").select2();
948
  });
949
  </script>
950
  <!-- popup script -->
951
  <script>
952
+ jQuery(document).ready(function() {
953
  //open now google ads account popup
954
+ jQuery(".newggladsbtn").on( "click", function() {
955
+ jQuery('.ggladspp').addClass('showpopup');
956
+ jQuery('body').addClass('scrlnone');
957
  });
958
 
959
  //close any poup whie click on out side
960
+ jQuery('body').click(function(evt){
961
+ if(jQuery(evt.target).closest('#step_2,.cretnewbtn,.finishbtn,.onbrdnpp-cntner, .crtemrchntpp .onbrdppmain').length)
962
  return;
963
+ jQuery('.onbrd-popupwrp').removeClass('showpopup');
964
+ jQuery('body').removeClass('scrlnone');
965
  });
966
  });
967
+ jQuery(".clsbtntrgr, .ppblubtn").on( "click", function() {
968
+ jQuery(this).closest('.onbrd-popupwrp').removeClass('showpopup');
969
+ jQuery('body').removeClass('scrlnone');
970
  });
971
  /*
972
+ jQuery(".sndinvitebtn").on( "click", function() {
973
 
974
+ //jQuery('.acccretpp').addClass('showpopup');
975
+ //jQuery('body').addClass('scrlnone');
976
  });
977
+ jQuery(".finishbtn").on( "click", function() {
978
+ jQuery('.congratepp').addClass('showpopup');
979
+ jQuery('body').addClass('scrlnone');
980
+ jQuery('.alertbx').removeClass('show');
981
  });*/
982
+ jQuery(".newmrchntbtn").on( "click", function() {
983
+ jQuery('.crtemrchntpp').addClass('showpopup');
984
+ jQuery('body').addClass('scrlnone');
985
  });
986
+ /*jQuery(".cretemrchntbtn").on( "click", function() {
987
+ jQuery('.mrchntalert').addClass('show');
988
  });
989
+ jQuery(".alertclsbtn").on( "click", function() {
990
+ jQuery(this).parent('.alertbx').removeClass('show');
991
  });*/
992
  </script>
993
  <?php
admin/class-enhanced-ecommerce-google-analytics-admin.php CHANGED
@@ -84,9 +84,9 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
84
  <script>
85
  var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
86
  (function( $ ) {
87
- $( function() {
88
- $( '.notice' ).on( 'click', '.notice-dismiss', function( event, el ) {
89
- var ee_notice_dismiss_id = $(this).parent('.is-dismissible').attr("data-id");
90
  jQuery.post(tvc_ajax_url,{
91
  action: "tvc_call_notice_dismiss",
92
  data:{ee_notice_dismiss_id:ee_notice_dismiss_id},
84
  <script>
85
  var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
86
  (function( $ ) {
87
+ jQuery( function() {
88
+ jQuery( '.notice' ).on( 'click', '.notice-dismiss', function( event, el ) {
89
+ var ee_notice_dismiss_id = jQuery(this).parent('.is-dismissible').attr("data-id");
90
  jQuery.post(tvc_ajax_url,{
91
  action: "tvc_call_notice_dismiss",
92
  data:{ee_notice_dismiss_id:ee_notice_dismiss_id},
admin/class-survey.php CHANGED
@@ -76,8 +76,8 @@ if ( ! class_exists( 'TVC_Survey' ) ) {
76
  ?>
77
  <script type="text/javascript">
78
  jQuery(function($){
79
- var $deactivateLink = $('#the-list').find('[data-slug="<?php echo esc_attr($this->plugin); ?>"] span.deactivate a'),
80
- $overlay = $('#ee-survey-<?php echo esc_attr($this->plugin); ?>'),
81
  $form = $overlay.find('form'),
82
  formOpen = false;
83
  // Plugin listing table deactivate link.
@@ -92,7 +92,7 @@ if ( ! class_exists( 'TVC_Survey' ) ) {
92
  event.preventDefault();
93
  $form.find('input[type=text], .error').hide();
94
  $form.find('.ee-survey-option').removeClass('selected');
95
- $(this).closest('.ee-survey-option').addClass('selected').find('input[type=text]').show();
96
  });
97
  // Survey Skip & Deactivate.
98
  $form.on('click', '.ee-survey-deactivate', function(event) {
@@ -127,7 +127,7 @@ if ( ! class_exists( 'TVC_Survey' ) ) {
127
  add_survey(data);
128
  });
129
  // Exit key closes survey when open.
130
- $(document).keyup(function(event) {
131
  if (27 === event.keyCode && formOpen) {
132
  $overlay.hide();
133
  formOpen = false;
@@ -141,12 +141,12 @@ if ( ! class_exists( 'TVC_Survey' ) ) {
141
  url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
142
  data: data,
143
  beforeSend: function(){
144
- //$('.ee-survey-submit').html("Thanks..");
145
- $('.ee-survey-submit').prop('disabled', true);
146
- $('.ee-survey-deactivate').hide();
147
  },
148
  success: function(response){
149
- $(".ee-survey-modal").hide();
150
  location.href = $deactivateLink.attr('href');
151
  }
152
  });
76
  ?>
77
  <script type="text/javascript">
78
  jQuery(function($){
79
+ var $deactivateLink = jQuery('#the-list').find('[data-slug="<?php echo esc_attr($this->plugin); ?>"] span.deactivate a'),
80
+ $overlay = jQuery('#ee-survey-<?php echo esc_attr($this->plugin); ?>'),
81
  $form = $overlay.find('form'),
82
  formOpen = false;
83
  // Plugin listing table deactivate link.
92
  event.preventDefault();
93
  $form.find('input[type=text], .error').hide();
94
  $form.find('.ee-survey-option').removeClass('selected');
95
+ jQuery(this).closest('.ee-survey-option').addClass('selected').find('input[type=text]').show();
96
  });
97
  // Survey Skip & Deactivate.
98
  $form.on('click', '.ee-survey-deactivate', function(event) {
127
  add_survey(data);
128
  });
129
  // Exit key closes survey when open.
130
+ jQuery(document).keyup(function(event) {
131
  if (27 === event.keyCode && formOpen) {
132
  $overlay.hide();
133
  formOpen = false;
141
  url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
142
  data: data,
143
  beforeSend: function(){
144
+ //jQuery('.ee-survey-submit').html("Thanks..");
145
+ jQuery('.ee-survey-submit').prop('disabled', true);
146
+ jQuery('.ee-survey-deactivate').hide();
147
  },
148
  success: function(response){
149
+ jQuery(".ee-survey-modal").hide();
150
  location.href = $deactivateLink.attr('href');
151
  }
152
  });
admin/class-tvc-admin-helper.php CHANGED
@@ -752,8 +752,8 @@ Class TVC_Admin_Helper{
752
  <script>
753
  function call_tvc_site_verified_and_domain_claim(call_args){
754
  var tvs_this = event.target;
755
- $("#call_both_verification").css("visibility","hidden");
756
- $(tvs_this).after('<div class="call_both_verification-spinner tvc-nb-spinner" id="both_verification-spinner"></div>');
757
  if(call_args == "domain_claim"){
758
  call_domain_claim_both();
759
  }else{
@@ -770,7 +770,7 @@ Class TVC_Admin_Helper{
770
  }
771
  }else{
772
  tvc_helper.tvc_alert("error","",rsp.message);
773
- $("#both_verification-spinner").remove();
774
  }
775
  });
776
  }
@@ -797,7 +797,7 @@ Class TVC_Admin_Helper{
797
  }else{
798
  tvc_helper.tvc_alert("error","",rsp.message,true,10000)
799
  }
800
- $("#both_verification-spinner").remove();
801
  });
802
  }
803
  </script>
752
  <script>
753
  function call_tvc_site_verified_and_domain_claim(call_args){
754
  var tvs_this = event.target;
755
+ jQuery("#call_both_verification").css("visibility","hidden");
756
+ jQuery(tvs_this).after('<div class="call_both_verification-spinner tvc-nb-spinner" id="both_verification-spinner"></div>');
757
  if(call_args == "domain_claim"){
758
  call_domain_claim_both();
759
  }else{
770
  }
771
  }else{
772
  tvc_helper.tvc_alert("error","",rsp.message);
773
+ jQuery("#both_verification-spinner").remove();
774
  }
775
  });
776
  }
797
  }else{
798
  tvc_helper.tvc_alert("error","",rsp.message,true,10000)
799
  }
800
+ jQuery("#both_verification-spinner").remove();
801
  });
802
  }
803
  </script>
admin/css/style.css CHANGED
@@ -1,6 +1,46 @@
1
  @charset "utf-8";
2
  @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,500&display=swap');
3
  /*rc */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  .product_batch_size{position: relative; margin-top: 10px; float: right;}
5
  .product_batch_size label{ margin-right: 23px;}
6
  .update-nag, .updated, .error, .is-dismissible, .notice { display: none !important; }
1
  @charset "utf-8";
2
  @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,500&display=swap');
3
  /*rc */
4
+ /* 11 */
5
+ .btn-11 {
6
+ overflow: hidden;
7
+ animation: shiny-btn2 2s ease-in-out infinite;
8
+ }
9
+ .btn-11:hover{-webkit-animation: 0;}
10
+ .btn-11:before {
11
+ position: absolute;
12
+ content: '';
13
+ display: inline-block;
14
+ top: -180px;
15
+ left: 0;
16
+ width: 30px;
17
+ height: 100%;
18
+ background-color: #fff;
19
+ animation: shiny-btn1 5s ease-in-out infinite;
20
+ }
21
+
22
+
23
+
24
+ @-webkit-keyframes shiny-btn1 {
25
+ 0% { -webkit-transform: scale(0) rotate(45deg); opacity: 0; }
26
+ 40% { -webkit-transform: scale(0) rotate(45deg); opacity: 0.5; }
27
+ 70% { -webkit-transform: scale(4) rotate(45deg); opacity: 1; }
28
+ 100% { -webkit-transform: scale(50) rotate(45deg); opacity: 0; }
29
+ }
30
+ @-webkit-keyframes shiny-btn2 {
31
+ /*0% { top:74%; }
32
+ 25% { top:73%; }
33
+ 50% { top:72%; }
34
+ 75% { top:73%; }
35
+ 100% { top:74%; }*/
36
+ 0% { right:0%; }
37
+ 25% { right:-1%; }
38
+ 50% { right:-3%; }
39
+ 75% { right:-1%; }
40
+ 100% { right:0%; }
41
+
42
+ }
43
+
44
  .product_batch_size{position: relative; margin-top: 10px; float: right;}
45
  .product_batch_size label{ margin-right: 23px;}
46
  .update-nag, .updated, .error, .is-dismissible, .notice { display: none !important; }
admin/js/onboarding-custom.js CHANGED
@@ -1,9 +1,9 @@
1
  $=jQuery;
2
  function loaderSection(isShow) {
3
  if (isShow){
4
- $('#loader-section').show();
5
  }else{
6
- $('#loader-section').hide();
7
  }
8
  }
9
  var tvc_time_out="";
@@ -30,29 +30,29 @@ function is_validate_step(step){
30
  var is_valide = false;
31
  if(step == "step_1"){
32
  var web_property_id = ""; var ua_account_id = ""; var web_measurement_id = ""; var ga4_account_id = "";
33
- var tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
34
  //console.log(tracking_option);
35
  if(tracking_option == "UA"){
36
- web_property_id = $('#ua_web_property_id_option_val').attr("data-val");
37
- ua_account_id = $("#ua_web_property_id_option_val").data('accountid');
38
  if(web_property_id == undefined || web_property_id == ""){
39
  msg = "Please select web property id.";
40
  }else{
41
  is_valide = true;
42
  }
43
  }else if(tracking_option == "GA4"){
44
- web_measurement_id = $('#ga4_web_measurement_id_option_val').attr("data-val");
45
- ga4_account_id = $("#ga4_web_measurement_id_option_val").data('accountid');
46
  if(web_measurement_id == undefined || web_measurement_id == ""){
47
  msg = "Please select measurement id.";
48
  }else{
49
  is_valide = true;
50
  }
51
  }else{
52
- web_property_id = $('#both_ua_web_property_id_option_val').attr("data-val");
53
- ua_account_id = $("#both_ua_web_property_id_option_val").data('accountid');
54
- web_measurement_id = $('#both_ga4_web_measurement_id_option_val').attr("data-val");
55
- ga4_account_id = $("#both_ga4_web_measurement_id_option_val").data('accountid');
56
  //console.log(web_property_id+"=="+web_measurement_id);
57
  if((web_property_id == undefined || web_property_id == "") || (web_measurement_id == undefined || web_measurement_id == "") ){
58
  msg = "Please select property/measurement id.";
@@ -62,143 +62,143 @@ function is_validate_step(step){
62
  }
63
  //console.log("is_valide"+is_valide+"-"+tracking_option+"-"+web_property_id);
64
  if(is_valide){
65
- $('#step_1').prop('disabled', false);
66
  }else{
67
- $('#step_1').prop('disabled', true);
68
  }
69
  }else if(step == "step_2"){
70
- google_ads_id = $('#ads-account').val();
71
  if(google_ads_id == ""){
72
  msg = "Please select Google Ads account.";
73
  }else{
74
  is_valide = true;
75
  }
76
  if(is_valide){
77
- $('#step_2').prop('disabled', false);
78
  }else{
79
- $('#step_2').prop('disabled', true);
80
  }
81
 
82
  }
83
  return is_valide;
84
  }
85
- $(document).ready(function () {
86
  loaderSection(false);
87
  //step-1
88
- $('.tvc-dropdown-header').click(function(event){
89
- $(this).next().toggle();
90
  event.stopPropagation();
91
  })
92
 
93
- $(window).click(function(){
94
- $('.tvc-dropdown-content').hide();
95
  })
96
- $(document.body).on('click', 'option:not(.more)', function(event){
97
  //alert('clicked option ' + this.innerHTML);
98
 
99
- var option_id = $(this).parent().parent().attr("id");
100
  //console.log(option_id);
101
- var val = $(this).attr("value");
102
- var accountid = $(this).attr("data-accountid");
103
 
104
- var text = $(this).html();
105
- let tracking_option = $('input:radio[name=analytic_tag_type]:checked').val();
106
 
107
  if(tracking_option == "UA" || (tracking_option == "BOTH" && option_id == "both_ua_web_property_id_option")){
108
- var profileid = $(this).attr("data-profileid");
109
  profileid = (profileid == undefined)?"":profileid;
110
  accountid = (accountid == undefined)?"":accountid;
111
  //console.log(accountid+"="+profileid);
112
 
113
- $("#"+option_id+"_val").html(text);
114
- $("#"+option_id+"_val").attr("data-accountid",accountid);
115
- $("#"+option_id+"_val").attr("data-profileid",profileid);
116
- $("#"+option_id+"_val").attr("data-val",val);
117
 
118
  }else if(tracking_option == "GA4" || (tracking_option == "BOTH" && option_id == "both_ga4_web_measurement_id_option") ){
119
- var name = $(this).attr("data-name");
120
  name = (name == undefined)?"":name;
121
  accountid = (accountid == undefined)?"":accountid;
122
- $("#"+option_id+"_val").html(text);
123
- $("#"+option_id+"_val").attr("data-accountid",accountid);
124
- $("#"+option_id+"_val").attr("data-name",name);
125
- $("#"+option_id+"_val").attr("data-val",val);
126
  }
127
- $(this).parent().parent().toggle();
128
  validate_google_analytics_sel();
129
  event.stopPropagation();
130
  })
131
 
132
 
133
- $(".google_analytics_sel").on( "change", function() {
134
  is_validate_step("step_1");
135
- $(".onbrdstep-1").removeClass('selectedactivestep');
136
- $(".onbrdstep-3").removeClass('selectedactivestep');
137
- $(".onbrdstep-2").removeClass('selectedactivestep');
138
- $("[data-id=step_1]").attr("data-is-done",0);
139
- $("[data-id=step_2]").attr("data-is-done",0);
140
- $("[data-id=step_3]").attr("data-is-done",0);
141
  });
142
  //step-2
143
- $(".google_ads_sel").on( "change", function() {
144
- //$(".onbrdstep-1").removeClass('selectedactivestep');
145
- $(".onbrdstep-3").removeClass('selectedactivestep');
146
- $(".onbrdstep-2").removeClass('selectedactivestep');
147
- //$("[data-id=step_1]").attr("data-is-done",0);
148
- $("[data-id=step_2]").attr("data-is-done",0);
149
- $("[data-id=step_3]").attr("data-is-done",0);
150
  });
151
- $('input[type=checkbox]:not(#adult_content, #terms_conditions)').change(function() {
152
- //$(".onbrdstep-1").removeClass('selectedactivestep');
153
- $(".onbrdstep-3").removeClass('selectedactivestep');
154
- $(".onbrdstep-2").removeClass('selectedactivestep');
155
- // $("[data-id=step_1]").attr("data-is-done",0);
156
- $("[data-id=step_2]").attr("data-is-done",0);
157
- $("[data-id=step_3]").attr("data-is-done",0);
158
  });
159
 
160
  //select2
161
- //$(".select2").select2();
162
  // desable to close advance settings
163
- $(".advance-settings .dropdown-menu").click(function(e){
164
  e.stopPropagation();
165
  });
166
  });
167
  function validate_google_analytics_sel(){
168
  is_validate_step("step_1");
169
- $(".onbrdstep-1").removeClass('selectedactivestep');
170
- $(".onbrdstep-3").removeClass('selectedactivestep');
171
- $(".onbrdstep-2").removeClass('selectedactivestep');
172
- $("[data-id=step_1]").attr("data-is-done",0);
173
- $("[data-id=step_2]").attr("data-is-done",0);
174
- $("[data-id=step_3]").attr("data-is-done",0);
175
  }
176
  function is_change_analytics_account(){
177
- let tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
178
- let old_tracking_option = $('#old_tracking').attr("data-tracking_option");
179
  if(tracking_option != old_tracking_option){
180
  return true;
181
  }else if(tracking_option == "UA"){
182
- let web_property_id = $('#ua_web_property_id_option_val').attr("data-val");
183
- let old_web_property_id = $('#old_tracking').attr("data-property_id");
184
  if(web_property_id != old_web_property_id){
185
  return true;
186
  }else{
187
  return false;
188
  }
189
  }else if(tracking_option == "GA4"){
190
- let web_measurement_id = $('#ga4_web_measurement_id_option_val').attr("data-val");
191
- let old_web_measurement_id = $('#old_tracking').attr("data-measurement_id");
192
  if(web_measurement_id != old_web_measurement_id){
193
  return true;
194
  }else{
195
  return false;
196
  }
197
  }else if(tracking_option == "BOTH"){
198
- let web_property_id = $('#both_ua_web_property_id_option_val').attr("data-val");
199
- let web_measurement_id = $('#both_ga4_web_measurement_id_option_val').attr("data-val");
200
- let old_web_property_id = $('#old_tracking').attr("data-property_id");
201
- let old_web_measurement_id = $('#old_tracking').attr("data-measurement_id");
202
  if(web_measurement_id != old_web_measurement_id || web_property_id != old_web_property_id){
203
  return true;
204
  }else{
@@ -217,24 +217,24 @@ function save_analytics_web_properties(tracking_option, tvc_data, subscription_i
217
  var is_valide = true;
218
  var msg ="";
219
  if(tracking_option == "UA"){
220
- web_property_id = $('#ua_web_property_id_option_val').attr("data-val");
221
- ua_account_id = $("#ua_web_property_id_option_val").attr('data-accountid');
222
  if(web_property_id == ""){
223
  is_valide = false;
224
  msg = "Please select web property id.";
225
  }
226
  }else if(tracking_option == "GA4"){
227
- web_measurement_id = $('#ga4_web_measurement_id_option_val').attr("data-val");
228
- ga4_account_id = $("#ga4_web_measurement_id_option_val").attr('data-accountid');
229
  if(web_measurement_id == ""){
230
  is_valide = false;
231
  msg = "Please select measurement id.";
232
  }
233
  }else{
234
- web_property_id = $('#both_ua_web_property_id_option_val').attr("data-val");
235
- ua_account_id = $("#both_ua_web_property_id_option_val").attr('data-accountid');
236
- web_measurement_id = $('#both_ga4_web_measurement_id_option_val').attr("data-val");
237
- ga4_account_id = $("#both_ga4_web_measurement_id_option_val").attr('data-accountid');
238
 
239
  if(web_property_id == "" || web_measurement_id == ""){
240
  is_valide = false;
@@ -242,7 +242,7 @@ function save_analytics_web_properties(tracking_option, tvc_data, subscription_i
242
  }
243
  }
244
  if(is_valide == true){
245
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
246
  var data = {
247
  action: "save_analytics_data",
248
  subscription_id:subscription_id,
@@ -251,12 +251,12 @@ function save_analytics_web_properties(tracking_option, tvc_data, subscription_i
251
  web_property_id: web_property_id,
252
  ga4_account_id: ga4_account_id,
253
  ua_account_id: ua_account_id,
254
- enhanced_e_commerce_tracking: $('#enhanced_e_commerce_tracking').is(':checked'),
255
- user_time_tracking: $('#user_time_tracking').is(':checked'),
256
- add_gtag_snippet: $('#add_gtag_snippet').is(':checked'),
257
- client_id_tracking: $('#client_id_tracking').is(':checked'),
258
- exception_tracking: $('#exception_tracking').is(':checked'),
259
- enhanced_link_attribution_tracking: $('#enhanced_link_attribution_tracking').is(':checked'),
260
  tvc_data:tvc_data,
261
  conversios_onboarding_nonce:conversios_onboarding_nonce
262
  };
@@ -293,17 +293,17 @@ function save_analytics_web_properties(tracking_option, tvc_data, subscription_i
293
  }
294
 
295
  function save_google_ads_data(google_ads_id, tvc_data, subscription_id, is_skip=false){
296
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
297
  if(google_ads_id || is_skip == true){
298
  loaderSection(true);
299
  var data = {
300
  action: "save_google_ads_data",
301
  subscription_id:subscription_id,
302
  google_ads_id: google_ads_id,
303
- remarketing_tags: $('#remarketing_tag').is(':checked'),
304
- dynamic_remarketing_tags: $('#dynamic_remarketing_tags').is(':checked'),
305
- google_ads_conversion_tracking: $("#google_ads_conversion_tracking").is(':checked'),
306
- link_google_analytics_with_google_ads: $("#link_google_analytics_with_google_ads").is(':checked'),
307
  tvc_data:tvc_data,
308
  conversios_onboarding_nonce:conversios_onboarding_nonce
309
  };
@@ -318,25 +318,25 @@ function save_google_ads_data(google_ads_id, tvc_data, subscription_id, is_skip=
318
  //console.log(response);
319
  if(response.error === false) {
320
  add_message("success","Google Ads successfully updated.");
321
- //$("#ads-account").val(google_ads_id);
322
- let tracking_option = $('input:radio[name=analytic_tag_type]:checked').val();
323
  var s_tracking_option = tracking_option.toLowerCase();
324
  if(plan_id != 1){
325
  check_oradd_conversion_list(google_ads_id, tvc_data);
326
  }
327
 
328
- if ($("#link_google_analytics_with_google_ads").is(':checked')) {
329
  if(tracking_option == "UA" || tracking_option == "BOTH"){
330
  if(tracking_option == "BOTH"){
331
  s_tracking_option = "both_ua";
332
  }
333
- var profile_id = $("#"+s_tracking_option+"_web_property_id_option_val").attr('data-profileid');
334
  var UalinkData = {
335
  action: "link_analytic_to_ads_account",
336
  type: "UA",
337
  ads_customer_id: google_ads_id,
338
- analytics_id: $("#"+s_tracking_option+"_web_property_id_option_val").attr('data-accountid'),
339
- web_property_id: $("#"+s_tracking_option+"_web_property_id_option_val").attr("data-val"),
340
  profile_id: profile_id,
341
  tvc_data:tvc_data,
342
  conversios_onboarding_nonce:conversios_onboarding_nonce
@@ -354,12 +354,12 @@ function save_google_ads_data(google_ads_id, tvc_data, subscription_id, is_skip=
354
  if(tracking_option == "BOTH"){
355
  s_tracking_option = "both_ga4";
356
  }
357
- var web_property = $("#"+s_tracking_option+"_web_measurement_id_option_val").attr('data-name');
358
  var Ga4linkData = {
359
  action: "link_analytic_to_ads_account",
360
  type: "GA4",
361
  ads_customer_id: google_ads_id,
362
- web_property_id: $("#"+s_tracking_option+"_web_measurement_id_option_val").attr("data-val"),
363
  web_property: web_property,
364
  tvc_data:tvc_data,
365
  conversios_onboarding_nonce:conversios_onboarding_nonce
@@ -382,17 +382,17 @@ function save_google_ads_data(google_ads_id, tvc_data, subscription_id, is_skip=
382
  });
383
  return true;
384
  }else{
385
- $('#tvc_ads_skip_confirm').addClass('showpopup');
386
- $('body').addClass('scrlnone');
387
- //$('#tvc_ads_skip_confirm').modal('show');
388
  return false;
389
  }
390
  }
391
  function save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, is_skip=fals){
392
  if(google_merchant_center_id || is_skip == true){
393
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
394
- var website_url = $("#url").val();
395
- var customer_id = $("#loginCustomerId").val();
396
  var data = {
397
  action: "save_merchant_data",
398
  subscription_id:subscription_id,
@@ -412,9 +412,9 @@ function save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, su
412
  loaderSection(true);
413
  },
414
  success: function (response) {
415
- let google_ads_id = $("#new_google_ads_id").text();
416
  if(google_ads_id ==null || google_ads_id ==""){
417
- google_ads_id = $('#ads-account').val();
418
  }
419
 
420
  if (response.error === false) {
@@ -447,7 +447,7 @@ function save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, su
447
 
448
  /* get conversion list */
449
  function check_oradd_conversion_list(google_ads_id, tvc_data){
450
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
451
  if(google_ads_id ){
452
  var data = {
453
  action: "get_conversion_list",
@@ -525,7 +525,7 @@ function link_google_Ads_to_merchant_center(link_data, tvc_data, subscription_id
525
  }
526
  /* get subscription details */
527
  function get_subscription_details(tvc_data, subscription_id) {
528
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
529
  $.ajax({
530
  type: "POST",
531
  dataType: "json",
@@ -535,29 +535,29 @@ function get_subscription_details(tvc_data, subscription_id) {
535
  },
536
  success: function (response) {
537
  if (response.error === false) {
538
- $("#google_analytics_property_id_info").hide();
539
- $("#google_analytics_measurement_id_info").hide();
540
- $("#google_ads_info").hide();
541
- $("#google_merchant_center_info").hide();
542
  if(response.data.property_id != ""){
543
- $("#selected_google_analytics_property").text(response.data.property_id);
544
- $("#google_analytics_property_id_info").show();
545
  }
546
  if(response.data.measurement_id != ""){
547
- $("#selected_google_analytics_measurement").text(response.data.measurement_id);
548
- $("#google_analytics_measurement_id_info").show();
549
  }
550
  if(response.data.google_ads_id != ""){
551
- $("#selected_google_ads_account").text(response.data.google_ads_id);
552
- $("#google_ads_info").show();
553
  }
554
  if(response.data.google_merchant_center_id != ""){
555
- $("#selected_google_merchant_center").text(response.data.google_merchant_center_id);
556
- $("#google_merchant_center_info").show();
557
  }
558
- $('#tvc_confirm_submite').addClass('showpopup');
559
- $('body').addClass('scrlnone');
560
- //$('#tvc_confirm_submite').modal('show');
561
  } else {
562
  add_message("error","Error while fetching subscription data");
563
  }
@@ -569,22 +569,22 @@ function get_subscription_details(tvc_data, subscription_id) {
569
  //call get list propertie function base on tracking_option
570
  function call_list_analytics_web_properties(tracking_option, tvc_data, page =1){
571
  if (tracking_option == 'UA'){
572
- let web_property_id_length = $('#ua_web_property_id_option option').length;
573
  if(web_property_id_length < 2 || page != 1){
574
  list_analytics_web_properties("UA", tvc_data, page);
575
  }else if( page != 1){
576
  list_analytics_web_properties("UA", tvc_data, page);
577
  }
578
  }else if (tracking_option == 'GA4' ){
579
- let web_measurement_id_length = $('#ga4_web_measurement_id_option option').length;
580
  if(web_measurement_id_length < 2){
581
  list_analytics_web_properties("GA4", tvc_data, page);
582
  }else if( page != 1){
583
  list_analytics_web_properties("GA4", tvc_data, page);
584
  }
585
  }else if (tracking_option == 'BOTH'){
586
- let web_property_id_length = $('#both_ua_web_property_id_option option').length;
587
- let web_measurement_id_length = $('#both_ga4_web_measurement_id_option option').length;
588
  if(web_measurement_id_length < 2 && web_property_id_length < 2){
589
  list_analytics_web_properties("BOTH", tvc_data);
590
  }else if(web_property_id_length < 2 ){
@@ -598,7 +598,7 @@ function call_list_analytics_web_properties(tracking_option, tvc_data, page =1){
598
  // get list properties dropdown options
599
  function list_analytics_web_properties(type, tvc_data, page =1) {
600
  loaderSection(true);
601
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
602
  //console.log("page"+page);
603
  $.ajax({
604
  type: "POST",
@@ -611,8 +611,8 @@ function list_analytics_web_properties(type, tvc_data, page =1) {
611
  if (response != null && response.error == false) {
612
  if (type == "UA" || type == "BOTH") {
613
  //web_properties_dropdown
614
- var subscriptionPropertyId = $("#subscriptionPropertyId").val();
615
- var ga_view_id = $("#ga_view_id").val();
616
  var PropOptions = '';
617
 
618
  //console.log("call option");
@@ -629,7 +629,7 @@ function list_analytics_web_properties(type, tvc_data, page =1) {
629
  if(type == "BOTH"){
630
  s_tracking_option = "both_ua";
631
  }
632
- $("#"+s_tracking_option+"_web_property_id_option_val").attr("data-profileid",propValue.id);
633
  }else{
634
  selected = "";
635
  }
@@ -637,14 +637,14 @@ function list_analytics_web_properties(type, tvc_data, page =1) {
637
  });
638
  }else{
639
  //console.log("hide option");
640
- $(".tvc-ua-option-more").hide();
641
  }
642
- $('#ua_web_property_id_option > .tvc-select-items').append(PropOptions);
643
- $('#both_ua_web_property_id_option > .tvc-select-items').append(PropOptions);
644
  }
645
  if (type == "GA4" || type == "BOTH") {
646
  //web_measurement_dropdown
647
- var subscriptionMeasurementId = $("#subscriptionMeasurementId").val();
648
  var MeasOptions = '';
649
  if(response.data != null && response.data.wep_measurement.length > 0){
650
  $.each(response.data.wep_measurement, function (measKey, measValue) {
@@ -654,7 +654,7 @@ function list_analytics_web_properties(type, tvc_data, page =1) {
654
  if(type == "BOTH"){
655
  s_tracking_option = "both_ga4";
656
  }
657
- $("#"+s_tracking_option+"_web_measurement_id_option_val").attr('data-name',web_property[1]);
658
  } else {
659
  var selected = "";
660
  }
@@ -662,12 +662,12 @@ function list_analytics_web_properties(type, tvc_data, page =1) {
662
  });
663
  }else{
664
  //console.log("hide option");
665
- $(".tvc-ga4-option-more").hide();
666
  }
667
- $('#ga4_web_measurement_id_option > .tvc-select-items').append(MeasOptions);
668
- $('#both_ga4_web_measurement_id_option > .tvc-select-items').append(MeasOptions);
669
  }
670
- $(".slect2bx").select2();
671
  }else if( response != null && response.error == true && response.errors != undefined){
672
  const errors = response.errors[0];
673
  add_message("error",errors);
@@ -680,7 +680,7 @@ function list_analytics_web_properties(type, tvc_data, page =1) {
680
  });
681
  }
682
  function call_list_googl_ads_account(tvc_data){
683
- let ads_account_length = $('#ads-account option').length;
684
  if(ads_account_length < 2){
685
  list_googl_ads_account(tvc_data);
686
  }
@@ -688,8 +688,8 @@ function call_list_googl_ads_account(tvc_data){
688
  // get list google ads dropdown options
689
  function list_googl_ads_account(tvc_data) {
690
  //loaderSection(true);
691
- var selectedValue = $("#subscriptionGoogleAdsId").val();
692
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
693
  $.ajax({
694
  type: "POST",
695
  dataType: "json",
@@ -697,8 +697,8 @@ function list_googl_ads_account(tvc_data) {
697
  data: {action: "list_googl_ads_account", tvc_data:tvc_data, conversios_onboarding_nonce:conversios_onboarding_nonce},
698
  success: function (response) {
699
  if (response.error === false) {
700
- $('#ads-account').empty();
701
- $('#ads-account').append($('<option>', {
702
  value: "",
703
  text: "Select Google Ads Account"
704
  }));
@@ -708,12 +708,12 @@ function list_googl_ads_account(tvc_data) {
708
  if(response.data.length > 0){
709
  $.each(response.data, function (key, value) {
710
  if (selectedValue == value) {
711
- $('#ads-account').append($('<option>', { value: value, text: value,selected: "selected"}));
712
  } else {
713
  if(selectedValue == "" && key == 0){
714
- $('#ads-account').append($('<option>', { value: value, text: value,selected: "selected"}));
715
  }else{
716
- $('#ads-account').append($('<option>', { value: value, text: value,}));
717
  }
718
  }
719
  });
@@ -728,14 +728,14 @@ function list_googl_ads_account(tvc_data) {
728
  }
729
 
730
  function call_list_google_merchant_account(tvc_data){
731
- let mcc_account_length = $('#google_merchant_center_id option').length;
732
  if(mcc_account_length < 2){
733
  list_google_merchant_account(tvc_data);
734
  }
735
  }
736
  function list_google_merchant_account(tvc_data){
737
- var selectedValue = $("#subscriptionMerchantCenId").val();
738
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
739
  $.ajax({
740
  type: "POST",
741
  dataType: "json",
@@ -743,17 +743,17 @@ function list_google_merchant_account(tvc_data){
743
  data: {action: "list_google_merchant_account", tvc_data:tvc_data, conversios_onboarding_nonce:conversios_onboarding_nonce},
744
  success: function (response) {
745
  if (response.error === false){
746
- $('#google_merchant_center_id').empty();
747
- $('#google_merchant_center_id').append($('<option>', {value: "", text: "Select Measurement Id"}));
748
  if (response.data.length > 0) {
749
  $.each(response.data, function (key, value) {
750
  if(selectedValue == value.account_id){
751
- $('#google_merchant_center_id').append($('<option>', {value: value.account_id, "data-merchant_id": value.merchant_id, text: value.account_id,selected: "selected"}));
752
  }else{
753
  if(selectedValue == "" && key == 0){
754
- $('#google_merchant_center_id').append($('<option>', {value: value.account_id, "data-merchant_id": value.merchant_id, text: value.account_id,selected: "selected"}));
755
  }else{
756
- $('#google_merchant_center_id').append($('<option>', {value: value.account_id,"data-merchant_id": value.merchant_id, text: value.account_id, }));
757
  }
758
  }
759
  });
@@ -769,7 +769,7 @@ function list_google_merchant_account(tvc_data){
769
  }
770
  /* Create function */
771
  function create_google_ads_account(tvc_data){
772
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
773
  $.ajax({
774
  type: "POST",
775
  dataType: "json",
@@ -781,9 +781,9 @@ function create_google_ads_account(tvc_data){
781
  success: function (response) {
782
  if (response.error === false) {
783
  add_message("success",response.data.message);
784
- $("#new_google_ads_id").text(response.data.adwords_id);
785
- $("#tvc_ads_section").slideUp();
786
- $("#new_google_ads_section").slideDown();
787
  //localStorage.setItem("new_google_ads_id", response.data.adwords_id);
788
  //listGoogleAdsAccount();
789
  } else {
@@ -795,14 +795,14 @@ function create_google_ads_account(tvc_data){
795
  }
796
 
797
  function create_google_merchant_center_account(tvc_data){
798
- var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
799
  var is_valide = true;
800
- var website_url = $("#url").val();
801
- var email_address = $("#get-mail").val();
802
- var store_name = $("#store_name").val();
803
- var country = $("#selectCountry").val();
804
- var customer_id = $("#loginCustomerId").val();
805
- var adult_content = $("#adult_content").is(':checked');
806
  if(website_url == ""){
807
  add_message("error","Missing value of website url.");
808
  is_valide = false;
@@ -815,7 +815,7 @@ function create_google_merchant_center_account(tvc_data){
815
  }else if(country == ""){
816
  add_message("error","Missing value of country.");
817
  is_valide = false;
818
- } else if($('#terms_conditions').prop('checked') == false){
819
  add_message("error","Please I accept the terms and conditions.");
820
  is_valide = false;
821
  }
@@ -843,18 +843,18 @@ function create_google_merchant_center_account(tvc_data){
843
  success: function (response, status) {
844
  if (response.error === false || response.merchant_id != undefined) {
845
  add_message("success","New merchant center created successfully.");
846
- $("#new_merchant_id").text(response.account.id);
847
- $("#tvc_merchant_section").slideUp();
848
- $("#new_merchant_section").slideDown();
849
  } else if (response.error === true) {
850
  const errors = JSON.parse(response.errors[0]);
851
  add_message("error",errors.message);
852
  } else {
853
  add_message("error","There was error to create merchant center account");
854
  }
855
- $("#createmerchantpopup").removeClass('showpopup');
856
- $('body').removeClass('scrlnone');
857
- //$("#merchantconfirmModal").modal('hide');
858
  loaderSection(false);
859
  }
860
  });
1
  $=jQuery;
2
  function loaderSection(isShow) {
3
  if (isShow){
4
+ jQuery('#loader-section').show();
5
  }else{
6
+ jQuery('#loader-section').hide();
7
  }
8
  }
9
  var tvc_time_out="";
30
  var is_valide = false;
31
  if(step == "step_1"){
32
  var web_property_id = ""; var ua_account_id = ""; var web_measurement_id = ""; var ga4_account_id = "";
33
+ var tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
34
  //console.log(tracking_option);
35
  if(tracking_option == "UA"){
36
+ web_property_id = jQuery('#ua_web_property_id_option_val').attr("data-val");
37
+ ua_account_id = jQuery("#ua_web_property_id_option_val").data('accountid');
38
  if(web_property_id == undefined || web_property_id == ""){
39
  msg = "Please select web property id.";
40
  }else{
41
  is_valide = true;
42
  }
43
  }else if(tracking_option == "GA4"){
44
+ web_measurement_id = jQuery('#ga4_web_measurement_id_option_val').attr("data-val");
45
+ ga4_account_id = jQuery("#ga4_web_measurement_id_option_val").data('accountid');
46
  if(web_measurement_id == undefined || web_measurement_id == ""){
47
  msg = "Please select measurement id.";
48
  }else{
49
  is_valide = true;
50
  }
51
  }else{
52
+ web_property_id = jQuery('#both_ua_web_property_id_option_val').attr("data-val");
53
+ ua_account_id = jQuery("#both_ua_web_property_id_option_val").data('accountid');
54
+ web_measurement_id = jQuery('#both_ga4_web_measurement_id_option_val').attr("data-val");
55
+ ga4_account_id = jQuery("#both_ga4_web_measurement_id_option_val").data('accountid');
56
  //console.log(web_property_id+"=="+web_measurement_id);
57
  if((web_property_id == undefined || web_property_id == "") || (web_measurement_id == undefined || web_measurement_id == "") ){
58
  msg = "Please select property/measurement id.";
62
  }
63
  //console.log("is_valide"+is_valide+"-"+tracking_option+"-"+web_property_id);
64
  if(is_valide){
65
+ jQuery('#step_1').prop('disabled', false);
66
  }else{
67
+ jQuery('#step_1').prop('disabled', true);
68
  }
69
  }else if(step == "step_2"){
70
+ google_ads_id = jQuery('#ads-account').val();
71
  if(google_ads_id == ""){
72
  msg = "Please select Google Ads account.";
73
  }else{
74
  is_valide = true;
75
  }
76
  if(is_valide){
77
+ jQuery('#step_2').prop('disabled', false);
78
  }else{
79
+ jQuery('#step_2').prop('disabled', true);
80
  }
81
 
82
  }
83
  return is_valide;
84
  }
85
+ jQuery(document).ready(function () {
86
  loaderSection(false);
87
  //step-1
88
+ jQuery('.tvc-dropdown-header').click(function(event){
89
+ jQuery(this).next().toggle();
90
  event.stopPropagation();
91
  })
92
 
93
+ jQuery(window).click(function(){
94
+ jQuery('.tvc-dropdown-content').hide();
95
  })
96
+ jQuery(document.body).on('click', 'option:not(.more)', function(event){
97
  //alert('clicked option ' + this.innerHTML);
98
 
99
+ var option_id = jQuery(this).parent().parent().attr("id");
100
  //console.log(option_id);
101
+ var val = jQuery(this).attr("value");
102
+ var accountid = jQuery(this).attr("data-accountid");
103
 
104
+ var text = jQuery(this).html();
105
+ let tracking_option = jQuery('input:radio[name=analytic_tag_type]:checked').val();
106
 
107
  if(tracking_option == "UA" || (tracking_option == "BOTH" && option_id == "both_ua_web_property_id_option")){
108
+ var profileid = jQuery(this).attr("data-profileid");
109
  profileid = (profileid == undefined)?"":profileid;
110
  accountid = (accountid == undefined)?"":accountid;
111
  //console.log(accountid+"="+profileid);
112
 
113
+ jQuery("#"+option_id+"_val").html(text);
114
+ jQuery("#"+option_id+"_val").attr("data-accountid",accountid);
115
+ jQuery("#"+option_id+"_val").attr("data-profileid",profileid);
116
+ jQuery("#"+option_id+"_val").attr("data-val",val);
117
 
118
  }else if(tracking_option == "GA4" || (tracking_option == "BOTH" && option_id == "both_ga4_web_measurement_id_option") ){
119
+ var name = jQuery(this).attr("data-name");
120
  name = (name == undefined)?"":name;
121
  accountid = (accountid == undefined)?"":accountid;
122
+ jQuery("#"+option_id+"_val").html(text);
123
+ jQuery("#"+option_id+"_val").attr("data-accountid",accountid);
124
+ jQuery("#"+option_id+"_val").attr("data-name",name);
125
+ jQuery("#"+option_id+"_val").attr("data-val",val);
126
  }
127
+ jQuery(this).parent().parent().toggle();
128
  validate_google_analytics_sel();
129
  event.stopPropagation();
130
  })
131
 
132
 
133
+ jQuery(".google_analytics_sel").on( "change", function() {
134
  is_validate_step("step_1");
135
+ jQuery(".onbrdstep-1").removeClass('selectedactivestep');
136
+ jQuery(".onbrdstep-3").removeClass('selectedactivestep');
137
+ jQuery(".onbrdstep-2").removeClass('selectedactivestep');
138
+ jQuery("[data-id=step_1]").attr("data-is-done",0);
139
+ jQuery("[data-id=step_2]").attr("data-is-done",0);
140
+ jQuery("[data-id=step_3]").attr("data-is-done",0);
141
  });
142
  //step-2
143
+ jQuery(".google_ads_sel").on( "change", function() {
144
+ //jQuery(".onbrdstep-1").removeClass('selectedactivestep');
145
+ jQuery(".onbrdstep-3").removeClass('selectedactivestep');
146
+ jQuery(".onbrdstep-2").removeClass('selectedactivestep');
147
+ //jQuery("[data-id=step_1]").attr("data-is-done",0);
148
+ jQuery("[data-id=step_2]").attr("data-is-done",0);
149
+ jQuery("[data-id=step_3]").attr("data-is-done",0);
150
  });
151
+ jQuery('input[type=checkbox]:not(#adult_content, #terms_conditions)').change(function() {
152
+ //jQuery(".onbrdstep-1").removeClass('selectedactivestep');
153
+ jQuery(".onbrdstep-3").removeClass('selectedactivestep');
154
+ jQuery(".onbrdstep-2").removeClass('selectedactivestep');
155
+ // jQuery("[data-id=step_1]").attr("data-is-done",0);
156
+ jQuery("[data-id=step_2]").attr("data-is-done",0);
157
+ jQuery("[data-id=step_3]").attr("data-is-done",0);
158
  });
159
 
160
  //select2
161
+ //jQuery(".select2").select2();
162
  // desable to close advance settings
163
+ jQuery(".advance-settings .dropdown-menu").click(function(e){
164
  e.stopPropagation();
165
  });
166
  });
167
  function validate_google_analytics_sel(){
168
  is_validate_step("step_1");
169
+ jQuery(".onbrdstep-1").removeClass('selectedactivestep');
170
+ jQuery(".onbrdstep-3").removeClass('selectedactivestep');
171
+ jQuery(".onbrdstep-2").removeClass('selectedactivestep');
172
+ jQuery("[data-id=step_1]").attr("data-is-done",0);
173
+ jQuery("[data-id=step_2]").attr("data-is-done",0);
174
+ jQuery("[data-id=step_3]").attr("data-is-done",0);
175
  }
176
  function is_change_analytics_account(){
177
+ let tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
178
+ let old_tracking_option = jQuery('#old_tracking').attr("data-tracking_option");
179
  if(tracking_option != old_tracking_option){
180
  return true;
181
  }else if(tracking_option == "UA"){
182
+ let web_property_id = jQuery('#ua_web_property_id_option_val').attr("data-val");
183
+ let old_web_property_id = jQuery('#old_tracking').attr("data-property_id");
184
  if(web_property_id != old_web_property_id){
185
  return true;
186
  }else{
187
  return false;
188
  }
189
  }else if(tracking_option == "GA4"){
190
+ let web_measurement_id = jQuery('#ga4_web_measurement_id_option_val').attr("data-val");
191
+ let old_web_measurement_id = jQuery('#old_tracking').attr("data-measurement_id");
192
  if(web_measurement_id != old_web_measurement_id){
193
  return true;
194
  }else{
195
  return false;
196
  }
197
  }else if(tracking_option == "BOTH"){
198
+ let web_property_id = jQuery('#both_ua_web_property_id_option_val').attr("data-val");
199
+ let web_measurement_id = jQuery('#both_ga4_web_measurement_id_option_val').attr("data-val");
200
+ let old_web_property_id = jQuery('#old_tracking').attr("data-property_id");
201
+ let old_web_measurement_id = jQuery('#old_tracking').attr("data-measurement_id");
202
  if(web_measurement_id != old_web_measurement_id || web_property_id != old_web_property_id){
203
  return true;
204
  }else{
217
  var is_valide = true;
218
  var msg ="";
219
  if(tracking_option == "UA"){
220
+ web_property_id = jQuery('#ua_web_property_id_option_val').attr("data-val");
221
+ ua_account_id = jQuery("#ua_web_property_id_option_val").attr('data-accountid');
222
  if(web_property_id == ""){
223
  is_valide = false;
224
  msg = "Please select web property id.";
225
  }
226
  }else if(tracking_option == "GA4"){
227
+ web_measurement_id = jQuery('#ga4_web_measurement_id_option_val').attr("data-val");
228
+ ga4_account_id = jQuery("#ga4_web_measurement_id_option_val").attr('data-accountid');
229
  if(web_measurement_id == ""){
230
  is_valide = false;
231
  msg = "Please select measurement id.";
232
  }
233
  }else{
234
+ web_property_id = jQuery('#both_ua_web_property_id_option_val').attr("data-val");
235
+ ua_account_id = jQuery("#both_ua_web_property_id_option_val").attr('data-accountid');
236
+ web_measurement_id = jQuery('#both_ga4_web_measurement_id_option_val').attr("data-val");
237
+ ga4_account_id = jQuery("#both_ga4_web_measurement_id_option_val").attr('data-accountid');
238
 
239
  if(web_property_id == "" || web_measurement_id == ""){
240
  is_valide = false;
242
  }
243
  }
244
  if(is_valide == true){
245
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
246
  var data = {
247
  action: "save_analytics_data",
248
  subscription_id:subscription_id,
251
  web_property_id: web_property_id,
252
  ga4_account_id: ga4_account_id,
253
  ua_account_id: ua_account_id,
254
+ enhanced_e_commerce_tracking: jQuery('#enhanced_e_commerce_tracking').is(':checked'),
255
+ user_time_tracking: jQuery('#user_time_tracking').is(':checked'),
256
+ add_gtag_snippet: jQuery('#add_gtag_snippet').is(':checked'),
257
+ client_id_tracking: jQuery('#client_id_tracking').is(':checked'),
258
+ exception_tracking: jQuery('#exception_tracking').is(':checked'),
259
+ enhanced_link_attribution_tracking: jQuery('#enhanced_link_attribution_tracking').is(':checked'),
260
  tvc_data:tvc_data,
261
  conversios_onboarding_nonce:conversios_onboarding_nonce
262
  };
293
  }
294
 
295
  function save_google_ads_data(google_ads_id, tvc_data, subscription_id, is_skip=false){
296
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
297
  if(google_ads_id || is_skip == true){
298
  loaderSection(true);
299
  var data = {
300
  action: "save_google_ads_data",
301
  subscription_id:subscription_id,
302
  google_ads_id: google_ads_id,
303
+ remarketing_tags: jQuery('#remarketing_tag').is(':checked'),
304
+ dynamic_remarketing_tags: jQuery('#dynamic_remarketing_tags').is(':checked'),
305
+ google_ads_conversion_tracking: jQuery("#google_ads_conversion_tracking").is(':checked'),
306
+ link_google_analytics_with_google_ads: jQuery("#link_google_analytics_with_google_ads").is(':checked'),
307
  tvc_data:tvc_data,
308
  conversios_onboarding_nonce:conversios_onboarding_nonce
309
  };
318
  //console.log(response);
319
  if(response.error === false) {
320
  add_message("success","Google Ads successfully updated.");
321
+ //jQuery("#ads-account").val(google_ads_id);
322
+ let tracking_option = jQuery('input:radio[name=analytic_tag_type]:checked').val();
323
  var s_tracking_option = tracking_option.toLowerCase();
324
  if(plan_id != 1){
325
  check_oradd_conversion_list(google_ads_id, tvc_data);
326
  }
327
 
328
+ if (jQuery("#link_google_analytics_with_google_ads").is(':checked')) {
329
  if(tracking_option == "UA" || tracking_option == "BOTH"){
330
  if(tracking_option == "BOTH"){
331
  s_tracking_option = "both_ua";
332
  }
333
+ var profile_id = jQuery("#"+s_tracking_option+"_web_property_id_option_val").attr('data-profileid');
334
  var UalinkData = {
335
  action: "link_analytic_to_ads_account",
336
  type: "UA",
337
  ads_customer_id: google_ads_id,
338
+ analytics_id: jQuery("#"+s_tracking_option+"_web_property_id_option_val").attr('data-accountid'),
339
+ web_property_id: jQuery("#"+s_tracking_option+"_web_property_id_option_val").attr("data-val"),
340
  profile_id: profile_id,
341
  tvc_data:tvc_data,
342
  conversios_onboarding_nonce:conversios_onboarding_nonce
354
  if(tracking_option == "BOTH"){
355
  s_tracking_option = "both_ga4";
356
  }
357
+ var web_property = jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr('data-name');
358
  var Ga4linkData = {
359
  action: "link_analytic_to_ads_account",
360
  type: "GA4",
361
  ads_customer_id: google_ads_id,
362
+ web_property_id: jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr("data-val"),
363
  web_property: web_property,
364
  tvc_data:tvc_data,
365
  conversios_onboarding_nonce:conversios_onboarding_nonce
382
  });
383
  return true;
384
  }else{
385
+ jQuery('#tvc_ads_skip_confirm').addClass('showpopup');
386
+ jQuery('body').addClass('scrlnone');
387
+ //jQuery('#tvc_ads_skip_confirm').modal('show');
388
  return false;
389
  }
390
  }
391
  function save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, is_skip=fals){
392
  if(google_merchant_center_id || is_skip == true){
393
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
394
+ var website_url = jQuery("#url").val();
395
+ var customer_id = jQuery("#loginCustomerId").val();
396
  var data = {
397
  action: "save_merchant_data",
398
  subscription_id:subscription_id,
412
  loaderSection(true);
413
  },
414
  success: function (response) {
415
+ let google_ads_id = jQuery("#new_google_ads_id").text();
416
  if(google_ads_id ==null || google_ads_id ==""){
417
+ google_ads_id = jQuery('#ads-account').val();
418
  }
419
 
420
  if (response.error === false) {
447
 
448
  /* get conversion list */
449
  function check_oradd_conversion_list(google_ads_id, tvc_data){
450
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
451
  if(google_ads_id ){
452
  var data = {
453
  action: "get_conversion_list",
525
  }
526
  /* get subscription details */
527
  function get_subscription_details(tvc_data, subscription_id) {
528
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
529
  $.ajax({
530
  type: "POST",
531
  dataType: "json",
535
  },
536
  success: function (response) {
537
  if (response.error === false) {
538
+ jQuery("#google_analytics_property_id_info").hide();
539
+ jQuery("#google_analytics_measurement_id_info").hide();
540
+ jQuery("#google_ads_info").hide();
541
+ jQuery("#google_merchant_center_info").hide();
542
  if(response.data.property_id != ""){
543
+ jQuery("#selected_google_analytics_property").text(response.data.property_id);
544
+ jQuery("#google_analytics_property_id_info").show();
545
  }
546
  if(response.data.measurement_id != ""){
547
+ jQuery("#selected_google_analytics_measurement").text(response.data.measurement_id);
548
+ jQuery("#google_analytics_measurement_id_info").show();
549
  }
550
  if(response.data.google_ads_id != ""){
551
+ jQuery("#selected_google_ads_account").text(response.data.google_ads_id);
552
+ jQuery("#google_ads_info").show();
553
  }
554
  if(response.data.google_merchant_center_id != ""){
555
+ jQuery("#selected_google_merchant_center").text(response.data.google_merchant_center_id);
556
+ jQuery("#google_merchant_center_info").show();
557
  }
558
+ jQuery('#tvc_confirm_submite').addClass('showpopup');
559
+ jQuery('body').addClass('scrlnone');
560
+ //jQuery('#tvc_confirm_submite').modal('show');
561
  } else {
562
  add_message("error","Error while fetching subscription data");
563
  }
569
  //call get list propertie function base on tracking_option
570
  function call_list_analytics_web_properties(tracking_option, tvc_data, page =1){
571
  if (tracking_option == 'UA'){
572
+ let web_property_id_length = jQuery('#ua_web_property_id_option option').length;
573
  if(web_property_id_length < 2 || page != 1){
574
  list_analytics_web_properties("UA", tvc_data, page);
575
  }else if( page != 1){
576
  list_analytics_web_properties("UA", tvc_data, page);
577
  }
578
  }else if (tracking_option == 'GA4' ){
579
+ let web_measurement_id_length = jQuery('#ga4_web_measurement_id_option option').length;
580
  if(web_measurement_id_length < 2){
581
  list_analytics_web_properties("GA4", tvc_data, page);
582
  }else if( page != 1){
583
  list_analytics_web_properties("GA4", tvc_data, page);
584
  }
585
  }else if (tracking_option == 'BOTH'){
586
+ let web_property_id_length = jQuery('#both_ua_web_property_id_option option').length;
587
+ let web_measurement_id_length = jQuery('#both_ga4_web_measurement_id_option option').length;
588
  if(web_measurement_id_length < 2 && web_property_id_length < 2){
589
  list_analytics_web_properties("BOTH", tvc_data);
590
  }else if(web_property_id_length < 2 ){
598
  // get list properties dropdown options
599
  function list_analytics_web_properties(type, tvc_data, page =1) {
600
  loaderSection(true);
601
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
602
  //console.log("page"+page);
603
  $.ajax({
604
  type: "POST",
611
  if (response != null && response.error == false) {
612
  if (type == "UA" || type == "BOTH") {
613
  //web_properties_dropdown
614
+ var subscriptionPropertyId = jQuery("#subscriptionPropertyId").val();
615
+ var ga_view_id = jQuery("#ga_view_id").val();
616
  var PropOptions = '';
617
 
618
  //console.log("call option");
629
  if(type == "BOTH"){
630
  s_tracking_option = "both_ua";
631
  }
632
+ jQuery("#"+s_tracking_option+"_web_property_id_option_val").attr("data-profileid",propValue.id);
633
  }else{
634
  selected = "";
635
  }
637
  });
638
  }else{
639
  //console.log("hide option");
640
+ jQuery(".tvc-ua-option-more").hide();
641
  }
642
+ jQuery('#ua_web_property_id_option > .tvc-select-items').append(PropOptions);
643
+ jQuery('#both_ua_web_property_id_option > .tvc-select-items').append(PropOptions);
644
  }
645
  if (type == "GA4" || type == "BOTH") {
646
  //web_measurement_dropdown
647
+ var subscriptionMeasurementId = jQuery("#subscriptionMeasurementId").val();
648
  var MeasOptions = '';
649
  if(response.data != null && response.data.wep_measurement.length > 0){
650
  $.each(response.data.wep_measurement, function (measKey, measValue) {
654
  if(type == "BOTH"){
655
  s_tracking_option = "both_ga4";
656
  }
657
+ jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr('data-name',web_property[1]);
658
  } else {
659
  var selected = "";
660
  }
662
  });
663
  }else{
664
  //console.log("hide option");
665
+ jQuery(".tvc-ga4-option-more").hide();
666
  }
667
+ jQuery('#ga4_web_measurement_id_option > .tvc-select-items').append(MeasOptions);
668
+ jQuery('#both_ga4_web_measurement_id_option > .tvc-select-items').append(MeasOptions);
669
  }
670
+ jQuery(".slect2bx").select2();
671
  }else if( response != null && response.error == true && response.errors != undefined){
672
  const errors = response.errors[0];
673
  add_message("error",errors);
680
  });
681
  }
682
  function call_list_googl_ads_account(tvc_data){
683
+ let ads_account_length = jQuery('#ads-account option').length;
684
  if(ads_account_length < 2){
685
  list_googl_ads_account(tvc_data);
686
  }
688
  // get list google ads dropdown options
689
  function list_googl_ads_account(tvc_data) {
690
  //loaderSection(true);
691
+ var selectedValue = jQuery("#subscriptionGoogleAdsId").val();
692
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
693
  $.ajax({
694
  type: "POST",
695
  dataType: "json",
697
  data: {action: "list_googl_ads_account", tvc_data:tvc_data, conversios_onboarding_nonce:conversios_onboarding_nonce},
698
  success: function (response) {
699
  if (response.error === false) {
700
+ jQuery('#ads-account').empty();
701
+ jQuery('#ads-account').append(jQuery('<option>', {
702
  value: "",
703
  text: "Select Google Ads Account"
704
  }));
708
  if(response.data.length > 0){
709
  $.each(response.data, function (key, value) {
710
  if (selectedValue == value) {
711
+ jQuery('#ads-account').append(jQuery('<option>', { value: value, text: value,selected: "selected"}));
712
  } else {
713
  if(selectedValue == "" && key == 0){
714
+ jQuery('#ads-account').append(jQuery('<option>', { value: value, text: value,selected: "selected"}));
715
  }else{
716
+ jQuery('#ads-account').append(jQuery('<option>', { value: value, text: value,}));
717
  }
718
  }
719
  });
728
  }
729
 
730
  function call_list_google_merchant_account(tvc_data){
731
+ let mcc_account_length = jQuery('#google_merchant_center_id option').length;
732
  if(mcc_account_length < 2){
733
  list_google_merchant_account(tvc_data);
734
  }
735
  }
736
  function list_google_merchant_account(tvc_data){
737
+ var selectedValue = jQuery("#subscriptionMerchantCenId").val();
738
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
739
  $.ajax({
740
  type: "POST",
741
  dataType: "json",
743
  data: {action: "list_google_merchant_account", tvc_data:tvc_data, conversios_onboarding_nonce:conversios_onboarding_nonce},
744
  success: function (response) {
745
  if (response.error === false){
746
+ jQuery('#google_merchant_center_id').empty();
747
+ jQuery('#google_merchant_center_id').append(jQuery('<option>', {value: "", text: "Select Measurement Id"}));
748
  if (response.data.length > 0) {
749
  $.each(response.data, function (key, value) {
750
  if(selectedValue == value.account_id){
751
+ jQuery('#google_merchant_center_id').append(jQuery('<option>', {value: value.account_id, "data-merchant_id": value.merchant_id, text: value.account_id,selected: "selected"}));
752
  }else{
753
  if(selectedValue == "" && key == 0){
754
+ jQuery('#google_merchant_center_id').append(jQuery('<option>', {value: value.account_id, "data-merchant_id": value.merchant_id, text: value.account_id,selected: "selected"}));
755
  }else{
756
+ jQuery('#google_merchant_center_id').append(jQuery('<option>', {value: value.account_id,"data-merchant_id": value.merchant_id, text: value.account_id, }));
757
  }
758
  }
759
  });
769
  }
770
  /* Create function */
771
  function create_google_ads_account(tvc_data){
772
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
773
  $.ajax({
774
  type: "POST",
775
  dataType: "json",
781
  success: function (response) {
782
  if (response.error === false) {
783
  add_message("success",response.data.message);
784
+ jQuery("#new_google_ads_id").text(response.data.adwords_id);
785
+ jQuery("#tvc_ads_section").slideUp();
786
+ jQuery("#new_google_ads_section").slideDown();
787
  //localStorage.setItem("new_google_ads_id", response.data.adwords_id);
788
  //listGoogleAdsAccount();
789
  } else {
795
  }
796
 
797
  function create_google_merchant_center_account(tvc_data){
798
+ var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
799
  var is_valide = true;
800
+ var website_url = jQuery("#url").val();
801
+ var email_address = jQuery("#get-mail").val();
802
+ var store_name = jQuery("#store_name").val();
803
+ var country = jQuery("#selectCountry").val();
804
+ var customer_id = jQuery("#loginCustomerId").val();
805
+ var adult_content = jQuery("#adult_content").is(':checked');
806
  if(website_url == ""){
807
  add_message("error","Missing value of website url.");
808
  is_valide = false;
815
  }else if(country == ""){
816
  add_message("error","Missing value of country.");
817
  is_valide = false;
818
+ } else if(jQuery('#terms_conditions').prop('checked') == false){
819
  add_message("error","Please I accept the terms and conditions.");
820
  is_valide = false;
821
  }
843
  success: function (response, status) {
844
  if (response.error === false || response.merchant_id != undefined) {
845
  add_message("success","New merchant center created successfully.");
846
+ jQuery("#new_merchant_id").text(response.account.id);
847
+ jQuery("#tvc_merchant_section").slideUp();
848
+ jQuery("#new_merchant_section").slideDown();
849
  } else if (response.error === true) {
850
  const errors = JSON.parse(response.errors[0]);
851
  add_message("error",errors.message);
852
  } else {
853
  add_message("error","There was error to create merchant center account");
854
  }
855
+ jQuery("#createmerchantpopup").removeClass('showpopup');
856
+ jQuery('body').removeClass('scrlnone');
857
+ //jQuery("#merchantconfirmModal").modal('hide');
858
  loaderSection(false);
859
  }
860
  });
admin/js/tvc-ee-custom.js CHANGED
@@ -1,5 +1,5 @@
1
  $=jQuery;
2
- $(function() {
3
  var conversion_funnel_chart = "";
4
  var conversion_bar_chart = "";
5
  var checkout_funnel_chart = "";
@@ -57,9 +57,9 @@ var tvc_helper = {
57
  },
58
  loaderSection:function(isShow) {
59
  if (isShow){
60
- $('#feed-spinner').show();
61
  }else{
62
- $('#feed-spinner').hide();
63
  }
64
  },
65
  get_google_analytics_reports:function(post_data){
@@ -153,10 +153,10 @@ var tvc_helper = {
153
  i = i+1;
154
  }
155
  });
156
- $("#campaign_performance_report table tbody").append(table_row);
157
- $("#campaign_performance_report table tbody").append(table_row_last);
158
  }else{
159
- $("#campaign_performance_report table tbody").append("<tr><td colspan='7'>Data not available</td></tr>");
160
  }
161
  //}
162
  },
@@ -431,7 +431,7 @@ var tvc_helper = {
431
  temp_div_id = "#s1_"+propValue['id']+" > .dash-smry-compare-val";
432
  v_this.display_field_val(temp_div_id, propValue, temp_val, 'rate', currency_code, plugin_url);
433
 
434
- //$("#s1_"+propValue['id']+" > .dash-smry-value").html(temp_val);
435
  }
436
 
437
  });
@@ -458,10 +458,10 @@ var tvc_helper = {
458
  table_row += '<td>'+propValue['productRefundAmount']+'</td>';
459
  table_row += '<td>'+propValue['cartToDetailRate']+'%</td>';
460
  table_row += '<td>'+propValue['buyToDetailRate']+'%</td></tr>';
461
- $("#product_performance_report table tbody").append(table_row);
462
  })
463
  }else{
464
- $("#product_performance_report table tbody").append("<tr><td colspan='10'>Data not available</td></tr>");
465
  }
466
  }
467
 
@@ -482,7 +482,7 @@ var tvc_helper = {
482
  table_row += '<td>'+((propValue["productDetailViews"]!=undefined)?propValue["productDetailViews"]:0)+'</td>';
483
  table_row += '<td>'+((propValue["users"]!=undefined)?propValue["users"]:0)+'</td>';
484
  table_row += '<td>'+((propValue["sessions"]!=undefined)?propValue["sessions"]:0)+'</td></tr>';
485
- $("#medium_performance_report table tbody").append(table_row);
486
  })
487
  }
488
  if(reports_typs.conversion_funnel.is_free || paln_type == 'paid'){
@@ -490,7 +490,7 @@ var tvc_helper = {
490
  this.set_ecommerce_conversion_funnel(basic_data,data.ecommerce_funnel.shoppingStage);
491
  this.set_ecommerce_checkout_funnel(data.ecommerce_funnel.shoppingStage);
492
  }else{
493
- $(".conversion_s1, .conversion_s2, .conversion_s3, .conversion_s4, .checkoutfunn_s1, .checkoutfunn_s2, .checkoutfunn_s3").html("");
494
  }
495
  }
496
  },
@@ -500,16 +500,16 @@ var tvc_helper = {
500
  **/
501
  var conversion_s1 = ((shoppingStage.PRODUCT_VIEW*100)/shoppingStage.ALL_VISITS).toFixed(2) || 0;
502
  if(conversion_s1 == 'NaN'){conversion_s1 = 0;}
503
- $(".conversion_s1").html(conversion_s1+"%");
504
  var conversion_s2 = ((shoppingStage.ADD_TO_CART*100)/shoppingStage.PRODUCT_VIEW).toFixed(2) || 0;
505
  if(conversion_s2 == 'NaN'){conversion_s2 = 0;}
506
- $(".conversion_s2").html(conversion_s2+"%");
507
  var conversion_s3 = ((shoppingStage.CHECKOUT*100)/shoppingStage.ADD_TO_CART).toFixed(2) || 0;
508
  if(conversion_s3 == 'NaN'){conversion_s3 = 0;}
509
- $(".conversion_s3").html(conversion_s3+"%");
510
  var conversion_s4 = ((shoppingStage.TRANSACTION*100)/shoppingStage.CHECKOUT).toFixed(2) || 0;
511
  if(conversion_s4 == 'NaN'){conversion_s4 = 0;}
512
- $(".conversion_s4").html(conversion_s4+"%");
513
 
514
  conversion_funnel_chart =document.getElementById('ecomfunchart').getContext('2d');
515
  var conversion_bluechartgradient = conversion_funnel_chart.createLinearGradient(0, 0, 0, 800);
@@ -601,13 +601,13 @@ var tvc_helper = {
601
 
602
  var conversion_s1 = ((data.CHECKOUT_2*100)/data.CHECKOUT_1).toFixed(2) || 0;
603
  if(conversion_s1 == 'NaN'){conversion_s1 = 0;}
604
- $(".checkoutfunn_s1").html(conversion_s1+"%");
605
  var conversion_s2 = ((data.CHECKOUT_3*100)/data.CHECKOUT_2).toFixed(2) || 0;
606
  if(conversion_s2 == 'NaN'){conversion_s2 = 0;}
607
- $(".checkoutfunn_s2").html(conversion_s2+"%");
608
  var conversion_s3 = ((data.TRANSACTION*100)/data.CHECKOUT_3).toFixed(2) || 0;
609
  if(conversion_s3 == 'NaN'){conversion_s3 = 0;}
610
- $(".checkoutfunn_s3").html(conversion_s3+"%");
611
 
612
  checkout_funnel_chart = document.getElementById('ecomcheckoutfunchart').getContext('2d');
613
  var bluechartgradient = checkout_funnel_chart.createLinearGradient(0, 0, 0, 800);
@@ -695,7 +695,7 @@ var tvc_helper = {
695
  display_field_val:function(div_id, field, field_val, field_type, currency_code, plugin_url){
696
  if(field_type == "currency"){
697
  var currency = this.get_currency_symbols(currency_code);
698
- $(div_id).html(currency +''+field_val);
699
  }else if(field_type == "rate"){
700
  field_val = parseFloat(field_val).toFixed(2);
701
  var img = "";
@@ -705,9 +705,9 @@ var tvc_helper = {
705
  img = '<img src="'+plugin_url+'/admin/images/green-up.png">';
706
  }
707
  }
708
- $(div_id).html(img+field_val+'%');
709
  }else {
710
- $(div_id).html(field_val);
711
  }
712
 
713
  },
@@ -717,14 +717,14 @@ var tvc_helper = {
717
  $.each(reg_section, function (propKey, propValue) {
718
  if(propValue.hasOwnProperty('main-class') && propValue.hasOwnProperty('loading-type')){
719
  if(propValue['loading-type'] == 'bgcolor'){
720
- //$("."+propValue['main-class']).addClass("is_loading");
721
  if(Object.keys(propValue['ajax_fields']).length > 0){
722
  $.each(propValue['ajax_fields'], function (propKey, propValue) {
723
- $("."+propValue['class']).removeClass("loading-bg-effect");
724
  });
725
  }
726
  }else if(propValue['loading-type'] == 'gif'){
727
- $("."+propValue['main-class']).removeClass("is_loading");
728
  }
729
 
730
  }
@@ -734,9 +734,9 @@ var tvc_helper = {
734
  },
735
  cleare_dashboard:function(){
736
  var v_this = this;
737
- $("#product_performance_report table tbody").html("");
738
- $("#medium_performance_report table tbody").html("");
739
- $("#campaign_performance_report table tbody").html("");
740
  var canvas = document.getElementById('ecomfunchart');
741
  if( canvas != null){
742
  var is_blank = this.is_canvas_blank(canvas);
@@ -773,14 +773,14 @@ var tvc_helper = {
773
  $.each(reg_section, function (propKey, propValue) {
774
  if(propValue.hasOwnProperty('main-class') && propValue.hasOwnProperty('loading-type')){
775
  if(propValue['loading-type'] == 'bgcolor'){
776
- //$("."+propValue['main-class']).addClass("is_loading");
777
  if(Object.keys(propValue['ajax_fields']).length > 0){
778
  $.each(propValue['ajax_fields'], function (propKey, propValue) {
779
- $("."+propValue['class']).addClass("loading-bg-effect");
780
  });
781
  }
782
  }else if(propValue['loading-type'] == 'gif'){
783
- $("."+propValue['main-class']).addClass("is_loading");
784
  }
785
 
786
  }
1
  $=jQuery;
2
+ jQuery(function() {
3
  var conversion_funnel_chart = "";
4
  var conversion_bar_chart = "";
5
  var checkout_funnel_chart = "";
57
  },
58
  loaderSection:function(isShow) {
59
  if (isShow){
60
+ jQuery('#feed-spinner').show();
61
  }else{
62
+ jQuery('#feed-spinner').hide();
63
  }
64
  },
65
  get_google_analytics_reports:function(post_data){
153
  i = i+1;
154
  }
155
  });
156
+ jQuery("#campaign_performance_report table tbody").append(table_row);
157
+ jQuery("#campaign_performance_report table tbody").append(table_row_last);
158
  }else{
159
+ jQuery("#campaign_performance_report table tbody").append("<tr><td colspan='7'>Data not available</td></tr>");
160
  }
161
  //}
162
  },
431
  temp_div_id = "#s1_"+propValue['id']+" > .dash-smry-compare-val";
432
  v_this.display_field_val(temp_div_id, propValue, temp_val, 'rate', currency_code, plugin_url);
433
 
434
+ //jQuery("#s1_"+propValue['id']+" > .dash-smry-value").html(temp_val);
435
  }
436
 
437
  });
458
  table_row += '<td>'+propValue['productRefundAmount']+'</td>';
459
  table_row += '<td>'+propValue['cartToDetailRate']+'%</td>';
460
  table_row += '<td>'+propValue['buyToDetailRate']+'%</td></tr>';
461
+ jQuery("#product_performance_report table tbody").append(table_row);
462
  })
463
  }else{
464
+ jQuery("#product_performance_report table tbody").append("<tr><td colspan='10'>Data not available</td></tr>");
465
  }
466
  }
467
 
482
  table_row += '<td>'+((propValue["productDetailViews"]!=undefined)?propValue["productDetailViews"]:0)+'</td>';
483
  table_row += '<td>'+((propValue["users"]!=undefined)?propValue["users"]:0)+'</td>';
484
  table_row += '<td>'+((propValue["sessions"]!=undefined)?propValue["sessions"]:0)+'</td></tr>';
485
+ jQuery("#medium_performance_report table tbody").append(table_row);
486
  })
487
  }
488
  if(reports_typs.conversion_funnel.is_free || paln_type == 'paid'){
490
  this.set_ecommerce_conversion_funnel(basic_data,data.ecommerce_funnel.shoppingStage);
491
  this.set_ecommerce_checkout_funnel(data.ecommerce_funnel.shoppingStage);
492
  }else{
493
+ jQuery(".conversion_s1, .conversion_s2, .conversion_s3, .conversion_s4, .checkoutfunn_s1, .checkoutfunn_s2, .checkoutfunn_s3").html("");
494
  }
495
  }
496
  },
500
  **/
501
  var conversion_s1 = ((shoppingStage.PRODUCT_VIEW*100)/shoppingStage.ALL_VISITS).toFixed(2) || 0;
502
  if(conversion_s1 == 'NaN'){conversion_s1 = 0;}
503
+ jQuery(".conversion_s1").html(conversion_s1+"%");
504
  var conversion_s2 = ((shoppingStage.ADD_TO_CART*100)/shoppingStage.PRODUCT_VIEW).toFixed(2) || 0;
505
  if(conversion_s2 == 'NaN'){conversion_s2 = 0;}
506
+ jQuery(".conversion_s2").html(conversion_s2+"%");
507
  var conversion_s3 = ((shoppingStage.CHECKOUT*100)/shoppingStage.ADD_TO_CART).toFixed(2) || 0;
508
  if(conversion_s3 == 'NaN'){conversion_s3 = 0;}
509
+ jQuery(".conversion_s3").html(conversion_s3+"%");
510
  var conversion_s4 = ((shoppingStage.TRANSACTION*100)/shoppingStage.CHECKOUT).toFixed(2) || 0;
511
  if(conversion_s4 == 'NaN'){conversion_s4 = 0;}
512
+ jQuery(".conversion_s4").html(conversion_s4+"%");
513
 
514
  conversion_funnel_chart =document.getElementById('ecomfunchart').getContext('2d');
515
  var conversion_bluechartgradient = conversion_funnel_chart.createLinearGradient(0, 0, 0, 800);
601
 
602
  var conversion_s1 = ((data.CHECKOUT_2*100)/data.CHECKOUT_1).toFixed(2) || 0;
603
  if(conversion_s1 == 'NaN'){conversion_s1 = 0;}
604
+ jQuery(".checkoutfunn_s1").html(conversion_s1+"%");
605
  var conversion_s2 = ((data.CHECKOUT_3*100)/data.CHECKOUT_2).toFixed(2) || 0;
606
  if(conversion_s2 == 'NaN'){conversion_s2 = 0;}
607
+ jQuery(".checkoutfunn_s2").html(conversion_s2+"%");
608
  var conversion_s3 = ((data.TRANSACTION*100)/data.CHECKOUT_3).toFixed(2) || 0;
609
  if(conversion_s3 == 'NaN'){conversion_s3 = 0;}
610
+ jQuery(".checkoutfunn_s3").html(conversion_s3+"%");
611
 
612
  checkout_funnel_chart = document.getElementById('ecomcheckoutfunchart').getContext('2d');
613
  var bluechartgradient = checkout_funnel_chart.createLinearGradient(0, 0, 0, 800);
695
  display_field_val:function(div_id, field, field_val, field_type, currency_code, plugin_url){
696
  if(field_type == "currency"){
697
  var currency = this.get_currency_symbols(currency_code);
698
+ jQuery(div_id).html(currency +''+field_val);
699
  }else if(field_type == "rate"){
700
  field_val = parseFloat(field_val).toFixed(2);
701
  var img = "";
705
  img = '<img src="'+plugin_url+'/admin/images/green-up.png">';
706
  }
707
  }
708
+ jQuery(div_id).html(img+field_val+'%');
709
  }else {
710
+ jQuery(div_id).html(field_val);
711
  }
712
 
713
  },
717
  $.each(reg_section, function (propKey, propValue) {
718
  if(propValue.hasOwnProperty('main-class') && propValue.hasOwnProperty('loading-type')){
719
  if(propValue['loading-type'] == 'bgcolor'){
720
+ //jQuery("."+propValue['main-class']).addClass("is_loading");
721
  if(Object.keys(propValue['ajax_fields']).length > 0){
722
  $.each(propValue['ajax_fields'], function (propKey, propValue) {
723
+ jQuery("."+propValue['class']).removeClass("loading-bg-effect");
724
  });
725
  }
726
  }else if(propValue['loading-type'] == 'gif'){
727
+ jQuery("."+propValue['main-class']).removeClass("is_loading");
728
  }
729
 
730
  }
734
  },
735
  cleare_dashboard:function(){
736
  var v_this = this;
737
+ jQuery("#product_performance_report table tbody").html("");
738
+ jQuery("#medium_performance_report table tbody").html("");
739
+ jQuery("#campaign_performance_report table tbody").html("");
740
  var canvas = document.getElementById('ecomfunchart');
741
  if( canvas != null){
742
  var is_blank = this.is_canvas_blank(canvas);
773
  $.each(reg_section, function (propKey, propValue) {
774
  if(propValue.hasOwnProperty('main-class') && propValue.hasOwnProperty('loading-type')){
775
  if(propValue['loading-type'] == 'bgcolor'){
776
+ //jQuery("."+propValue['main-class']).addClass("is_loading");
777
  if(Object.keys(propValue['ajax_fields']).length > 0){
778
  $.each(propValue['ajax_fields'], function (propKey, propValue) {
779
+ jQuery("."+propValue['class']).addClass("loading-bg-effect");
780
  });
781
  }
782
  }else if(propValue['loading-type'] == 'gif'){
783
+ jQuery("."+propValue['main-class']).addClass("is_loading");
784
  }
785
 
786
  }
admin/partials/class-conversios-header.php CHANGED
@@ -184,7 +184,7 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
184
  ?>
185
  <div id="feedback-form-wrapper">
186
  <div id="feedback_record_btn">
187
- <button type="button" class="feedback_btn">
188
  <?php esc_html_e("Feedback","conversios"); ?>
189
  </button>
190
  </div>
@@ -242,21 +242,21 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
242
  let lng = str.length;document.getElementById("charcount").innerHTML ='('+lng+'/300)';
243
  }
244
  jQuery(document).ready(function() {
245
- feedback_charcountupdate($('#feedback_description').val());
246
 
247
  jQuery("#feedback_record_btn").click(function(){
248
- setTimeout(() => { $("#feedback_form_modal").addClass("showpopup"); }, 500);
249
  });
250
  jQuery( "#customer_feedback_form" ).submit(function( event ) {
251
  event.preventDefault();
252
- let val_que_one=$('input[name="feedback_question_one"]:checked').val();
253
  if(val_que_one == "" || val_que_one == undefined ){
254
  tvc_helper.tvc_alert("error","","Please answer the required questions"); return false;}
255
- let val_que_two=$('input[name="feedback_question_two"]:checked').val();
256
  if(val_que_two == "" || val_que_two == undefined ){ return false;}
257
- let val_que_three=$('input[name="feedback_question_three"]:checked').val();
258
  if(val_que_three == "" || val_que_three == undefined ){ return false;}
259
- let feedback_description= $('#feedback_description').val();
260
  let customer_id="<?php echo $customerId; ?>";
261
  let subscription_id="<?php echo $subscriptionId; ?>";
262
  let formdata = {
@@ -275,7 +275,7 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
275
  data: formdata,
276
  beforeSend: function(){
277
  //tvc_helper.loaderSection(true);
278
- $("#customer_feedback_form").addClass("is_loading");
279
  },
280
  success: function(response){
281
  //console.log("response",response);
@@ -284,8 +284,8 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
284
  }else{
285
  tvc_helper.tvc_alert("error","",response.message);
286
  }
287
- $("#customer_feedback_form").removeClass("is_loading");
288
- $("#feedback_form_modal").removeClass("showpopup");
289
  }
290
  });
291
  });
184
  ?>
185
  <div id="feedback-form-wrapper">
186
  <div id="feedback_record_btn">
187
+ <button type="button" class="feedback_btn btn-11">
188
  <?php esc_html_e("Feedback","conversios"); ?>
189
  </button>
190
  </div>
242
  let lng = str.length;document.getElementById("charcount").innerHTML ='('+lng+'/300)';
243
  }
244
  jQuery(document).ready(function() {
245
+ feedback_charcountupdate(jQuery('#feedback_description').val());
246
 
247
  jQuery("#feedback_record_btn").click(function(){
248
+ setTimeout(() => { jQuery("#feedback_form_modal").addClass("showpopup"); }, 500);
249
  });
250
  jQuery( "#customer_feedback_form" ).submit(function( event ) {
251
  event.preventDefault();
252
+ let val_que_one=jQuery('input[name="feedback_question_one"]:checked').val();
253
  if(val_que_one == "" || val_que_one == undefined ){
254
  tvc_helper.tvc_alert("error","","Please answer the required questions"); return false;}
255
+ let val_que_two=jQuery('input[name="feedback_question_two"]:checked').val();
256
  if(val_que_two == "" || val_que_two == undefined ){ return false;}
257
+ let val_que_three=jQuery('input[name="feedback_question_three"]:checked').val();
258
  if(val_que_three == "" || val_que_three == undefined ){ return false;}
259
+ let feedback_description= jQuery('#feedback_description').val();
260
  let customer_id="<?php echo $customerId; ?>";
261
  let subscription_id="<?php echo $subscriptionId; ?>";
262
  let formdata = {
275
  data: formdata,
276
  beforeSend: function(){
277
  //tvc_helper.loaderSection(true);
278
+ jQuery("#customer_feedback_form").addClass("is_loading");
279
  },
280
  success: function(response){
281
  //console.log("response",response);
284
  }else{
285
  tvc_helper.tvc_alert("error","",response.message);
286
  }
287
+ jQuery("#customer_feedback_form").removeClass("is_loading");
288
+ jQuery("#feedback_form_modal").removeClass("showpopup");
289
  }
290
  });
291
  });
admin/partials/general-fields.php CHANGED
@@ -390,17 +390,17 @@ if(isset($google_detail['setting'])){
390
  echo get_connect_google_popup_html_to_active_licence();
391
  ?>
392
  <script>
393
- $(document).ready(function () {
394
- $(document).on('click','#tvc_google_connect_active_licence_close',function(event){
395
- $('#tvc_google_connect_active_licence').modal('hide');
396
  });
397
- $(document).on('click','.tvc_licence_key_change',function(event){
398
- $(".tvc_licence_key_change_wapper").slideUp(500);
399
- $(".tvc_licence_key_wapper").slideDown(700);
400
  });
401
- $(document).on('submit','form#tvc-licence-active',function(event){
402
  event.preventDefault();
403
- let licence_key = $("#licence_key").val();
404
  var form_data = jQuery("#tvc-licence-active").serialize();
405
  if(licence_key!=""){
406
  var data = {
@@ -423,7 +423,7 @@ $(document).ready(function () {
423
  }, 2000);
424
  }else{
425
  if( response.is_connect == false){
426
- $('#tvc_google_connect_active_licence').modal('show');
427
  }else{
428
  tvc_helper.tvc_alert("error","",response.message);
429
  }
390
  echo get_connect_google_popup_html_to_active_licence();
391
  ?>
392
  <script>
393
+ jQuery(document).ready(function () {
394
+ jQuery(document).on('click','#tvc_google_connect_active_licence_close',function(event){
395
+ jQuery('#tvc_google_connect_active_licence').modal('hide');
396
  });
397
+ jQuery(document).on('click','.tvc_licence_key_change',function(event){
398
+ jQuery(".tvc_licence_key_change_wapper").slideUp(500);
399
+ jQuery(".tvc_licence_key_wapper").slideDown(700);
400
  });
401
+ jQuery(document).on('submit','form#tvc-licence-active',function(event){
402
  event.preventDefault();
403
+ let licence_key = jQuery("#licence_key").val();
404
  var form_data = jQuery("#tvc-licence-active").serialize();
405
  if(licence_key!=""){
406
  var data = {
423
  }, 2000);
424
  }else{
425
  if( response.is_connect == false){
426
+ jQuery('#tvc_google_connect_active_licence').modal('show');
427
  }else{
428
  tvc_helper.tvc_alert("error","",response.message);
429
  }
enhanced-ecommerce-google-analytics.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Conversios.io - Google Analytics and Google Shopping plugin for WooCommerce
16
  * Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
17
  * Description: Automates eCommerce tracking in Google Analytics, dynamic remarkting in Google Ads, and provides complete Google Shopping features.
18
- * Version: 4.6.4
19
  * Author: Tatvic
20
  * Author URI: www.tatvic.com
21
  * License: GPL-2.0+
@@ -37,7 +37,7 @@ if ( ! defined( 'WPINC' ) ) {
37
  * Start at version 1.0.0 and use SemVer - https://semver.org
38
  * Rename this for your plugin and update it as you release new versions.
39
  */
40
- define( 'PLUGIN_TVC_VERSION', '4.6.4' );
41
  $fullName = plugin_basename( __FILE__ );
42
  $dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
43
  if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
15
  * Plugin Name: Conversios.io - Google Analytics and Google Shopping plugin for WooCommerce
16
  * Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
17
  * Description: Automates eCommerce tracking in Google Analytics, dynamic remarkting in Google Ads, and provides complete Google Shopping features.
18
+ * Version: 4.6.5
19
  * Author: Tatvic
20
  * Author URI: www.tatvic.com
21
  * License: GPL-2.0+
37
  * Start at version 1.0.0 and use SemVer - https://semver.org
38
  * Rename this for your plugin and update it as you release new versions.
39
  */
40
+ define( 'PLUGIN_TVC_VERSION', '4.6.5' );
41
  $fullName = plugin_basename( __FILE__ );
42
  $dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
43
  if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
includes/setup/account.php CHANGED
@@ -116,17 +116,17 @@ class TVC_Account {
116
  </div>
117
  <?php echo get_connect_google_popup_html_to_active_licence();?>
118
  <script>
119
- $(document).ready(function () {
120
- $(document).on('click','#tvc_google_connect_active_licence_close',function(event){
121
- $('#tvc_google_connect_active_licence').modal('hide');
122
  });
123
- $(document).on('click','.tvc_licence_key_change',function(event){
124
- $(".tvc_licence_key_change_wapper").slideUp(500);
125
- $(".tvc_licence_key_wapper").slideDown(700);
126
  });
127
- $(document).on('submit','form#tvc-licence-active',function(event){
128
  event.preventDefault();
129
- let licence_key = $("#licence_key").val();
130
  var form_data = jQuery("#tvc-licence-active").serialize();
131
  if(licence_key!=""){
132
  var data = {
@@ -149,7 +149,7 @@ $(document).ready(function () {
149
  }, 2000);
150
  }else{
151
  if( response.is_connect == false){
152
- $('#tvc_google_connect_active_licence').modal('show');
153
  }else{
154
  tvc_helper.tvc_alert("error","",response.message);
155
  }
116
  </div>
117
  <?php echo get_connect_google_popup_html_to_active_licence();?>
118
  <script>
119
+ jQuery(document).ready(function () {
120
+ jQuery(document).on('click','#tvc_google_connect_active_licence_close',function(event){
121
+ jQuery('#tvc_google_connect_active_licence').modal('hide');
122
  });
123
+ jQuery(document).on('click','.tvc_licence_key_change',function(event){
124
+ jQuery(".tvc_licence_key_change_wapper").slideUp(500);
125
+ jQuery(".tvc_licence_key_wapper").slideDown(700);
126
  });
127
+ jQuery(document).on('submit','form#tvc-licence-active',function(event){
128
  event.preventDefault();
129
+ let licence_key = jQuery("#licence_key").val();
130
  var form_data = jQuery("#tvc-licence-active").serialize();
131
  if(licence_key!=""){
132
  var data = {
149
  }, 2000);
150
  }else{
151
  if( response.is_connect == false){
152
+ jQuery('#tvc_google_connect_active_licence').modal('show');
153
  }else{
154
  tvc_helper.tvc_alert("error","",response.message);
155
  }
includes/setup/add-campaign.php CHANGED
@@ -269,8 +269,8 @@ class AddCampaign {
269
  </div>
270
 
271
  <script>
272
- $(document).ready(function() {
273
- $('.select2').select2();
274
  });
275
  jQuery('.create-merchant-center').addClass('active');
276
  jQuery('.create-google-ads').addClass('active');
@@ -306,7 +306,7 @@ class AddCampaign {
306
  );
307
  } */
308
  function showLoader() {
309
- if($('#campaign-name').val()!=''&&$('#campaign-budget').val()!=''){
310
  jQuery('#feed-spinner').css('display', 'block');
311
  }
312
  }
269
  </div>
270
 
271
  <script>
272
+ jQuery(document).ready(function() {
273
+ jQuery('.select2').select2();
274
  });
275
  jQuery('.create-merchant-center').addClass('active');
276
  jQuery('.create-google-ads').addClass('active');
306
  );
307
  } */
308
  function showLoader() {
309
+ if(jQuery('#campaign-name').val()!=''&& jQuery('#campaign-budget').val()!=''){
310
  jQuery('#feed-spinner').css('display', 'block');
311
  }
312
  }
includes/setup/class-conversios-dashboard.php CHANGED
@@ -122,7 +122,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
122
  public function current_js(){
123
  ?>
124
  <script>
125
- $( document ).ready(function() {
126
  /**
127
  * daterage script
128
  **/
@@ -135,16 +135,15 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
135
  var is_refresh_token_expire = '<?php echo esc_attr($this->is_refresh_token_expire); ?>';
136
  is_refresh_token_expire = (is_refresh_token_expire == "")?false:true;
137
  console.log(is_refresh_token_expire);
138
- //$(function() {
139
  var start = moment().subtract(30, 'days');
140
  var end = moment();
141
  function cb(start, end) {
142
  var start_date = start.format('DD/MM/YYYY') || 0,
143
  end_date = end.format('DD/MM/YYYY') || 0;
144
- $('span.daterangearea').html(start_date + ' - ' + end_date);
145
-
146
- /*var date_range = $.trim($(".report_range_val").text()).split('-');
147
 
 
148
  var start_date = $.trim(date_range[0].replace(/\//g,"-")) || 0,
149
  end_date = $.trim(date_range[1].replace(/\//g,"-")) || 0;*/
150
  var data = {
@@ -156,8 +155,8 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
156
  ga4_property_id:'<?php echo esc_attr($this->ga4_property_id); ?>',
157
  ga_currency :'<?php echo esc_attr($this->ga_currency); ?>',
158
  plugin_url:'<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL); ?>',
159
- start_date :$.trim(start_date.replace(/\//g,"-")),
160
- end_date :$.trim(end_date.replace(/\//g,"-")),
161
  g_mail:g_mail,
162
  google_ads_id:'<?php echo esc_attr($this->google_ads_id); ?>',
163
  conversios_nonce:'<?php echo wp_create_nonce( 'conversios_nonce' ); ?>'
@@ -173,7 +172,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
173
  tvc_helper.tvc_alert("error","","It seems the token to access your Google Analytics account is expired. Sign in with the connected email again to reactivate the token. <span class='google_connect_url'>Click here..</span>");
174
  }
175
  }
176
- $('#reportrange').daterangepicker({
177
  startDate: start,
178
  endDate: end,
179
  ranges: {
@@ -186,34 +185,34 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
186
  }
187
  }, cb);
188
  cb(start, end);
189
- //});
190
  //upgrds plan popup
191
- $(".upgrdsbrs-btn").on( "click", function() {
192
- $('.upgradsbscrptn-pp').addClass('showpopup');
193
- $('body').addClass('scrlnone');
194
  });
195
- $('body').click(function(evt){
196
- if($(evt.target).closest('.upgrdsbrs-btn, .upgradsbscrptnpp-cntr').length){
197
  return;
198
  }
199
- $('.upgradsbscrptn-pp').removeClass('showpopup');
200
- $('body').removeClass('scrlnone');
201
  });
202
- $(".clsbtntrgr").on( "click", function() {
203
- $(this).closest('.pp-modal').removeClass('showpopup');
204
- $('body').removeClass('scrlnone');
205
  });
206
  //upcoming_featur popup
207
- $(".upcoming-featur-btn").on( "click", function() {
208
- $('.upcoming_featur-btn-pp').addClass('showpopup');
209
- $('body').addClass('scrlnone');
210
  });
211
- $('body').click(function(evt){
212
- if($(evt.target).closest('.upcoming-featur-btn, .upgradsbscrptnpp-cntr').length){
213
  return;
214
  }
215
- $('.upcoming_featur-btn-pp').removeClass('showpopup');
216
- $('body').removeClass('scrlnone');
217
  });
218
  /**
219
  * Custom js code for API call
@@ -223,14 +222,14 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
223
  //var end_date = moment().subtract(1, 'days').format('YYYY-MM-DD');
224
 
225
 
226
- $(".prmoclsbtn").on( "click", function() {
227
- $(this).parents('.promobandtop').fadeOut()
228
  });
229
 
230
  /**
231
  * table responcive
232
  **/
233
- $('.mbl-table').basictable({
234
  breakpoint: 768
235
  });
236
 
@@ -238,7 +237,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
238
  * Convesios custom script
239
  */
240
  //Step-0
241
- $("#tvc_popup_box").on( "click",'span.google_connect_url', function() {
242
  console.log("call");
243
  const w =600; const h=650;
244
  const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
122
  public function current_js(){
123
  ?>
124
  <script>
125
+ jQuery( document ).ready(function() {
126
  /**
127
  * daterage script
128
  **/
135
  var is_refresh_token_expire = '<?php echo esc_attr($this->is_refresh_token_expire); ?>';
136
  is_refresh_token_expire = (is_refresh_token_expire == "")?false:true;
137
  console.log(is_refresh_token_expire);
138
+
139
  var start = moment().subtract(30, 'days');
140
  var end = moment();
141
  function cb(start, end) {
142
  var start_date = start.format('DD/MM/YYYY') || 0,
143
  end_date = end.format('DD/MM/YYYY') || 0;
144
+ jQuery('span.daterangearea').html(start_date + ' - ' + end_date);
 
 
145
 
146
+ /*var date_range = $.trim(jQuery(".report_range_val").text()).split('-');
147
  var start_date = $.trim(date_range[0].replace(/\//g,"-")) || 0,
148
  end_date = $.trim(date_range[1].replace(/\//g,"-")) || 0;*/
149
  var data = {
155
  ga4_property_id:'<?php echo esc_attr($this->ga4_property_id); ?>',
156
  ga_currency :'<?php echo esc_attr($this->ga_currency); ?>',
157
  plugin_url:'<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL); ?>',
158
+ start_date :jQuery.trim(start_date.replace(/\//g,"-")),
159
+ end_date :jQuery.trim(end_date.replace(/\//g,"-")),
160
  g_mail:g_mail,
161
  google_ads_id:'<?php echo esc_attr($this->google_ads_id); ?>',
162
  conversios_nonce:'<?php echo wp_create_nonce( 'conversios_nonce' ); ?>'
172
  tvc_helper.tvc_alert("error","","It seems the token to access your Google Analytics account is expired. Sign in with the connected email again to reactivate the token. <span class='google_connect_url'>Click here..</span>");
173
  }
174
  }
175
+ jQuery('#reportrange').daterangepicker({
176
  startDate: start,
177
  endDate: end,
178
  ranges: {
185
  }
186
  }, cb);
187
  cb(start, end);
188
+
189
  //upgrds plan popup
190
+ jQuery(".upgrdsbrs-btn").on( "click", function() {
191
+ jQuery('.upgradsbscrptn-pp').addClass('showpopup');
192
+ jQuery('body').addClass('scrlnone');
193
  });
194
+ jQuery('body').click(function(evt){
195
+ if(jQuery(evt.target).closest('.upgrdsbrs-btn, .upgradsbscrptnpp-cntr').length){
196
  return;
197
  }
198
+ jQuery('.upgradsbscrptn-pp').removeClass('showpopup');
199
+ jQuery('body').removeClass('scrlnone');
200
  });
201
+ jQuery(".clsbtntrgr").on( "click", function() {
202
+ jQuery(this).closest('.pp-modal').removeClass('showpopup');
203
+ jQuery('body').removeClass('scrlnone');
204
  });
205
  //upcoming_featur popup
206
+ jQuery(".upcoming-featur-btn").on( "click", function() {
207
+ jQuery('.upcoming_featur-btn-pp').addClass('showpopup');
208
+ jQuery('body').addClass('scrlnone');
209
  });
210
+ jQuery('body').click(function(evt){
211
+ if(jQuery(evt.target).closest('.upcoming-featur-btn, .upgradsbscrptnpp-cntr').length){
212
  return;
213
  }
214
+ jQuery('.upcoming_featur-btn-pp').removeClass('showpopup');
215
+ jQuery('body').removeClass('scrlnone');
216
  });
217
  /**
218
  * Custom js code for API call
222
  //var end_date = moment().subtract(1, 'days').format('YYYY-MM-DD');
223
 
224
 
225
+ jQuery(".prmoclsbtn").on( "click", function() {
226
+ jQuery(this).parents('.promobandtop').fadeOut()
227
  });
228
 
229
  /**
230
  * table responcive
231
  **/
232
+ jQuery('.mbl-table').basictable({
233
  breakpoint: 768
234
  });
235
 
237
  * Convesios custom script
238
  */
239
  //Step-0
240
+ jQuery("#tvc_popup_box").on( "click",'span.google_connect_url', function() {
241
  console.log("call");
242
  const w =600; const h=650;
243
  const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
includes/setup/class-tvc-product-sync-helper.php CHANGED
@@ -521,16 +521,16 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
521
  $shop_categories_list = $this->TVC_Admin_Helper->get_tvc_product_cat_list();
522
  ?>
523
  <script>
524
- $(document).ready(function() {
525
- $('#syncProduct .select2').each(function() {
526
- var $p = $(this).parent();
527
- $(this).select2({
528
  dropdownParent: $p
529
  });
530
  });
531
  });
532
 
533
- $(".tab-wizard").steps({
534
  headerTag: "h5",
535
  bodyTag: "section",
536
  transitionEffect: "fade",
@@ -544,7 +544,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
544
  var shop_categories = JSON.parse("<?php echo $shop_categories_list; ?>");
545
  var is_tvc_cat_selecte = false;
546
  shop_categories.forEach(function(v,i){
547
- if(is_tvc_cat_selecte == false && $("#category-"+v).val() != "" && $("#category-"+v).val() != 0){
548
  is_tvc_cat_selecte =true;
549
  return false;
550
  }
@@ -557,20 +557,20 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
557
  }
558
  },
559
  onStepChanged: function(event, currentIndex, priorIndex) {
560
- $('.steps .current').prevAll().addClass('disabled');
561
  },
562
  onFinished: function(event, currentIndex) {
563
  var valid=true;
564
  jQuery(".field-required").each(function() {
565
- if($(this).val()==0 && valid){
566
  valid=false;
567
- //$(this).select2('focus');
568
  }
569
  });
570
  if(!valid){
571
  tvc_helper.tvc_alert("error","","Please select all required fields");
572
  }else{
573
- $(".actions a[href='#finish']").prop( "disabled", true );
574
  submitProductSyncUp();
575
 
576
  }//check for required fields end
@@ -579,7 +579,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
579
 
580
  function submitProductSyncUp(sync_progressive_data = null){
581
  jQuery("#feed-spinner").css("display", "block");
582
- $('.progress-bar-wapper').addClass('open');
583
  var data = {
584
  action:'tvcajax_product_sync_bantch_wise',
585
  merchant_id:'<?php echo esc_attr($this->merchantId); ?>',
@@ -590,7 +590,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
590
  product_batch_size: jQuery("#product_batch_size").val(),
591
  sync_progressive_data:sync_progressive_data
592
  }
593
- $.ajax({
594
  type: "POST",
595
  dataType: "json",
596
  url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
@@ -634,7 +634,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
634
  submitProductSyncUp(response.sync_progressive_data);
635
  }else if(sync_step == 2 ){
636
  setTimeout(function(){
637
- $('.progress-bar-wapper').removeClass('open');
638
  jQuery(".tvc-sync-progress-bar").css("width","0%");
639
  jQuery(".tvc-sync-success-progress-bar").css("width","0%");
640
  jQuery(".tvc-sync-progress-bar").html("0%");
@@ -667,11 +667,11 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
667
  });
668
  }
669
 
670
- $(document).on("show.bs.modal", "#syncProduct", function (e) {
671
  jQuery("#feed-spinner").css("display", "block");
672
  selectCategory();
673
- $("select[id^=catmap]").each(function(){
674
- removeChildCategory($(this).attr("id"))
675
  });
676
  });
677
 
@@ -690,11 +690,11 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
690
  function( response ) {
691
  var categories = JSON.parse(response);
692
  var obj;
693
- $("select[id^=catmap]").each(function(){
694
- obj = $("#catmap-"+$(this).attr("catid")+"_0");
695
  obj.empty();
696
  obj.append("<option id='0' value='0' resourcename='0'>Select a category</option>");
697
- $.each(categories, function (i, value) {
698
  obj.append("<option id=" + JSON.stringify(value.id) + " value=" + JSON.stringify(value.id) + " resourceName=" + JSON.stringify(value.resourceName) + ">" + value.name + "</option>");
699
  });
700
  });
@@ -708,11 +708,11 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
708
  var GmcCategoryId;
709
  var GmcParent;
710
  selectId = thisObj.id;
711
- wooCategoryId = $(thisObj).attr("catid");
712
- GmcCategoryId = $(thisObj).find(":selected").val();
713
- GmcParent = $(thisObj).find(":selected").attr("resourcename");
714
- //$("#"+selectId).select2().find(":selected").val();
715
- // $("#"+selectId).select2().find(":selected").data("id");
716
  //console.log(selectId+"--"+wooCategoryId+"--"+GmcCategoryId+"--"+GmcParent);
717
 
718
  jQuery("#feed-spinner").css("display", "block");
@@ -737,14 +737,14 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
737
  if(categories.length === 0){
738
  }else{
739
  //console.log(newId);
740
- $("#"+newId).empty();
741
- $("#"+newId).append("<option id='0' value='0' resourcename='0'>Select a sub-category</option>");
742
- $.each(categories, function (i, value) {
743
- $("#"+newId).append("<option id=" + JSON.stringify(value.id) + " value=" + JSON.stringify(value.id) + " resourceName=" + JSON.stringify(value.resourceName) + ">" + value.name + "</option>");
744
  });
745
- $("#"+newId).addClass("form-control");
746
- //$("#"+newId).select2();
747
- $("#"+newId).css("display", "block");
748
  }
749
  jQuery("#feed-spinner").css("display", "none");
750
  }
@@ -757,14 +757,14 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
757
  var childEleId;
758
  for (i = ++currentSplit[1]; i < 6; i++) {
759
  childEleId = currentSplit[0]+"_"+ i;
760
- //console.log($("#"+childEleId));
761
- $("#"+childEleId).empty();
762
- $("#"+childEleId).removeClass("form-control");
763
- $("#"+childEleId).css("display", "none");
764
- if ($("#"+childEleId).data("select2")) {
765
- $("#"+childEleId).off("select2:select");
766
- $("#"+childEleId).select2("destroy");
767
- $("#"+childEleId).removeClass("select2");
768
  }
769
  }
770
  }
@@ -772,23 +772,23 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
772
  function selectChildCategoryValue(wooCategoryId){
773
  var childCatvala;
774
  for(i = 0; i < 6; i++){
775
- childCatvala = $("#catmap-"+wooCategoryId+"_"+i).find(":selected").attr("id");
776
- childCatname = $("#catmap-"+wooCategoryId+"_"+i).find(":selected").text();
777
- if($("#catmap-"+wooCategoryId+"_"+0).find(":selected").attr("id") <= 0){
778
- $("#category-"+wooCategoryId).val(0);
779
  }else{
780
  if(childCatvala > 0){
781
- $("#category-"+wooCategoryId).val(childCatvala);
782
- $("#category-name-"+wooCategoryId).val(childCatname);
783
  }
784
  }
785
  }
786
  }
787
- $( ".wizard-content" ).on( "click", ".change_prodct_feed_cat", function() {
788
- // console.log( $( this ).attr("data-id") );
789
- $(this).hide();
790
- var feed_select_cat_id = $( this ).attr("data-id");
791
- var woo_cat_id = $( this ).attr("data-cat-id");
792
  jQuery("#category-"+woo_cat_id).val("0");
793
  jQuery("#category-name-"+woo_cat_id).val("");
794
  jQuery("#label-"+feed_select_cat_id).hide();
521
  $shop_categories_list = $this->TVC_Admin_Helper->get_tvc_product_cat_list();
522
  ?>
523
  <script>
524
+ jQuery(document).ready(function() {
525
+ jQuery('#syncProduct .select2').each(function() {
526
+ var $p = jQuery(this).parent();
527
+ jQuery(this).select2({
528
  dropdownParent: $p
529
  });
530
  });
531
  });
532
 
533
+ jQuery(".tab-wizard").steps({
534
  headerTag: "h5",
535
  bodyTag: "section",
536
  transitionEffect: "fade",
544
  var shop_categories = JSON.parse("<?php echo $shop_categories_list; ?>");
545
  var is_tvc_cat_selecte = false;
546
  shop_categories.forEach(function(v,i){
547
+ if(is_tvc_cat_selecte == false && jQuery("#category-"+v).val() != "" && jQuery("#category-"+v).val() != 0){
548
  is_tvc_cat_selecte =true;
549
  return false;
550
  }
557
  }
558
  },
559
  onStepChanged: function(event, currentIndex, priorIndex) {
560
+ jQuery('.steps .current').prevAll().addClass('disabled');
561
  },
562
  onFinished: function(event, currentIndex) {
563
  var valid=true;
564
  jQuery(".field-required").each(function() {
565
+ if(jQuery(this).val()==0 && valid){
566
  valid=false;
567
+ //jQuery(this).select2('focus');
568
  }
569
  });
570
  if(!valid){
571
  tvc_helper.tvc_alert("error","","Please select all required fields");
572
  }else{
573
+ jQuery(".actions a[href='#finish']").prop( "disabled", true );
574
  submitProductSyncUp();
575
 
576
  }//check for required fields end
579
 
580
  function submitProductSyncUp(sync_progressive_data = null){
581
  jQuery("#feed-spinner").css("display", "block");
582
+ jQuery('.progress-bar-wapper').addClass('open');
583
  var data = {
584
  action:'tvcajax_product_sync_bantch_wise',
585
  merchant_id:'<?php echo esc_attr($this->merchantId); ?>',
590
  product_batch_size: jQuery("#product_batch_size").val(),
591
  sync_progressive_data:sync_progressive_data
592
  }
593
+ jQuery.ajax({
594
  type: "POST",
595
  dataType: "json",
596
  url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
634
  submitProductSyncUp(response.sync_progressive_data);
635
  }else if(sync_step == 2 ){
636
  setTimeout(function(){
637
+ jQuery('.progress-bar-wapper').removeClass('open');
638
  jQuery(".tvc-sync-progress-bar").css("width","0%");
639
  jQuery(".tvc-sync-success-progress-bar").css("width","0%");
640
  jQuery(".tvc-sync-progress-bar").html("0%");
667
  });
668
  }
669
 
670
+ jQuery(document).on("show.bs.modal", "#syncProduct", function (e) {
671
  jQuery("#feed-spinner").css("display", "block");
672
  selectCategory();
673
+ jQuery("select[id^=catmap]").each(function(){
674
+ removeChildCategory(jQuery(this).attr("id"))
675
  });
676
  });
677
 
690
  function( response ) {
691
  var categories = JSON.parse(response);
692
  var obj;
693
+ jQuery("select[id^=catmap]").each(function(){
694
+ obj = jQuery("#catmap-"+jQuery(this).attr("catid")+"_0");
695
  obj.empty();
696
  obj.append("<option id='0' value='0' resourcename='0'>Select a category</option>");
697
+ jQuery.each(categories, function (i, value) {
698
  obj.append("<option id=" + JSON.stringify(value.id) + " value=" + JSON.stringify(value.id) + " resourceName=" + JSON.stringify(value.resourceName) + ">" + value.name + "</option>");
699
  });
700
  });
708
  var GmcCategoryId;
709
  var GmcParent;
710
  selectId = thisObj.id;
711
+ wooCategoryId = jQuery(thisObj).attr("catid");
712
+ GmcCategoryId = jQuery(thisObj).find(":selected").val();
713
+ GmcParent = jQuery(thisObj).find(":selected").attr("resourcename");
714
+ //jQuery("#"+selectId).select2().find(":selected").val();
715
+ // jQuery("#"+selectId).select2().find(":selected").data("id");
716
  //console.log(selectId+"--"+wooCategoryId+"--"+GmcCategoryId+"--"+GmcParent);
717
 
718
  jQuery("#feed-spinner").css("display", "block");
737
  if(categories.length === 0){
738
  }else{
739
  //console.log(newId);
740
+ jQuery("#"+newId).empty();
741
+ jQuery("#"+newId).append("<option id='0' value='0' resourcename='0'>Select a sub-category</option>");
742
+ jQuery.each(categories, function (i, value) {
743
+ jQuery("#"+newId).append("<option id=" + JSON.stringify(value.id) + " value=" + JSON.stringify(value.id) + " resourceName=" + JSON.stringify(value.resourceName) + ">" + value.name + "</option>");
744
  });
745
+ jQuery("#"+newId).addClass("form-control");
746
+ //jQuery("#"+newId).select2();
747
+ jQuery("#"+newId).css("display", "block");
748
  }
749
  jQuery("#feed-spinner").css("display", "none");
750
  }
757
  var childEleId;
758
  for (i = ++currentSplit[1]; i < 6; i++) {
759
  childEleId = currentSplit[0]+"_"+ i;
760
+ //console.log(jQuery("#"+childEleId));
761
+ jQuery("#"+childEleId).empty();
762
+ jQuery("#"+childEleId).removeClass("form-control");
763
+ jQuery("#"+childEleId).css("display", "none");
764
+ if (jQuery("#"+childEleId).data("select2")) {
765
+ jQuery("#"+childEleId).off("select2:select");
766
+ jQuery("#"+childEleId).select2("destroy");
767
+ jQuery("#"+childEleId).removeClass("select2");
768
  }
769
  }
770
  }
772
  function selectChildCategoryValue(wooCategoryId){
773
  var childCatvala;
774
  for(i = 0; i < 6; i++){
775
+ childCatvala = jQuery("#catmap-"+wooCategoryId+"_"+i).find(":selected").attr("id");
776
+ childCatname = jQuery("#catmap-"+wooCategoryId+"_"+i).find(":selected").text();
777
+ if(jQuery("#catmap-"+wooCategoryId+"_"+0).find(":selected").attr("id") <= 0){
778
+ jQuery("#category-"+wooCategoryId).val(0);
779
  }else{
780
  if(childCatvala > 0){
781
+ jQuery("#category-"+wooCategoryId).val(childCatvala);
782
+ jQuery("#category-name-"+wooCategoryId).val(childCatname);
783
  }
784
  }
785
  }
786
  }
787
+ jQuery( ".wizard-content" ).on( "click", ".change_prodct_feed_cat", function() {
788
+ // console.log( jQuery( this ).attr("data-id") );
789
+ jQuery(this).hide();
790
+ var feed_select_cat_id = jQuery( this ).attr("data-id");
791
+ var woo_cat_id = jQuery( this ).attr("data-cat-id");
792
  jQuery("#category-"+woo_cat_id).val("0");
793
  jQuery("#category-name-"+woo_cat_id).val("");
794
  jQuery("#label-"+feed_select_cat_id).hide();
includes/setup/google-shopping-feed-gaa-config.php CHANGED
@@ -30,7 +30,7 @@ class GAAConfiguration {
30
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message));
31
  ?>
32
  <script>
33
- $(document).ready(function() {
34
  var msg="<?php echo esc_html($message);?>"
35
  tvc_helper.tvc_alert("success","Hey!",msg,true);
36
  });
@@ -144,8 +144,8 @@ if(isset($googleDetail->google_merchant_center_id) && esc_attr($googleDetail->go
144
  $is_need_to_domain_claim = true;
145
  }?>
146
  <script type="text/javascript">
147
- $(document).ready(function() {
148
- $(document).on("click", "#tvc_btn_product_sync", function(event){
149
  var is_need_to_domain_claim = "<?php echo esc_attr($is_need_to_domain_claim); ?>";
150
  if(is_need_to_domain_claim == 1 || is_need_to_domain_claim == true){
151
  event.preventDefault();
30
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message));
31
  ?>
32
  <script>
33
+ jQuery(document).ready(function() {
34
  var msg="<?php echo esc_html($message);?>"
35
  tvc_helper.tvc_alert("success","Hey!",msg,true);
36
  });
144
  $is_need_to_domain_claim = true;
145
  }?>
146
  <script type="text/javascript">
147
+ jQuery(document).ready(function() {
148
+ jQuery(document).on("click", "#tvc_btn_product_sync", function(event){
149
  var is_need_to_domain_claim = "<?php echo esc_attr($is_need_to_domain_claim); ?>";
150
  if(is_need_to_domain_claim == 1 || is_need_to_domain_claim == true){
151
  event.preventDefault();
includes/setup/google-shopping-feed-shopping-campaigns.php CHANGED
@@ -393,8 +393,8 @@ class CampaignsConfiguration
393
  </div>
394
  </div>
395
  <script type="text/javascript">
396
- $(document).ready(function() {
397
- $(".select2").select2();
398
  });
399
 
400
  var ctx = document.getElementById('dailyClick').getContext('2d');
@@ -716,11 +716,11 @@ class CampaignsConfiguration
716
  });
717
 
718
  function validateAll() {
719
- if ($("#customRange1").prop("checked")==true) {
720
  jQuery("#date_range_form").submit();
721
  }
722
 
723
- if ($("#customRange2").prop("checked")==true) {
724
  if(document.getElementById("from_date").value == "" || document.getElementById("to_date").value == "") {
725
  document.getElementById("errorMessage").classList.remove("hidden");
726
  } else {
393
  </div>
394
  </div>
395
  <script type="text/javascript">
396
+ jQuery(document).ready(function() {
397
+ jQuery(".select2").select2();
398
  });
399
 
400
  var ctx = document.getElementById('dailyClick').getContext('2d');
716
  });
717
 
718
  function validateAll() {
719
+ if (jQuery("#customRange1").prop("checked")==true) {
720
  jQuery("#date_range_form").submit();
721
  }
722
 
723
+ if (jQuery("#customRange2").prop("checked")==true) {
724
  if(document.getElementById("from_date").value == "" || document.getElementById("to_date").value == "") {
725
  document.getElementById("errorMessage").classList.remove("hidden");
726
  } else {
includes/setup/google-shopping-feed-sync-product.php CHANGED
@@ -34,7 +34,7 @@ public function create_form(){
34
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message));
35
  ?>
36
  <script>
37
- $(document).ready(function() {
38
  var msg="<?php echo esc_attr($message);?>"
39
  tvc_helper.tvc_alert("success", "<?php esc_html_e("Congratulation..!","conversios"); ?>", msg, true);
40
  });
@@ -211,9 +211,9 @@ if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merc
211
  $is_need_to_domain_claim = true;
212
  }?>
213
  <script type="text/javascript">
214
- $(document).ready(function() {
215
  //data table js
216
- $('#tvc-sync-product-list').DataTable({
217
  "ordering": false,
218
  "scrollY": "600px",
219
  "lengthMenu": [ 10, 20, 50, 100, 200 ]
@@ -226,10 +226,10 @@ $(document).ready(function() {
226
  });
227
  //Update syncup detail by ajax call
228
  function call_tvc_api_sync_up(){
229
- var tvs_this = $("#refresh_api");
230
- $("#tvc_msg").remove();
231
- $("#refresh_api").css("visibility","hidden");
232
- $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
233
  tvc_helper.tvc_alert("error","<?php esc_html_e("Attention !","conversios"); ?>", "<?php esc_html_e("Sync up is in the process do not refresh the page. it may take few minutes, if GMC product sync count is large.","conversios"); ?>");
234
  ImportGMCProduct();
235
  }
@@ -243,10 +243,10 @@ function ImportGMCProduct(next_page_token = null){
243
  if(rsp.error == false && rsp.api_rs.next_page_token != "" ){
244
  total_import = total_import+rsp.api_rs.sync_product;
245
  if(rsp.api_rs.next_page_token != null){
246
- $("#products_count").html("- "+total_import);
247
  ImportGMCProduct(rsp.api_rs.next_page_token);
248
  }else{
249
- $("#tvc-nb-spinner").remove();
250
  tvc_helper.tvc_alert("success","",rsp.message,true,3000);
251
  setTimeout(function(){ location.reload();}, 3000);
252
  }
34
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message));
35
  ?>
36
  <script>
37
+ jQuery(document).ready(function() {
38
  var msg="<?php echo esc_attr($message);?>"
39
  tvc_helper.tvc_alert("success", "<?php esc_html_e("Congratulation..!","conversios"); ?>", msg, true);
40
  });
211
  $is_need_to_domain_claim = true;
212
  }?>
213
  <script type="text/javascript">
214
+ jQuery(document).ready(function() {
215
  //data table js
216
+ jQuery('#tvc-sync-product-list').DataTable({
217
  "ordering": false,
218
  "scrollY": "600px",
219
  "lengthMenu": [ 10, 20, 50, 100, 200 ]
226
  });
227
  //Update syncup detail by ajax call
228
  function call_tvc_api_sync_up(){
229
+ var tvs_this = jQuery("#refresh_api");
230
+ jQuery("#tvc_msg").remove();
231
+ jQuery("#refresh_api").css("visibility","hidden");
232
+ jQuery(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
233
  tvc_helper.tvc_alert("error","<?php esc_html_e("Attention !","conversios"); ?>", "<?php esc_html_e("Sync up is in the process do not refresh the page. it may take few minutes, if GMC product sync count is large.","conversios"); ?>");
234
  ImportGMCProduct();
235
  }
243
  if(rsp.error == false && rsp.api_rs.next_page_token != "" ){
244
  total_import = total_import+rsp.api_rs.sync_product;
245
  if(rsp.api_rs.next_page_token != null){
246
+ jQuery("#products_count").html("- "+total_import);
247
  ImportGMCProduct(rsp.api_rs.next_page_token);
248
  }else{
249
+ jQuery("#tvc-nb-spinner").remove();
250
  tvc_helper.tvc_alert("success","",rsp.message,true,3000);
251
  setTimeout(function(){ location.reload();}, 3000);
252
  }
includes/setup/google-shopping-feed.php CHANGED
@@ -256,8 +256,8 @@ class GoogleShoppingFeed {
256
  <script type="text/javascript">
257
  function call_site_verified(){
258
  var tvs_this = event.target;
259
- $("#refresh_call_site_verified").css("visibility","hidden");
260
- $(tvs_this).after('<div class="domain-claim-spinner tvc-nb-spinner" id="site-verified-spinner"></div>');
261
  jQuery.post(tvc_ajax_url,{
262
  action: "tvc_call_site_verified"
263
  },function( response ){
@@ -268,13 +268,13 @@ class GoogleShoppingFeed {
268
  }else{
269
  tvc_helper.tvc_alert("error","",rsp.message,true);
270
  }
271
- $("#site-verified-spinner").remove();
272
  });
273
  }
274
  function call_domain_claim(){
275
  var tvs_this = event.target;
276
- $("#refresh_call_domain_claim").css("visibility","hidden");
277
- $(tvs_this).after('<div class="domain-claim-spinner tvc-nb-spinner" id="domain-claim-spinner"></div>');
278
  jQuery.post(tvc_ajax_url,{
279
  action: "tvc_call_domain_claim"
280
  },function( response ){
@@ -286,27 +286,27 @@ class GoogleShoppingFeed {
286
  }else{
287
  tvc_helper.tvc_alert("error","",rsp.message,true)
288
  }
289
- $("#domain-claim-spinner").remove();
290
  });
291
  }
292
- $(document).ready(function() {
293
  var is_need_to_update = "<?php echo esc_attr($is_need_to_update); ?>";
294
  if(is_need_to_update == 1 || is_need_to_update == true){
295
  call_tvc_api_sync_up();
296
  }
297
  });
298
  function call_tvc_api_sync_up(){
299
- var tvs_this = $("#refresh_api");
300
- $("#tvc_msg").remove();
301
- $("#refresh_api").css("visibility","hidden");
302
- $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
303
  tvc_helper.tvc_alert("error","<?php esc_html_e("Attention !","conversios"); ?>","<?php esc_html_e("Sync up is in the process do not refresh the page. it may take few minutes.","conversios"); ?>");
304
  jQuery.post(tvc_ajax_url,{
305
  action: "tvc_call_api_sync"
306
  },function( response ){
307
  var rsp = JSON.parse(response);
308
  if(rsp.error == false){
309
- $("#tvc-nb-spinner").remove();
310
  tvc_helper.tvc_alert("success","",rsp.message,true,2000);
311
  }else{
312
  tvc_helper.tvc_alert("error","",rsp.message,true,2000);
256
  <script type="text/javascript">
257
  function call_site_verified(){
258
  var tvs_this = event.target;
259
+ jQuery("#refresh_call_site_verified").css("visibility","hidden");
260
+ jQuery(tvs_this).after('<div class="domain-claim-spinner tvc-nb-spinner" id="site-verified-spinner"></div>');
261
  jQuery.post(tvc_ajax_url,{
262
  action: "tvc_call_site_verified"
263
  },function( response ){
268
  }else{
269
  tvc_helper.tvc_alert("error","",rsp.message,true);
270
  }
271
+ jQuery("#site-verified-spinner").remove();
272
  });
273
  }
274
  function call_domain_claim(){
275
  var tvs_this = event.target;
276
+ jQuery("#refresh_call_domain_claim").css("visibility","hidden");
277
+ jQuery(tvs_this).after('<div class="domain-claim-spinner tvc-nb-spinner" id="domain-claim-spinner"></div>');
278
  jQuery.post(tvc_ajax_url,{
279
  action: "tvc_call_domain_claim"
280
  },function( response ){
286
  }else{
287
  tvc_helper.tvc_alert("error","",rsp.message,true)
288
  }
289
+ jQuery("#domain-claim-spinner").remove();
290
  });
291
  }
292
+ jQuery(document).ready(function() {
293
  var is_need_to_update = "<?php echo esc_attr($is_need_to_update); ?>";
294
  if(is_need_to_update == 1 || is_need_to_update == true){
295
  call_tvc_api_sync_up();
296
  }
297
  });
298
  function call_tvc_api_sync_up(){
299
+ var tvs_this = jQuery("#refresh_api");
300
+ jQuery("#tvc_msg").remove();
301
+ jQuery("#refresh_api").css("visibility","hidden");
302
+ jQuery(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
303
  tvc_helper.tvc_alert("error","<?php esc_html_e("Attention !","conversios"); ?>","<?php esc_html_e("Sync up is in the process do not refresh the page. it may take few minutes.","conversios"); ?>");
304
  jQuery.post(tvc_ajax_url,{
305
  action: "tvc_call_api_sync"
306
  },function( response ){
307
  var rsp = JSON.parse(response);
308
  if(rsp.error == false){
309
+ jQuery("#tvc-nb-spinner").remove();
310
  tvc_helper.tvc_alert("success","",rsp.message,true,2000);
311
  }else{
312
  tvc_helper.tvc_alert("error","",rsp.message,true,2000);
includes/setup/help-html.php CHANGED
@@ -100,15 +100,15 @@ function get_tvc_google_ads_help_html(){
100
  </div>
101
  <script>
102
  let rtl= <?php echo (is_rtl())?"true":"false"; ?>;
103
- $(".tvc-help-slider").slick({
104
  autoplay: false,
105
  dots: false,
106
- prevArrow:$('.h-page-prev'),
107
- nextArrow:$('.h-page-next'),
108
  rtl:rtl
109
  });
110
- $(".tvc-help-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
111
- $("#paging_info").html(nextSlide+1);
112
  });
113
  </script>
114
  <div class="right-content">
@@ -141,15 +141,15 @@ function get_tvc_google_ads_help_html(){
141
  </div>
142
  <script>
143
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
144
- $(".tvc-b-value-slider").slick({
145
  autoplay: false,
146
  dots: false,
147
- prevArrow:$('.b-page-prev'),
148
- nextArrow:$('.b-page-next'),
149
  rtl:rtl
150
  });
151
- $(".tvc-b-value-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
152
- $("#b-paging-info").html(nextSlide+1);
153
  });
154
  </script>
155
  <?php
@@ -184,15 +184,15 @@ function get_tvc_help_html(){
184
  </div>
185
  <script>
186
  let rtl= <?php echo (is_rtl())?"true":"false"; ?>;
187
- $(".tvc-help-slider").slick({
188
  autoplay: false,
189
  dots: false,
190
- prevArrow:$('.h-page-prev'),
191
- nextArrow:$('.h-page-next'),
192
  rtl:rtl
193
  });
194
- $(".tvc-help-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
195
- $("#paging_info").html(nextSlide+1);
196
  });
197
  </script>
198
  <div class="right-content">
@@ -224,15 +224,15 @@ function get_tvc_help_html(){
224
  </div>
225
  <script>
226
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
227
- $(".tvc-b-value-slider").slick({
228
  autoplay: false,
229
  dots: false,
230
- prevArrow:$('.b-page-prev'),
231
- nextArrow:$('.b-page-next'),
232
  rtl:rtl
233
  });
234
- $(".tvc-b-value-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
235
- $("#b-paging-info").html(nextSlide+1);
236
  });
237
  </script>
238
  <?php
@@ -281,14 +281,14 @@ function get_tvc_google_ga_sidebar(){
281
  </nav>
282
  </div>
283
  <script>
284
- $(".tvc-help-slider").slick({
285
  autoplay: false,
286
  dots: false,
287
- prevArrow:$('.help-ga-prev'),
288
- nextArrow:$('.help-ga-next')
289
  });
290
- $(".tvc-help-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
291
- $("#help_ga_paging_info").html(nextSlide+1);
292
  });
293
  </script>
294
  <div class="right-content">
@@ -324,14 +324,14 @@ function get_tvc_google_ga_sidebar(){
324
  <a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/Installation-Manual.pdf"); ?>" tabindex="0"> <?php esc_html_e("Installation manual","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/Google-shopping-Guide.pdf"); ?>" tabindex="0"> <?php esc_html_e("Google shopping guide","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url_raw("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" tabindex="0"> <?php esc_html_e("FAQ","conversios"); ?></a>
325
  </div>
326
  <script>
327
- $(".tvc-b-value-slider").slick({
328
  autoplay: false,
329
  dots: false,
330
- prevArrow:$('.value-ga-prev'),
331
- nextArrow:$('.value-ga-next')
332
  });
333
- $(".tvc-b-value-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
334
- $("#value_ga_paging_info").html(nextSlide+1);
335
  });
336
  </script>
337
  <?php
100
  </div>
101
  <script>
102
  let rtl= <?php echo (is_rtl())?"true":"false"; ?>;
103
+ jQuery(".tvc-help-slider").slick({
104
  autoplay: false,
105
  dots: false,
106
+ prevArrow:jQuery('.h-page-prev'),
107
+ nextArrow:jQuery('.h-page-next'),
108
  rtl:rtl
109
  });
110
+ jQuery(".tvc-help-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
111
+ jQuery("#paging_info").html(nextSlide+1);
112
  });
113
  </script>
114
  <div class="right-content">
141
  </div>
142
  <script>
143
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
144
+ jQuery(".tvc-b-value-slider").slick({
145
  autoplay: false,
146
  dots: false,
147
+ prevArrow:jQuery('.b-page-prev'),
148
+ nextArrow:jQuery('.b-page-next'),
149
  rtl:rtl
150
  });
151
+ jQuery(".tvc-b-value-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
152
+ jQuery("#b-paging-info").html(nextSlide+1);
153
  });
154
  </script>
155
  <?php
184
  </div>
185
  <script>
186
  let rtl= <?php echo (is_rtl())?"true":"false"; ?>;
187
+ jQuery(".tvc-help-slider").slick({
188
  autoplay: false,
189
  dots: false,
190
+ prevArrow:jQuery('.h-page-prev'),
191
+ nextArrow:jQuery('.h-page-next'),
192
  rtl:rtl
193
  });
194
+ jQuery(".tvc-help-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
195
+ jQuery("#paging_info").html(nextSlide+1);
196
  });
197
  </script>
198
  <div class="right-content">
224
  </div>
225
  <script>
226
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
227
+ jQuery(".tvc-b-value-slider").slick({
228
  autoplay: false,
229
  dots: false,
230
+ prevArrow:jQuery('.b-page-prev'),
231
+ nextArrow:jQuery('.b-page-next'),
232
  rtl:rtl
233
  });
234
+ jQuery(".tvc-b-value-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
235
+ jQuery("#b-paging-info").html(nextSlide+1);
236
  });
237
  </script>
238
  <?php
281
  </nav>
282
  </div>
283
  <script>
284
+ jQuery(".tvc-help-slider").slick({
285
  autoplay: false,
286
  dots: false,
287
+ prevArrow:jQuery('.help-ga-prev'),
288
+ nextArrow:jQuery('.help-ga-next')
289
  });
290
+ jQuery(".tvc-help-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
291
+ jQuery("#help_ga_paging_info").html(nextSlide+1);
292
  });
293
  </script>
294
  <div class="right-content">
324
  <a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/Installation-Manual.pdf"); ?>" tabindex="0"> <?php esc_html_e("Installation manual","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/Google-shopping-Guide.pdf"); ?>" tabindex="0"> <?php esc_html_e("Google shopping guide","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url_raw("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" tabindex="0"> <?php esc_html_e("FAQ","conversios"); ?></a>
325
  </div>
326
  <script>
327
+ jQuery(".tvc-b-value-slider").slick({
328
  autoplay: false,
329
  dots: false,
330
+ prevArrow:jQuery('.value-ga-prev'),
331
+ nextArrow:jQuery('.value-ga-next')
332
  });
333
+ jQuery(".tvc-b-value-slider").on("beforeChange", function(event, slick, currentSlide, nextSlide){
334
+ jQuery("#value_ga_paging_info").html(nextSlide+1);
335
  });
336
  </script>
337
  <?php
readme.txt CHANGED
@@ -8,8 +8,8 @@ Author: Tatvic
8
  Requires at least: 3.5.0
9
  Tested up to: 5.9
10
  Requires PHP: 5.6 or Higher
11
- Stable tag: 4.6.4
12
- Version: 4.6.4
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
@@ -379,6 +379,10 @@ You can resolve the duplication of data by removing the manually implemented GA
379
 
380
 
381
  == Changelog ==
 
 
 
 
382
  = 4.6.4 - 12/02/2022 =
383
 
384
  * New: With our New Feedback feature on Dashboard ,user can now share the feedback about the plugin
8
  Requires at least: 3.5.0
9
  Tested up to: 5.9
10
  Requires PHP: 5.6 or Higher
11
+ Stable tag: 4.6.5
12
+ Version: 4.6.5
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
379
 
380
 
381
  == Changelog ==
382
+
383
+ = 4.6.5 - 16/02/2022 =
384
+ * Fix - Fixed :- Onboarding loading issue for some users.
385
+
386
  = 4.6.4 - 12/02/2022 =
387
 
388
  * New: With our New Feedback feature on Dashboard ,user can now share the feedback about the plugin