WP Meta SEO - Version 4.3.5

Version Description

  • Add : New Google Analytics tracking UX
    • Add : Support Google Analytics v4 property
    • Add : Support Google Tag manager
    • Fix : Update Meta SEO meta description length
    • Fix : Remove HTML tags from WP Meta SEO meta tags
Download this release

Release Info

Developer JoomUnited
Plugin Icon 128x128 WP Meta SEO
Version 4.3.5
Comparing to
See all releases

Code changes from version 4.3.4 to 4.3.5

Files changed (114) hide show
  1. assets/css/main.css +96 -25
  2. assets/css/snackbar.css +87 -0
  3. assets/js/google-analytics/google_analytics.js +189 -117
  4. assets/js/metaseo_admin.js +277 -9
  5. assets/js/snackbar.js +177 -0
  6. inc/class.metaseo-admin.php +696 -350
  7. inc/class.metaseo-broken-link-table.php +1 -1
  8. inc/class.metaseo-content-list-table.php +1 -0
  9. inc/class.metaseo-front_end.php +148 -59
  10. inc/class.metaseo-google-analytics.php +11 -8
  11. inc/class.metaseo-image-list-table.php +1 -1
  12. inc/class.metaseo-meta.php +1 -1
  13. inc/class.metaseo-metabox.php +1 -0
  14. inc/google-tag-manager/tracking/gtm-body.php +11 -0
  15. inc/google-tag-manager/tracking/gtm-header.php +20 -0
  16. inc/google-tag-manager/wpms-tagmanager-api.php +75 -0
  17. inc/google_analytics/tracking/classic_disconnect.php +4 -2
  18. inc/google_analytics/tracking/code-ga4.php +32 -0
  19. inc/google_analytics/tracking/events-ga4.php +93 -0
  20. inc/google_analytics/tracking/ga4_disconnect.php +16 -0
  21. inc/google_analytics/tracking/universal_disconnect.php +3 -1
  22. inc/google_analytics/wpmsgapi.php +748 -272
  23. inc/install-wizard/content/viewGoogleAnalytics.php +4 -1
  24. inc/install-wizard/handler-wizard.php +4 -1
  25. inc/lib/google-api/vendor/composer/ClassLoader.php +13 -11
  26. inc/lib/google-api/vendor/composer/autoload_real.php +3 -3
  27. inc/lib/google-api/vendor/composer/autoload_static.php +2 -2
  28. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager.php +1190 -0
  29. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Account.php +75 -0
  30. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/AccountAccess.php +30 -0
  31. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/BuiltInVariable.php +75 -0
  32. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Client.php +146 -0
  33. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Condition.php +47 -0
  34. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Container.php +112 -0
  35. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ContainerAccess.php +39 -0
  36. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ContainerVersion.php +247 -0
  37. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ContainerVersionHeader.php +147 -0
  38. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/CreateBuiltInVariableResponse.php +38 -0
  39. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/CreateContainerVersionRequestVersionOptions.php +39 -0
  40. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/CreateContainerVersionResponse.php +71 -0
  41. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/CustomTemplate.php +118 -0
  42. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Entity.php +110 -0
  43. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Environment.php +156 -0
  44. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Folder.php +102 -0
  45. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/FolderEntities.php +79 -0
  46. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/GalleryReference.php +75 -0
  47. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/GetWorkspaceStatusResponse.php +54 -0
  48. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListAccountsResponse.php +47 -0
  49. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListContainerVersionsResponse.php +47 -0
  50. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListContainersResponse.php +47 -0
  51. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListEnabledBuiltInVariablesResponse.php +47 -0
  52. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListEnvironmentsResponse.php +47 -0
  53. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListFoldersResponse.php +47 -0
  54. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListTagsResponse.php +47 -0
  55. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListTemplatesResponse.php +47 -0
  56. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListTriggersResponse.php +47 -0
  57. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListUserPermissionsResponse.php +47 -0
  58. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListVariablesResponse.php +47 -0
  59. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListWorkspacesResponse.php +47 -0
  60. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListZonesResponse.php +47 -0
  61. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/MergeConflict.php +53 -0
  62. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Parameter.php +81 -0
  63. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/PublishContainerVersionResponse.php +46 -0
  64. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/QuickPreviewResponse.php +62 -0
  65. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/Accounts.php +75 -0
  66. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainers.php +106 -0
  67. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersEnvironments.php +122 -0
  68. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersVersionHeaders.php +62 -0
  69. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersVersions.php +136 -0
  70. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspaces.php +187 -0
  71. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesBuiltInVariables.php +96 -0
  72. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesFolders.php +158 -0
  73. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesTags.php +123 -0
  74. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesTemplates.php +127 -0
  75. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesTriggers.php +127 -0
  76. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesVariables.php +127 -0
  77. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesZones.php +123 -0
  78. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsUserPermissions.php +105 -0
  79. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertBuiltInVariableResponse.php +30 -0
  80. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertFolderResponse.php +37 -0
  81. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertTagResponse.php +37 -0
  82. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertTemplateResponse.php +37 -0
  83. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertTriggerResponse.php +37 -0
  84. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertVariableResponse.php +37 -0
  85. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertZoneResponse.php +37 -0
  86. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/SetupTag.php +39 -0
  87. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/SyncStatus.php +39 -0
  88. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/SyncWorkspaceResponse.php +54 -0
  89. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Tag.php +291 -0
  90. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/TeardownTag.php +39 -0
  91. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Trigger.php +457 -0
  92. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/UserPermission.php +81 -0
  93. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Variable.php +189 -0
  94. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/VariableFormatValue.php +94 -0
  95. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Workspace.php +93 -0
  96. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Zone.php +151 -0
  97. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ZoneBoundary.php +47 -0
  98. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ZoneChildContainer.php +39 -0
  99. inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ZoneTypeRestriction.php +40 -0
  100. inc/pages/google-analytics/ga-trackcode.php +0 -321
  101. inc/pages/google-analytics/google-analytics.php +0 -224
  102. inc/pages/google-analytics/menu.php +0 -46
  103. inc/pages/{google-analytics → google-services}/form-connect.php +0 -0
  104. inc/pages/google-services/ga-trackcode.php +405 -0
  105. inc/pages/google-services/gg-services-connect.php +138 -0
  106. inc/pages/google-services/google-services.php +157 -0
  107. inc/pages/google-services/menu.php +45 -0
  108. inc/pages/settings/breadcrumb.php +1 -1
  109. inc/pages/settings/image_compression.php +1 -0
  110. jutranslation/jutranslation.php +1 -1
  111. languages/wp-meta-seo-en_US.mo +0 -0
  112. readme.txt +8 -1
  113. wp-meta-seo.php +11 -10
  114. wpms-sitemap.xsl +1 -1
assets/css/main.css CHANGED
@@ -21,7 +21,7 @@
21
  }
22
 
23
  .wpms-form-table input[type=checkbox]:checked::before,
24
- input[type=checkbox].wpms-checkbox:checked::before{
25
  filter: grayscale(1) brightness(2);
26
  }
27
 
@@ -32,6 +32,9 @@ input[type=checkbox]:focus {
32
  .content-box {
33
  padding: 0 6%;
34
  }
 
 
 
35
 
36
  .ju-button {
37
  background-color: transparent;
@@ -51,6 +54,19 @@ input[type=checkbox]:focus {
51
  border-radius: 40px;
52
  }
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  .ju-link-classic {
55
  text-transform: uppercase;
56
  display: inline-block;
@@ -74,6 +90,15 @@ input[type=checkbox]:focus {
74
  border-color: #ff8726;
75
  }
76
 
 
 
 
 
 
 
 
 
 
77
  .ju-description {
78
  margin-top: 10px;
79
  display: inline-block;
@@ -623,7 +648,7 @@ input[type=checkbox]:focus {
623
  }
624
 
625
  .wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr td:nth-child(3),
626
- .wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr th:nth-child(3) ,
627
  .wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr td:nth-child(4),
628
  .wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr th:nth-child(4) {
629
  padding: 5px 10px;
@@ -718,7 +743,7 @@ input[type=checkbox]:focus {
718
  }
719
 
720
  .wpms-top-h1 {
721
- font-size: 40px !important;
722
  font-weight: 600 !important;
723
  font-style: normal;
724
  font-stretch: normal;
@@ -838,7 +863,7 @@ input[type=checkbox]:focus {
838
  margin-left: 10px;
839
  }
840
 
841
- .wp-meta-seo_page_metaseo_google_analytics .gadwp-settings-options tr td{
842
  padding: 10px 0;
843
  }
844
 
@@ -958,47 +983,93 @@ input[type=checkbox]:focus {
958
  }
959
  }
960
 
961
- .tablenav .tablenav-pages .material-icons{
962
  vertical-align: middle;
963
  }
964
 
965
- .wpmsga-advanced-configuration{ width: 100%; height: auto; overflow: hidden; margin: 30px 0; }
966
- .wpmsga-advanced-config-header{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
967
  width: 100%;
968
  text-align: left;
969
  color: #23282d;
970
  font-size: 1.3em;
971
  text-transform: uppercase;
972
- padding: 15px 10px;
973
  cursor: pointer;
974
  margin: 0px !important;
975
  letter-spacing: 1px;
976
  }
977
- .wpmsga-advanced-config-header:after {
 
978
  font-family: 'Material Icons';
979
  font-size: 20px;
980
  padding-left: 5px;
981
  vertical-align: text-top;
982
  }
983
 
984
- .wpmsga-advanced-config-header.down:after {
985
  content: "\e313";
986
  }
987
- .wpmsga-advanced-config-header.up:after {
 
988
  content: "\e316";
989
  }
990
- .wpmsga-advanced-configuration .content-box{ width: 100%; height: auto; overflow: hidden; background: #fff; padding: 10px 20px; display: none; }
991
- .wpmsga-advanced-configuration .wpmsga-advanced-box{ width: 100%; height: auto; overflow: hidden; margin: 0; }
 
 
 
 
 
 
 
 
 
 
 
 
 
992
 
993
  .wp-meta-seo_page_metaseo_google_analytics #ga_dash_code,
994
  .wp-meta-seo_page_metaseo_google_analytics #wpms_ga_uax_reference,
995
  .wp-meta-seo_page_metaseo_google_analytics .wpmsga_code_tracking,
996
- .wp-meta-seo_page_metaseo_google_analytics #wpmsga_dash_tracking_type
997
- {
998
  width: 100%;
999
  }
1000
 
1001
- .wp-meta-seo_page_metaseo_google_analytics #wpmsga_dash_tracking_type {
1002
  max-width: unset;
1003
  }
1004
 
@@ -1008,7 +1079,7 @@ input[type=checkbox]:focus {
1008
 
1009
  @media only screen and (max-width: 1060px) {
1010
  .wp-meta-seo_page_metaseo_google_analytics .ju-settings-option,
1011
- .wp-meta-seo_page_metaseo_google_analytics #wpmsga-basic .wpmsClearauthor{
1012
  width: 100%;
1013
  }
1014
 
@@ -1030,12 +1101,12 @@ input[type=checkbox]:focus {
1030
  float: left;
1031
  }
1032
 
1033
- .wp-meta-seo_page_metaseo_google_analytics #wpmsga-basic .wpmsClearauthor{
1034
  font-size: 10px;
1035
- letter-spacing : 1px
1036
  }
1037
 
1038
- .wp-meta-seo_page_metaseo_google_analytics .wpms-settings-title{
1039
  width: 40%;
1040
  }
1041
 
@@ -1047,7 +1118,7 @@ input[type=checkbox]:focus {
1047
  max-width: unset;
1048
  }
1049
 
1050
- .wp-meta-seo_page_metaseo_google_analytics ul.wpmstabs li.wpmstab a.active{
1051
  background-color: #ff8726 !important;
1052
  color: #fff !important;
1053
  }
@@ -1066,7 +1137,7 @@ input[type=checkbox]:focus {
1066
  @media screen and (max-width: 550px) {
1067
  .wp-meta-seo_page_metaseo_google_analytics .ju-button {
1068
  width: 100%;
1069
- margin:0 0 10px 0 !important;
1070
  }
1071
 
1072
  .wp-meta-seo_page_metaseo_google_analytics .wpms-ga-link-document {
@@ -1089,19 +1160,19 @@ input[type=checkbox]:focus {
1089
  }
1090
 
1091
  .wp-meta-seo_page_metaseo_google_analytics .ju-settings-option .ju-switch-button,
1092
- .wp-meta-seo_page_metaseo_google_analytics .ju-settings-option .ju-switch-button input{
1093
  width: 98%;
1094
  }
1095
 
1096
  .wp-meta-seo_page_metaseo_content_meta .wp-list-table thead tr th:not(:first-child),
1097
- .wp-meta-seo_page_metaseo_content_meta .wp-list-table tfoot tr th:not(:first-child)
1098
- {
1099
  display: none;
1100
  }
1101
 
1102
  .wp-meta-seo_page_metaseo_content_meta .wp-list-table tbody tr td.check-column {
1103
  width: 100% !important;
1104
  }
 
1105
  .wp-meta-seo_page_metaseo_content_meta .wp-list-table tbody tr td {
1106
  width: 100% !important;
1107
  display: block;
21
  }
22
 
23
  .wpms-form-table input[type=checkbox]:checked::before,
24
+ input[type=checkbox].wpms-checkbox:checked::before {
25
  filter: grayscale(1) brightness(2);
26
  }
27
 
32
  .content-box {
33
  padding: 0 6%;
34
  }
35
+ .track-setting-content-box {
36
+ padding: 0 3%;
37
+ }
38
 
39
  .ju-button {
40
  background-color: transparent;
54
  border-radius: 40px;
55
  }
56
 
57
+ .wpmstm-error-enable-api {
58
+ float: left;
59
+ margin: auto 10px;
60
+ color: red;
61
+ visibility: visible;
62
+ }
63
+ .wpmstm-error-access-code {
64
+ float: left;
65
+ margin: auto 10px;
66
+ color: red;
67
+ visibility: visible;
68
+ }
69
+
70
  .ju-link-classic {
71
  text-transform: uppercase;
72
  display: inline-block;
90
  border-color: #ff8726;
91
  }
92
 
93
+ #btn-reload-connect-tagmanger {
94
+ text-transform: uppercase;
95
+ border: 1px solid #F7F0EB !important;
96
+ border-radius: 5px !important;
97
+ color: #ffa45a !important;
98
+ background-color: #F7F0EB !important;
99
+ font-weight: 500;
100
+ }
101
+
102
  .ju-description {
103
  margin-top: 10px;
104
  display: inline-block;
648
  }
649
 
650
  .wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr td:nth-child(3),
651
+ .wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr th:nth-child(3),
652
  .wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr td:nth-child(4),
653
  .wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr th:nth-child(4) {
654
  padding: 5px 10px;
743
  }
744
 
745
  .wpms-top-h1 {
746
+ font-size: 32px !important;
747
  font-weight: 600 !important;
748
  font-style: normal;
749
  font-stretch: normal;
863
  margin-left: 10px;
864
  }
865
 
866
+ .wp-meta-seo_page_metaseo_google_analytics .gadwp-settings-options tr td {
867
  padding: 10px 0;
868
  }
869
 
983
  }
984
  }
985
 
986
+ .tablenav .tablenav-pages .material-icons {
987
  vertical-align: middle;
988
  }
989
 
990
+ .wpmsga-advanced-configuration {
991
+ width: 100%;
992
+ height: auto;
993
+ overflow: hidden;
994
+ margin: 30px 0;
995
+ }
996
+
997
+ .wpms-gg-services-directly-header {
998
+ width: 100%;
999
+ text-align: left;
1000
+ color: #23282d;
1001
+ font-size: 1.1em;
1002
+ text-transform: uppercase;
1003
+ padding: 5px 10px 0px 0px;
1004
+ cursor: pointer;
1005
+ margin: 0px !important;
1006
+ letter-spacing: 1px;
1007
+ }
1008
+
1009
+ .wpms-gg-services-directly-header:after {
1010
+ font-family: 'Material Icons';
1011
+ font-size: 20px;
1012
+ padding-left: 5px;
1013
+ vertical-align: text-top;
1014
+ }
1015
+
1016
+ .wpms-gg-services-directly-header.down:after {
1017
+ content: "\e313";
1018
+ }
1019
+
1020
+ .wpms-gg-services-directly-header.up:after {
1021
+ content: "\e316";
1022
+ }
1023
+ .wpms-ga-setting-title {
1024
  width: 100%;
1025
  text-align: left;
1026
  color: #23282d;
1027
  font-size: 1.3em;
1028
  text-transform: uppercase;
1029
+ padding: 15px 10px 15px 0;
1030
  cursor: pointer;
1031
  margin: 0px !important;
1032
  letter-spacing: 1px;
1033
  }
1034
+
1035
+ .wpms-ga-setting-title:after {
1036
  font-family: 'Material Icons';
1037
  font-size: 20px;
1038
  padding-left: 5px;
1039
  vertical-align: text-top;
1040
  }
1041
 
1042
+ .wpms-ga-setting-title.down:after {
1043
  content: "\e313";
1044
  }
1045
+
1046
+ .wpms-ga-setting-title.up:after {
1047
  content: "\e316";
1048
  }
1049
+
1050
+ .wpmsga-advanced-configuration .content-box {
1051
+ width: 100%;
1052
+ height: auto;
1053
+ overflow: hidden;
1054
+ background: #fff;
1055
+ padding: 10px 20px;
1056
+ }
1057
+
1058
+ .wpmsga-advanced-configuration .wpmsga-advanced-box {
1059
+ width: 100%;
1060
+ height: auto;
1061
+ overflow: hidden;
1062
+ margin: 0;
1063
+ }
1064
 
1065
  .wp-meta-seo_page_metaseo_google_analytics #ga_dash_code,
1066
  .wp-meta-seo_page_metaseo_google_analytics #wpms_ga_uax_reference,
1067
  .wp-meta-seo_page_metaseo_google_analytics .wpmsga_code_tracking,
1068
+ .wp-meta-seo_page_metaseo_google_analytics #wpms_gg_service_tracking_type {
 
1069
  width: 100%;
1070
  }
1071
 
1072
+ .wp-meta-seo_page_metaseo_google_analytics #wpms_gg_service_tracking_type {
1073
  max-width: unset;
1074
  }
1075
 
1079
 
1080
  @media only screen and (max-width: 1060px) {
1081
  .wp-meta-seo_page_metaseo_google_analytics .ju-settings-option,
1082
+ .wp-meta-seo_page_metaseo_google_analytics #wpmsga-basic .wpmsClearauthor {
1083
  width: 100%;
1084
  }
1085
 
1101
  float: left;
1102
  }
1103
 
1104
+ .wp-meta-seo_page_metaseo_google_analytics #wpmsga-basic .wpmsClearauthor {
1105
  font-size: 10px;
1106
+ letter-spacing: 1px
1107
  }
1108
 
1109
+ .wp-meta-seo_page_metaseo_google_analytics .wpms-settings-title {
1110
  width: 40%;
1111
  }
1112
 
1118
  max-width: unset;
1119
  }
1120
 
1121
+ .wp-meta-seo_page_metaseo_google_analytics ul.wpmstabs li.wpmstab a.active {
1122
  background-color: #ff8726 !important;
1123
  color: #fff !important;
1124
  }
1137
  @media screen and (max-width: 550px) {
1138
  .wp-meta-seo_page_metaseo_google_analytics .ju-button {
1139
  width: 100%;
1140
+ margin: 0 0 10px 0 !important;
1141
  }
1142
 
1143
  .wp-meta-seo_page_metaseo_google_analytics .wpms-ga-link-document {
1160
  }
1161
 
1162
  .wp-meta-seo_page_metaseo_google_analytics .ju-settings-option .ju-switch-button,
1163
+ .wp-meta-seo_page_metaseo_google_analytics .ju-settings-option .ju-switch-button input {
1164
  width: 98%;
1165
  }
1166
 
1167
  .wp-meta-seo_page_metaseo_content_meta .wp-list-table thead tr th:not(:first-child),
1168
+ .wp-meta-seo_page_metaseo_content_meta .wp-list-table tfoot tr th:not(:first-child) {
 
1169
  display: none;
1170
  }
1171
 
1172
  .wp-meta-seo_page_metaseo_content_meta .wp-list-table tbody tr td.check-column {
1173
  width: 100% !important;
1174
  }
1175
+
1176
  .wp-meta-seo_page_metaseo_content_meta .wp-list-table tbody tr td {
1177
  width: 100% !important;
1178
  display: block;
assets/css/snackbar.css ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Snackbars */
2
+ .wpms-snackbar-wrapper {
3
+ position: fixed;
4
+ top: 30px;
5
+ right: 20px;
6
+ z-index: 10000000;
7
+ display: flex;
8
+ flex-direction: column;
9
+ align-items: flex-end;
10
+ min-width: 240px;
11
+ }
12
+
13
+ .wpms-snackbar-wrap {
14
+ background: #0073ab;
15
+ color: #FFF;
16
+ padding: 10px 20px;
17
+ border-radius: 4px;
18
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
19
+ transition: transform 0.2s ease-in-out, all 0.4s ease-in-out;
20
+ font-size: 14px;
21
+ margin: 10px 0;
22
+ display: inline-block;
23
+ position: relative;
24
+ width: 100%;
25
+ box-sizing: border-box;
26
+ }
27
+
28
+ .wpms-snackbar-error {
29
+ border-left: #dc3232 4px solid;
30
+ color: #444;
31
+ background: #ffffff;
32
+ }
33
+
34
+ .wpms-snackbar .wpms-snackbar-content {
35
+ line-height: 18px;
36
+ font-size: 12px;
37
+ display: inline-block;
38
+ vertical-align: middle;
39
+ }
40
+
41
+ .wpms-snackbar .wpms-snack-icon {
42
+ vertical-align: middle;
43
+ font-size: 18px !important;
44
+ margin-right: 5px;
45
+ }
46
+
47
+ .wpms-snack-loader {
48
+ -webkit-animation: wpms-snack-loader 2s linear infinite;
49
+ -moz-animation: wpms-snack-loader 2s linear infinite;
50
+ animation: wpms-snack-loader 2s linear infinite;
51
+ }
52
+
53
+ @-moz-keyframes wpms-snack-loader { 100% { -moz-transform: rotate(360deg); } }
54
+ @-webkit-keyframes wpms-snack-loader { 100% { -webkit-transform: rotate(360deg); } }
55
+ @keyframes wpms-snack-loader { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
56
+
57
+ .wpms-snackbar .wpms-snackbar-undo {
58
+ text-transform: capitalize;
59
+ font-size: 12px;
60
+ margin: 0;
61
+ text-decoration: underline;
62
+ line-height: 18px;
63
+ color: #fff;
64
+ vertical-align: middle;
65
+ float: right;
66
+ }
67
+
68
+ .wpms-snackbar [class^=wpms-snackbar-]:focus {
69
+ border: none;
70
+ box-shadow: none;
71
+ -moz-box-shadow: none;
72
+ }
73
+
74
+ .wpms-snackbar-wrap .wpms-snackbar-close {
75
+ position: absolute;
76
+ top: 3px;
77
+ right: 3px;
78
+ }
79
+
80
+ .wpms-snackbar-wrap .wpms-snackbar-close .material-icons {
81
+ font-size: 12px;
82
+ color: #fff;
83
+ }
84
+
85
+ .wpms-snackbar.wpms-snackbar-hidden {
86
+ transform: translateY(-200%);
87
+ }
assets/js/google-analytics/google_analytics.js CHANGED
@@ -122,9 +122,9 @@ jQuery.fn.extend({
122
 
123
  jQuery.each(list, function (key, value) {
124
  if (key === defaultMetric || key === defaultDimension || key === defaultView) {
125
- output.push('<div class="'+ classbtn +' ju-button wpms-small-btn orange-button active" data-value="'+ key +'">'+ value +'</div>');
126
  } else {
127
- output.push('<div class="'+ classbtn +' ju-button wpms-small-btn" data-value="'+ key +'">'+ value +'</div>');
128
  }
129
  });
130
  jQuery(id).html(output.join(''));
@@ -139,7 +139,7 @@ jQuery.fn.extend({
139
  tpl = '<div id="wpms-container' + slug + '">';
140
  tpl += '<div class="wpmsga-btn-toolbar wpmsga-btn-toolbar-date">';
141
  tpl += '</div>';
142
-
143
  tpl += '<div class="wpmsga-btn-toolbar wpmsga-btn-toolbar-report">';
144
  tpl += '</div>';
145
  tpl += '<div id="wpms-progressbar' + slug + '"></div>';
@@ -147,9 +147,13 @@ jQuery.fn.extend({
147
  tpl += '<div id="wpms-reports' + slug + '"></div>';
148
  tpl += '</div>';
149
  $wind.append(tpl);
150
-
151
  template.addToolbar( '.wpmsga-btn-toolbar-date', wpmsItemData.dateList , 'wpmsga_date');
152
- template.addToolbar( '.wpmsga-btn-toolbar-report', wpmsItemData.reportList , 'wpmsga_report');
 
 
 
 
153
  }
154
  };
155
 
@@ -184,7 +188,11 @@ jQuery.fn.extend({
184
  if (jQuery.isArray(response[ 0 ])) {
185
  jQuery('#wpms-reports' + slug).show();
186
  if (postData.query === 'visitBounceRate,bottomstats') {
187
- reports.drawAreaChart(response[ 0 ], true);
 
 
 
 
188
  } else {
189
  reports.drawAreaChart(response[ 0 ], false);
190
  }
@@ -363,16 +371,23 @@ jQuery.fn.extend({
363
 
364
  chart.draw(chartData, options);
365
  },
366
- drawAreaChart: function (data, format) {
367
  var chartData, options, chart, formatter;
368
 
369
  chartData = google.visualization.arrayToDataTable(data);
370
-
371
  if (format) {
372
- formatter = new google.visualization.NumberFormat({
373
- suffix: '%',
374
- fractionDigits: 2
375
- });
 
 
 
 
 
 
 
 
376
 
377
  formatter.format(chartData, 1);
378
  }
@@ -403,7 +418,15 @@ jQuery.fn.extend({
403
  jQuery("#gdsessions" + slug).html(data[ 0 ]);
404
  jQuery("#gdusers" + slug).html(data[ 1 ]);
405
  jQuery("#gdpageviews" + slug).html(data[ 2 ]);
406
- jQuery("#gdbouncerate" + slug).html(data[ 3 ] + "%");
 
 
 
 
 
 
 
 
407
  jQuery("#gdorganicsearch" + slug).html(data[ 4 ]);
408
  jQuery("#gdpagespervisit" + slug).html(data[ 5 ]);
409
  },
@@ -507,7 +530,6 @@ jQuery.fn.extend({
507
  drawRealtime: function (rtData) {
508
  var rtInfoRight, uPagePath, uReferrals, uKeywords, uSocial, uCustom, i, pagepath = [], referrals = [], keywords = [], social = [], visittype = [], custom = [], uPagePathStats = [], pgStatsTable, uReferrals = [], uKeywords = [], uSocial = [], uCustom = [], uVisitType = ["REFERRAL", "ORGANIC", "SOCIAL", "CUSTOM"], uVisitorType = ["DIRECT", "NEW"];
509
  rtData = rtData[ 0 ];
510
-
511
  if (jQuery.isNumeric(rtData) || typeof rtData === "undefined") {
512
  rtData = [];
513
  rtData[ "totalsForAllResults" ] = [];
@@ -515,123 +537,168 @@ jQuery.fn.extend({
515
  rtData[ "rows" ] = [];
516
  }
517
 
518
- if (document.getElementById("wpms-online") != null && rtData[ "totalsForAllResults" ][ "rt:activeUsers" ] !== document.getElementById("wpms-online").innerHTML) {
519
- jQuery("#wpms-online").fadeOut("slow");
520
- jQuery("#wpms-online").fadeOut(500);
521
- jQuery("#wpms-online").fadeOut("slow", function () {
522
- if ((parseInt(rtData[ "totalsForAllResults" ][ "rt:activeUsers" ])) < (parseInt(document.getElementById("wpms-online").innerHTML))) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
523
  jQuery("#wpms-online").css({
524
- 'background-color': '#FFE8E8'
525
  });
526
- } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
527
  jQuery("#wpms-online").css({
528
- 'background-color': '#E0FFEC'
529
  });
530
- }
531
- document.getElementById("wpms-online").innerHTML = rtData[ "totalsForAllResults" ][ "rt:activeUsers" ];
532
- });
533
- jQuery("#wpms-online").fadeIn("slow");
534
- jQuery("#wpms-online").fadeIn(500);
535
- jQuery("#wpms-online").fadeIn("slow", function () {
536
- jQuery("#wpms-online").css({
537
- 'background-color': '#FFFFFF'
538
  });
539
- });
540
  }
541
 
542
- if (rtData[ "totalsForAllResults" ][ "rt:activeUsers" ] == 0) {
543
- rtData[ "rows" ] = [];
 
 
 
 
544
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545
 
546
- for (i = 0; i < rtData[ "rows" ].length; i++) {
547
- pagepath.push(rtData[ "rows" ][ i ][ 0 ]);
548
- if (rtData[ "rows" ][ i ][ 3 ] === "REFERRAL") {
549
- referrals.push(rtData[ "rows" ][ i ][ 1 ]);
 
 
 
 
 
 
 
 
 
 
 
550
  }
551
- if (rtData[ "rows" ][ i ][ 3 ] === "ORGANIC") {
552
- keywords.push(rtData[ "rows" ][ i ][ 2 ]);
 
 
 
 
 
 
 
 
 
 
553
  }
554
- if (rtData[ "rows" ][ i ][ 3 ] === "SOCIAL") {
555
- social.push(rtData[ "rows" ][ i ][ 1 ]);
556
  }
557
- if (rtData[ "rows" ][ i ][ 3 ] === "CUSTOM") {
558
- custom.push(rtData[ "rows" ][ i ][ 1 ]);
 
 
 
 
 
559
  }
560
- visittype.push(rtData[ "rows" ][ i ][ 3 ]);
561
- }
 
562
 
563
- uPagePath = pagepath.filter(reports.rtOnlyUniqueValues);
564
- for (i = 0; i < uPagePath.length; i++) {
565
- uPagePathStats[ i ] = {
566
- "pagepath": uPagePath[ i ],
567
- "count": reports.rtCountSessions(rtData, uPagePath[ i ])
 
568
  }
569
- }
570
- uPagePathStats.sort(function (a, b) {
571
- return b.count - a.count
572
- });
573
 
574
- pgStatsTable = "";
575
- for (i = 0; i < uPagePathStats.length; i++) {
576
- if (i < wpmsItemData.rtLimitPages) {
577
- pgStatsTable += '<div class="wpms-pline"><div class="wpms-pleft"><a href="#" data-wpms="' + reports.rtPageDetails(rtData, uPagePathStats[ i ].pagepath) + '">' + uPagePathStats[ i ].pagepath.substring(0, 70) + '</a></div><div class="wpms-pright">' + uPagePathStats[ i ].count + '</div></div>';
 
 
578
  }
579
- }
580
- document.getElementById("wpms-pages").innerHTML = '<br /><div class="wpms-pg">' + pgStatsTable + '</div>';
 
581
 
582
- uReferrals = referrals.filter(reports.rtOnlyUniqueValues);
583
- for (i = 0; i < uReferrals.length; i++) {
584
- uReferrals[ i ] = {
585
- "value": uReferrals[ i ],
586
- "count": reports.rtCountSessions(rtData, uReferrals[ i ])
587
- };
588
- }
589
- uReferrals.sort(function (a, b) {
590
- return b.count - a.count
591
- });
592
 
593
- uKeywords = keywords.filter(reports.rtOnlyUniqueValues);
594
- for (i = 0; i < uKeywords.length; i++) {
595
- uKeywords[ i ] = {
596
- "value": uKeywords[ i ],
597
- "count": reports.rtCountSessions(rtData, uKeywords[ i ])
598
- };
599
- }
600
- uKeywords.sort(function (a, b) {
601
- return b.count - a.count
602
- });
603
 
604
- uSocial = social.filter(reports.rtOnlyUniqueValues);
605
- for (i = 0; i < uSocial.length; i++) {
606
- uSocial[ i ] = {
607
- "value": uSocial[ i ],
608
- "count": reports.rtCountSessions(rtData, uSocial[ i ])
609
- };
610
- }
611
- uSocial.sort(function (a, b) {
612
- return b.count - a.count
613
- });
614
 
615
- uCustom = custom.filter(reports.rtOnlyUniqueValues);
616
- for (i = 0; i < uCustom.length; i++) {
617
- uCustom[ i ] = {
618
- "value": uCustom[ i ],
619
- "count": reports.rtCountSessions(rtData, uCustom[ i ])
620
- };
621
  }
622
- uCustom.sort(function (a, b) {
623
- return b.count - a.count
624
- });
625
-
626
- rtInfoRight = '<div class="wpms-bigtext"><a href="#" data-wpms="' + reports.rtGenerateTooltip(uReferrals) + '"><div class="wpms-bleft">' + reports.i18n[ 0 ] + '</a></div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitType[ 0 ]) + '</div></div>';
627
- rtInfoRight += '<div class="wpms-bigtext"><a href="#" data-wpms="' + reports.rtGenerateTooltip(uKeywords) + '"><div class="wpms-bleft">' + reports.i18n[ 1 ] + '</a></div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitType[ 1 ]) + '</div></div>';
628
- rtInfoRight += '<div class="wpms-bigtext"><a href="#" data-wpms="' + reports.rtGenerateTooltip(uSocial) + '"><div class="wpms-bleft">' + reports.i18n[ 2 ] + '</a></div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitType[ 2 ]) + '</div></div>';
629
- rtInfoRight += '<div class="wpms-bigtext"><a href="#" data-wpms="' + reports.rtGenerateTooltip(uCustom) + '"><div class="wpms-bleft">' + reports.i18n[ 3 ] + '</a></div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitType[ 3 ]) + '</div></div>';
630
-
631
- rtInfoRight += '<div class="wpms-bigtext"><div class="wpms-bleft">' + reports.i18n[ 4 ] + '</div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitorType[ 0 ]) + '</div></div>';
632
- rtInfoRight += '<div class="wpms-bigtext"><div class="wpms-bleft">' + reports.i18n[ 5 ] + '</div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitorType[ 1 ]) + '</div></div>';
633
-
634
- document.getElementById("wpms-tdo-right").innerHTML = rtInfoRight;
635
  },
636
  throwDebug: function (response) {
637
  jQuery("#wpms-status" + slug).css({
@@ -644,7 +711,7 @@ jQuery.fn.extend({
644
  if (response == '-24') {
645
  jQuery("#wpms-status" + slug).html(wpmsItemData.i18n[ 15 ]);
646
  } else if(response == '-99') {
647
-
648
  } else {
649
  jQuery("#wpms-reports" + slug).css({
650
  "background-color": "#F7F7F7",
@@ -882,7 +949,6 @@ jQuery.fn.extend({
882
  });
883
 
884
  } else {
885
-
886
  tpl = '<div id="wpms-areachartbottomstats' + slug + '">';
887
  tpl += '<div id="wpms-areachart' + slug + '"></div>';
888
  tpl += '<div id="wpms-bottomstats' + slug + '">';
@@ -890,8 +956,15 @@ jQuery.fn.extend({
890
  tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 5 ] + '</h3><p id="gdsessions' + slug + '">&nbsp;</p></div>';
891
  tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 6 ] + '</h3><p id="gdusers' + slug + '">&nbsp;</p></div>';
892
  tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 7 ] + '</h3><p id="gdpageviews' + slug + '">&nbsp;</p></div>';
893
- tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 8 ] + '</h3><p id="gdbouncerate' + slug + '">&nbsp;</p></div>';
894
- tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 9 ] + '</h3><p id="gdorganicsearch' + slug + '">&nbsp;</p></div>';
 
 
 
 
 
 
 
895
  tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 10 ] + '</h3><p id="gdpagespervisit' + slug + '">&nbsp;</p></div>';
896
  tpl += '</div>';
897
  tpl += '</div>';
@@ -901,7 +974,6 @@ jQuery.fn.extend({
901
  jQuery('#wpms-reports' + slug).hide();
902
 
903
  postData.query = query + ',bottomstats';
904
-
905
  jQuery.post(wpmsItemData.ajaxurl, postData, function (response) {
906
  reports.areaChartBottomStats(response);
907
  });
@@ -971,14 +1043,14 @@ jQuery.fn.extend({
971
  jQuery('#wpms-reports' + slug).html('');
972
  reports.init();
973
  });
974
-
975
  jQuery('.wpmsga_date').on('click', function () {
976
  jQuery('.wpmsga_date').removeClass('orange-button active');
977
  jQuery(this).addClass('orange-button active');
978
  jQuery('#wpms-reports' + slug).html('');
979
  reports.init();
980
  });
981
-
982
  jQuery('.wpmsga_report').on('click', function () {
983
  jQuery('.wpmsga_report').removeClass('orange-button active');
984
  jQuery(this).addClass('orange-button active');
@@ -1039,7 +1111,7 @@ jQuery(document).ready(function () {
1039
  'wpms_nonce': wpms_localize.wpms_nonce
1040
  },
1041
  success: function () {
1042
- window.location.assign(wpmsItemData.admin_url+'admin.php?page=metaseo_google_analytics');
1043
  }
1044
  });
1045
  });
122
 
123
  jQuery.each(list, function (key, value) {
124
  if (key === defaultMetric || key === defaultDimension || key === defaultView) {
125
+ output.push('<div id="wpms-btn-' + key + '" class="'+ classbtn +' ju-button wpms-small-btn orange-button active" data-value="'+ key +'">'+ value +'</div>');
126
  } else {
127
+ output.push('<div id="wpms-btn-' + key + '" class="'+ classbtn +' ju-button wpms-small-btn" data-value="'+ key +'">'+ value +'</div>');
128
  }
129
  });
130
  jQuery(id).html(output.join(''));
139
  tpl = '<div id="wpms-container' + slug + '">';
140
  tpl += '<div class="wpmsga-btn-toolbar wpmsga-btn-toolbar-date">';
141
  tpl += '</div>';
142
+
143
  tpl += '<div class="wpmsga-btn-toolbar wpmsga-btn-toolbar-report">';
144
  tpl += '</div>';
145
  tpl += '<div id="wpms-progressbar' + slug + '"></div>';
147
  tpl += '<div id="wpms-reports' + slug + '"></div>';
148
  tpl += '</div>';
149
  $wind.append(tpl);
150
+
151
  template.addToolbar( '.wpmsga-btn-toolbar-date', wpmsItemData.dateList , 'wpmsga_date');
152
+ if (wpmsItemData.property_type === 'GA4') {
153
+ template.addToolbar( '.wpmsga-btn-toolbar-report', wpmsItemData.reportList_ga4 , 'wpmsga_report');
154
+ } else {
155
+ template.addToolbar( '.wpmsga-btn-toolbar-report', wpmsItemData.reportList , 'wpmsga_report');
156
+ }
157
  }
158
  };
159
 
188
  if (jQuery.isArray(response[ 0 ])) {
189
  jQuery('#wpms-reports' + slug).show();
190
  if (postData.query === 'visitBounceRate,bottomstats') {
191
+ let typeGa4 = false;
192
+ if (response[0][0][1] === 'AVG Engagement Time') {
193
+ typeGa4 = true;
194
+ }
195
+ reports.drawAreaChart(response[ 0 ], true, typeGa4);
196
  } else {
197
  reports.drawAreaChart(response[ 0 ], false);
198
  }
371
 
372
  chart.draw(chartData, options);
373
  },
374
+ drawAreaChart: function (data, format, typeGa4) {
375
  var chartData, options, chart, formatter;
376
 
377
  chartData = google.visualization.arrayToDataTable(data);
 
378
  if (format) {
379
+ if (typeGa4) {
380
+ formatter = new google.visualization.NumberFormat({
381
+ suffix: 's',
382
+ fractionDigits: 0
383
+ });
384
+
385
+ } else {
386
+ formatter = new google.visualization.NumberFormat({
387
+ suffix: '%',
388
+ fractionDigits: 2
389
+ });
390
+ }
391
 
392
  formatter.format(chartData, 1);
393
  }
418
  jQuery("#gdsessions" + slug).html(data[ 0 ]);
419
  jQuery("#gdusers" + slug).html(data[ 1 ]);
420
  jQuery("#gdpageviews" + slug).html(data[ 2 ]);
421
+ if (wpmsItemData.property_type === 'GA4') {
422
+ let engegementDisplay = data[ 3 ];
423
+ let minutes = Math.floor(engegementDisplay / 60);
424
+ let seconds = Math.floor(engegementDisplay - minutes * 60);
425
+ engegementDisplay = minutes + "m " + seconds + "s";
426
+ jQuery("#gdbouncerate" + slug).html(engegementDisplay);
427
+ } else {
428
+ jQuery("#gdbouncerate" + slug).html(data[ 3 ] + "%");
429
+ }
430
  jQuery("#gdorganicsearch" + slug).html(data[ 4 ]);
431
  jQuery("#gdpagespervisit" + slug).html(data[ 5 ]);
432
  },
530
  drawRealtime: function (rtData) {
531
  var rtInfoRight, uPagePath, uReferrals, uKeywords, uSocial, uCustom, i, pagepath = [], referrals = [], keywords = [], social = [], visittype = [], custom = [], uPagePathStats = [], pgStatsTable, uReferrals = [], uKeywords = [], uSocial = [], uCustom = [], uVisitType = ["REFERRAL", "ORGANIC", "SOCIAL", "CUSTOM"], uVisitorType = ["DIRECT", "NEW"];
532
  rtData = rtData[ 0 ];
 
533
  if (jQuery.isNumeric(rtData) || typeof rtData === "undefined") {
534
  rtData = [];
535
  rtData[ "totalsForAllResults" ] = [];
537
  rtData[ "rows" ] = [];
538
  }
539
 
540
+ if (typeof rtData[ "totalsForAllResults" ] !== "undefined") {
541
+ if (document.getElementById("wpms-online") != null && rtData["totalsForAllResults"]["rt:activeUsers"] !== document.getElementById("wpms-online").innerHTML) {
542
+ jQuery("#wpms-online").fadeOut("slow");
543
+ jQuery("#wpms-online").fadeOut(500);
544
+ jQuery("#wpms-online").fadeOut("slow", function () {
545
+ if ((parseInt(rtData["totalsForAllResults"]["rt:activeUsers"])) < (parseInt(document.getElementById("wpms-online").innerHTML))) {
546
+ jQuery("#wpms-online").css({
547
+ 'background-color': '#FFE8E8'
548
+ });
549
+ } else {
550
+ jQuery("#wpms-online").css({
551
+ 'background-color': '#E0FFEC'
552
+ });
553
+ }
554
+ document.getElementById("wpms-online").innerHTML = rtData["totalsForAllResults"]["rt:activeUsers"];
555
+ });
556
+ jQuery("#wpms-online").fadeIn("slow");
557
+ jQuery("#wpms-online").fadeIn(500);
558
+ jQuery("#wpms-online").fadeIn("slow", function () {
559
  jQuery("#wpms-online").css({
560
+ 'background-color': '#FFFFFF'
561
  });
562
+ });
563
+ }
564
+ } else {
565
+ if (document.getElementById("wpms-online") != null && rtData[0][ "metricValues" ][0][ "value" ] !== document.getElementById("wpms-online").innerHTML) {
566
+ jQuery("#wpms-online").fadeOut("slow");
567
+ jQuery("#wpms-online").fadeOut(500);
568
+ jQuery("#wpms-online").fadeOut("slow", function () {
569
+ if ((parseInt(rtData[0][ "metricValues" ][0][ "value" ])) < (parseInt(document.getElementById("wpms-online").innerHTML))) {
570
+ jQuery("#wpms-online").css({
571
+ 'background-color': '#FFE8E8'
572
+ });
573
+ } else {
574
+ jQuery("#wpms-online").css({
575
+ 'background-color': '#E0FFEC'
576
+ });
577
+ }
578
+ document.getElementById("wpms-online").innerHTML = rtData[0][ "metricValues" ][0][ "value" ];
579
+ });
580
+ jQuery("#wpms-online").fadeIn("slow");
581
+ jQuery("#wpms-online").fadeIn(500);
582
+ jQuery("#wpms-online").fadeIn("slow", function () {
583
  jQuery("#wpms-online").css({
584
+ 'background-color': '#FFFFFF'
585
  });
 
 
 
 
 
 
 
 
586
  });
587
+ }
588
  }
589
 
590
+ if (typeof rtData["totalsForAllResults"] !== "undefined") {
591
+ if (rtData["totalsForAllResults"]["rt:activeUsers"] == 0) {
592
+ rtData["rows"] = [];
593
+ }
594
+ } else {
595
+ rtData["rows"] = [];
596
  }
597
+ for (i = 0; i < rtData["rows"].length; i++) {
598
+ pagepath.push(rtData["rows"][i][0]);
599
+ if (rtData["rows"][i][3] === "REFERRAL") {
600
+ referrals.push(rtData["rows"][i][1]);
601
+ }
602
+ if (rtData["rows"][i][3] === "ORGANIC") {
603
+ keywords.push(rtData["rows"][i][2]);
604
+ }
605
+ if (rtData["rows"][i][3] === "SOCIAL") {
606
+ social.push(rtData["rows"][i][1]);
607
+ }
608
+ if (rtData["rows"][i][3] === "CUSTOM") {
609
+ custom.push(rtData["rows"][i][1]);
610
+ }
611
+ visittype.push(rtData["rows"][i][3]);
612
+ }
613
 
614
+ uPagePath = pagepath.filter(reports.rtOnlyUniqueValues);
615
+ if (rtData[ "totalsForAllResults" ] != null && typeof rtData[ "totalsForAllResults" ] !== "undefined") {
616
+ for (i = 0; i < uPagePath.length; i++) {
617
+ uPagePathStats[i] = {
618
+ "pagepath": uPagePath[i],
619
+ "count": reports.rtCountSessions(rtData, uPagePath[i])
620
+ }
621
+ }
622
+ } else {
623
+ for (i = 0; i < rtData.length; i++) {
624
+ uPagePathStats[i] = {
625
+ "pagepath": rtData[i][ "dimensionValues" ][0][ "value" ],
626
+ "count": rtData[i][ "metricValues" ][0][ "value" ]
627
+ }
628
+ }
629
  }
630
+ uPagePathStats.sort(function (a, b) {
631
+ return b.count - a.count
632
+ });
633
+
634
+ pgStatsTable = "";
635
+ for (i = 0; i < uPagePathStats.length; i++) {
636
+ if (uPagePathStats[i].pagepath === 'All Users') {
637
+ continue;
638
+ }
639
+ if (i < wpmsItemData.rtLimitPages) {
640
+ pgStatsTable += '<div class="wpms-pline"><div class="wpms-pleft"><a href="#" data-wpms="' + reports.rtPageDetails(rtData, uPagePathStats[i].pagepath) + '">' + uPagePathStats[i].pagepath.substring(0, 70) + '</a></div><div class="wpms-pright">' + uPagePathStats[i].count + '</div></div>';
641
+ }
642
  }
643
+ if (document.getElementById("wpms-pages")) {
644
+ document.getElementById("wpms-pages").innerHTML = '<br /><div class="wpms-pg">' + pgStatsTable + '</div>';
645
  }
646
+
647
+ uReferrals = referrals.filter(reports.rtOnlyUniqueValues);
648
+ for (i = 0; i < uReferrals.length; i++) {
649
+ uReferrals[i] = {
650
+ "value": uReferrals[i],
651
+ "count": reports.rtCountSessions(rtData, uReferrals[i])
652
+ };
653
  }
654
+ uReferrals.sort(function (a, b) {
655
+ return b.count - a.count
656
+ });
657
 
658
+ uKeywords = keywords.filter(reports.rtOnlyUniqueValues);
659
+ for (i = 0; i < uKeywords.length; i++) {
660
+ uKeywords[i] = {
661
+ "value": uKeywords[i],
662
+ "count": reports.rtCountSessions(rtData, uKeywords[i])
663
+ };
664
  }
665
+ uKeywords.sort(function (a, b) {
666
+ return b.count - a.count
667
+ });
 
668
 
669
+ uSocial = social.filter(reports.rtOnlyUniqueValues);
670
+ for (i = 0; i < uSocial.length; i++) {
671
+ uSocial[i] = {
672
+ "value": uSocial[i],
673
+ "count": reports.rtCountSessions(rtData, uSocial[i])
674
+ };
675
  }
676
+ uSocial.sort(function (a, b) {
677
+ return b.count - a.count
678
+ });
679
 
680
+ uCustom = custom.filter(reports.rtOnlyUniqueValues);
681
+ for (i = 0; i < uCustom.length; i++) {
682
+ uCustom[i] = {
683
+ "value": uCustom[i],
684
+ "count": reports.rtCountSessions(rtData, uCustom[i])
685
+ };
686
+ }
687
+ uCustom.sort(function (a, b) {
688
+ return b.count - a.count
689
+ });
690
 
691
+ rtInfoRight = '<div class="wpms-bigtext"><a href="#" data-wpms="' + reports.rtGenerateTooltip(uReferrals) + '"><div class="wpms-bleft">' + reports.i18n[0] + '</a></div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitType[0]) + '</div></div>';
692
+ rtInfoRight += '<div class="wpms-bigtext"><a href="#" data-wpms="' + reports.rtGenerateTooltip(uKeywords) + '"><div class="wpms-bleft">' + reports.i18n[1] + '</a></div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitType[1]) + '</div></div>';
693
+ rtInfoRight += '<div class="wpms-bigtext"><a href="#" data-wpms="' + reports.rtGenerateTooltip(uSocial) + '"><div class="wpms-bleft">' + reports.i18n[2] + '</a></div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitType[2]) + '</div></div>';
694
+ rtInfoRight += '<div class="wpms-bigtext"><a href="#" data-wpms="' + reports.rtGenerateTooltip(uCustom) + '"><div class="wpms-bleft">' + reports.i18n[3] + '</a></div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitType[3]) + '</div></div>';
 
 
 
 
 
 
695
 
696
+ rtInfoRight += '<div class="wpms-bigtext"><div class="wpms-bleft">' + reports.i18n[4] + '</div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitorType[0]) + '</div></div>';
697
+ rtInfoRight += '<div class="wpms-bigtext"><div class="wpms-bleft">' + reports.i18n[5] + '</div><div class="wpms-bright">' + reports.rtCountSessions(rtData, uVisitorType[1]) + '</div></div>';
 
 
 
 
 
 
 
 
698
 
699
+ if (document.getElementById("wpms-tdo-right")) {
700
+ document.getElementById("wpms-tdo-right").innerHTML = rtInfoRight;
 
 
 
 
701
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
702
  },
703
  throwDebug: function (response) {
704
  jQuery("#wpms-status" + slug).css({
711
  if (response == '-24') {
712
  jQuery("#wpms-status" + slug).html(wpmsItemData.i18n[ 15 ]);
713
  } else if(response == '-99') {
714
+
715
  } else {
716
  jQuery("#wpms-reports" + slug).css({
717
  "background-color": "#F7F7F7",
949
  });
950
 
951
  } else {
 
952
  tpl = '<div id="wpms-areachartbottomstats' + slug + '">';
953
  tpl += '<div id="wpms-areachart' + slug + '"></div>';
954
  tpl += '<div id="wpms-bottomstats' + slug + '">';
956
  tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 5 ] + '</h3><p id="gdsessions' + slug + '">&nbsp;</p></div>';
957
  tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 6 ] + '</h3><p id="gdusers' + slug + '">&nbsp;</p></div>';
958
  tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 7 ] + '</h3><p id="gdpageviews' + slug + '">&nbsp;</p></div>';
959
+
960
+ if (wpmsItemData.property_type === 'GA4') {
961
+ tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 27 ] + '</h3><p id="gdbouncerate' + slug + '">&nbsp;</p></div>';
962
+ tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 28 ] + '</h3><p id="gdorganicsearch' + slug + '">&nbsp;</p></div>';
963
+ } else {
964
+ tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 8 ] + '</h3><p id="gdbouncerate' + slug + '">&nbsp;</p></div>';
965
+ tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 9 ] + '</h3><p id="gdorganicsearch' + slug + '">&nbsp;</p></div>';
966
+ }
967
+
968
  tpl += '<div class="small-box"><h3>' + wpmsItemData.i18n[ 10 ] + '</h3><p id="gdpagespervisit' + slug + '">&nbsp;</p></div>';
969
  tpl += '</div>';
970
  tpl += '</div>';
974
  jQuery('#wpms-reports' + slug).hide();
975
 
976
  postData.query = query + ',bottomstats';
 
977
  jQuery.post(wpmsItemData.ajaxurl, postData, function (response) {
978
  reports.areaChartBottomStats(response);
979
  });
1043
  jQuery('#wpms-reports' + slug).html('');
1044
  reports.init();
1045
  });
1046
+
1047
  jQuery('.wpmsga_date').on('click', function () {
1048
  jQuery('.wpmsga_date').removeClass('orange-button active');
1049
  jQuery(this).addClass('orange-button active');
1050
  jQuery('#wpms-reports' + slug).html('');
1051
  reports.init();
1052
  });
1053
+
1054
  jQuery('.wpmsga_report').on('click', function () {
1055
  jQuery('.wpmsga_report').removeClass('orange-button active');
1056
  jQuery(this).addClass('orange-button active');
1111
  'wpms_nonce': wpms_localize.wpms_nonce
1112
  },
1113
  success: function () {
1114
+ window.location.assign(wpmsItemData.admin_url+'admin.php?page=metaseo_google_analytics&view=wpms_gg_service_data');
1115
  }
1116
  });
1117
  });
assets/js/metaseo_admin.js CHANGED
@@ -4,7 +4,7 @@
4
  * and open the template in the editor.
5
  */
6
  var title_max_len = 60;
7
- var desc_max_len = 158;
8
  var keywords_max_len = 256;
9
  var metaseoValueHolder = {};
10
 
@@ -14,12 +14,12 @@ var metaseoValueHolder = {};
14
  * @param hide
15
  * @param nonce
16
  */
17
- function wpmsIgnore(option, hide, nonce){
18
- jQuery.post( ajaxurl, {
19
  action: "wpms_set_ignore"
20
- }, function( data ) {
21
- if ( data ) {
22
- jQuery( "#" + hide ).hide();
23
  }
24
  }
25
  )
@@ -809,7 +809,7 @@ function optimize_imgs(element) {
809
  var img = jQuery('[data-img-post-id="' + img_post_id + '"]');
810
  _metaSeoScanImages({'name': img.data('name'), 'img_post_id': img_post_id});
811
 
812
- setTimeout(function(){
813
  window.location.reload(true);
814
  }, 1000);
815
  } else {
@@ -1337,11 +1337,279 @@ jQuery(document).ready(function ($) {
1337
  });
1338
 
1339
 
1340
- $(".wpms-blocks-active").attr('disabled','disabled');
1341
 
1342
  $('.custom-bulk-metaseo-metadesc, .custom-bulk-metaseo-metatitle').on('mouseover', function () {
1343
  $(this).addClass('wpms-mouseover-frame');
1344
  }).on('mouseout', function () {
1345
  $(this).removeClass('wpms-mouseover-frame');
1346
  });
1347
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  * and open the template in the editor.
5
  */
6
  var title_max_len = 60;
7
+ var desc_max_len = 143;
8
  var keywords_max_len = 256;
9
  var metaseoValueHolder = {};
10
 
14
  * @param hide
15
  * @param nonce
16
  */
17
+ function wpmsIgnore(option, hide, nonce) {
18
+ jQuery.post(ajaxurl, {
19
  action: "wpms_set_ignore"
20
+ }, function (data) {
21
+ if (data) {
22
+ jQuery("#" + hide).hide();
23
  }
24
  }
25
  )
809
  var img = jQuery('[data-img-post-id="' + img_post_id + '"]');
810
  _metaSeoScanImages({'name': img.data('name'), 'img_post_id': img_post_id});
811
 
812
+ setTimeout(function () {
813
  window.location.reload(true);
814
  }, 1000);
815
  } else {
1337
  });
1338
 
1339
 
1340
+ $(".wpms-blocks-active").attr('disabled', 'disabled');
1341
 
1342
  $('.custom-bulk-metaseo-metadesc, .custom-bulk-metaseo-metatitle').on('mouseover', function () {
1343
  $(this).addClass('wpms-mouseover-frame');
1344
  }).on('mouseout', function () {
1345
  $(this).removeClass('wpms-mouseover-frame');
1346
  });
1347
+ });
1348
+
1349
+ function changeSettingProfile(profileId, profileList) {
1350
+ let selectedProfile;
1351
+ for (let i = 0; i < profileList.length; i++) {
1352
+ if (profileList[i][1] === profileId) {
1353
+ selectedProfile = profileList[i];
1354
+ break;
1355
+ }
1356
+ }
1357
+ // Select element
1358
+ let anonymizeIpElement = document.getElementById('anonymize-ip-tracking');
1359
+ let trackingTypeElement = document.getElementById('gg-tracking-type');
1360
+ let profileElement = document.getElementById('tracking-profile-info');
1361
+ if (profileId == 0 && profileElement != null) {
1362
+ profileElement.innerHTML = '';
1363
+ }
1364
+ if (profileId != 0 && selectedProfile !== 'undefined') {
1365
+ // Setting basic tracking
1366
+ if (typeof selectedProfile !== 'undefined' && selectedProfile[4] === 'GA4') {
1367
+ anonymizeIpElement.style.display = 'none';
1368
+ trackingTypeElement.style.display = 'none';
1369
+ } else {
1370
+ anonymizeIpElement.style.display = 'block';
1371
+ trackingTypeElement.style.display = 'block';
1372
+ }
1373
+
1374
+ // Display select profile info
1375
+ let profileInfoHtml = '';
1376
+ if (selectedProfile[0]) profileInfoHtml += 'Profile Name: ' + selectedProfile[0] + '<br>';
1377
+ if (selectedProfile[1]) profileInfoHtml += 'Profile ID: ' + selectedProfile[1] + '<br>';
1378
+ if (selectedProfile[2]) profileInfoHtml += 'Property ID: ' + selectedProfile[2] + '<br>';
1379
+ if (selectedProfile[3]) profileInfoHtml += 'Default URL: ' + selectedProfile[3] + '<br>';
1380
+ if (selectedProfile[4]) profileInfoHtml += 'Property Type: ' + selectedProfile[4] + '<br>';
1381
+ if (selectedProfile[5]) profileInfoHtml += 'Time Shift: ' + selectedProfile[5] + '<br>';
1382
+ if (selectedProfile[6]) profileInfoHtml += 'Time Zone: ' + selectedProfile[6] + '<br>';
1383
+ if (selectedProfile[7]) profileInfoHtml += 'Default Page: ' + selectedProfile[7] + '<br>';
1384
+ if (selectedProfile[8]) profileInfoHtml += 'Measurement ID: ' + selectedProfile[8];
1385
+
1386
+ if (profileElement != null) {
1387
+ profileElement.innerHTML = profileInfoHtml;
1388
+ }
1389
+ }
1390
+
1391
+
1392
+ }
1393
+
1394
+ function requireTrackingIdTitle(propertyType) {
1395
+ if (propertyType !== 'undefined') {
1396
+ if (propertyType === 'analytics4') {
1397
+ jQuery('#wpms-trackingId-title > label').text(wpms_localize.gg_disconnect_title.ga4);
1398
+ } else if(propertyType === 'tagmanager') {
1399
+ jQuery('#wpms-trackingId-title > label').text(wpms_localize.gg_disconnect_title.tagmanager);
1400
+ } else {
1401
+ jQuery('#wpms-trackingId-title > label').text(wpms_localize.gg_disconnect_title.universal);
1402
+ }
1403
+ }
1404
+ }
1405
+
1406
+ function reloadSelectContainer(data) {
1407
+ let selectElement = document.getElementById('wpms-displaySelectContainers');
1408
+ let html = '<option value="0">Select a container</option>';
1409
+ for (let i = 0; i < data.length; i++) {
1410
+ html += '<optgroup label="containers/' + data[i]['containerId'] + '">' +
1411
+ '<option value="' + data[i]['containerId'] + '">' + data[i]['name'] + '</option>' +
1412
+ '</optgroup>'
1413
+ }
1414
+ if (selectElement) {
1415
+ selectElement.innerHTML = html;
1416
+ }
1417
+ }
1418
+
1419
+ function tagmanagerDisplayAccountInfo(accountList, selectedID) {
1420
+ let accountInfo = document.getElementById('wpms-tagmanager-account-info');
1421
+ if (typeof accountList !== 'undefined' && typeof selectedID !== 'undefined') {
1422
+ let html = '';
1423
+ let i = 0
1424
+ for (; i < accountList.length; i++) {
1425
+ if (accountList[i]['accountId'] === selectedID) {
1426
+ break;
1427
+ }
1428
+ }
1429
+ if (accountList[i]['accountId']) html += 'Account ID: ' + accountList[i]['accountId'] + '<br>';
1430
+ if (accountList[i]['name']) html += 'Account Name: ' + accountList[i]['name'] + '<br>';
1431
+
1432
+ if (accountInfo) {
1433
+ accountInfo.innerHTML = html;
1434
+ }
1435
+ }
1436
+ }
1437
+
1438
+ function getSelectedTagManagerAccount(accountList, selectedID) {
1439
+ let titleInfo = document.getElementById('wpms-tagmanager-title-info');
1440
+ let accountDiv = document.getElementById('wpms-tagmanager-account-div');
1441
+ let wpmstmInformationDiv = document.getElementById('wpmstm-information');
1442
+
1443
+ if (typeof selectedID !== 'undefined' && typeof accountList !== 'undefined') {
1444
+ if (0 === parseInt(selectedID)) {
1445
+ titleInfo.style.display = 'none';
1446
+ accountDiv.style.display = 'none';
1447
+ wpmstmInformationDiv.style.display = 'none';
1448
+ document.getElementById('wpms-displaySelectContainers').innerHTML = '<option value="0">Select a container</option>';
1449
+ document.getElementById('wpms-tagmanager-container-div').style.display = 'none';
1450
+ }
1451
+
1452
+ // Call Tag Manager API to get containers
1453
+ if (0 < parseInt(selectedID)) {
1454
+ titleInfo.style.display = 'block';
1455
+ wpmstmInformationDiv.style.display = 'block';
1456
+ accountDiv.style.display = 'block';
1457
+ tagmanagerDisplayAccountInfo(accountList, selectedID);
1458
+ jQuery.ajax({
1459
+ url: wpms_localize.ajax_url,
1460
+ type: 'post',
1461
+ data: {
1462
+ 'accountID': selectedID,
1463
+ 'action': 'wpms',
1464
+ 'task': 'wpms_tagmanager_request_containers',
1465
+ 'wpms_nonce': wpms_localize.wpms_nonce
1466
+ },
1467
+ dataType: 'json',
1468
+ beforeSend: function () {
1469
+ jQuery('.load-containers-spinner').css('visibility', 'visible');
1470
+ },
1471
+ success: function (response) {
1472
+ reloadSelectContainer(response);
1473
+ jQuery('.load-containers-spinner').css('visibility', 'hidden');
1474
+ }
1475
+ });
1476
+ }
1477
+ }
1478
+ }
1479
+
1480
+ function tagmanagerDisplayContainerInfo(container) {
1481
+ // Selected element
1482
+ let containerInfo = document.getElementById('wpms-tagmanager-container-info');
1483
+
1484
+ if (typeof container !== 'undefined' && container) {
1485
+ let html = '';
1486
+
1487
+ if (container['containerId']) html += 'Container ID: ' + container['containerId'] + '<br>';
1488
+ if (container['name']) html += 'Container Name: ' + container['name'] + '<br>';
1489
+ if (container['path']) html += 'Container Path: ' + container['path'] + '<br>';
1490
+ if (container['publicId']) html += 'Public ID: ' + container['publicId'] + '<br>';
1491
+ if (container['usageContext']) html += 'Usage Context: ' + container['usageContext'][0] + '<br>';
1492
+ if (container['notes']) html += 'Notes: ' + container['notes'] + '<br>';
1493
+ if (containerInfo) {
1494
+ containerInfo.innerHTML = html;
1495
+ }
1496
+ }
1497
+ }
1498
+
1499
+ function getSelectedTagManagerContainer(selectedID) {
1500
+ let containerDiv = document.getElementById('wpms-tagmanager-container-div');
1501
+ if (typeof selectedID !== 'undefined' && selectedID > 1) {
1502
+ if (containerDiv) {
1503
+ containerDiv.style.display = 'block';
1504
+ }
1505
+ jQuery.ajax({
1506
+ url: wpms_localize.ajax_url,
1507
+ type: 'post',
1508
+ data: {
1509
+ 'containerID': selectedID,
1510
+ 'action': 'wpms',
1511
+ 'task': 'wpms_tagmanager_container_info',
1512
+ 'wpms_nonce': wpms_localize.wpms_nonce
1513
+ },
1514
+ dataType: 'json',
1515
+ beforeSend: function () {
1516
+
1517
+ },
1518
+ success: function (response) {
1519
+ tagmanagerDisplayContainerInfo(response);
1520
+ }
1521
+ });
1522
+ } else {
1523
+ if (containerDiv) {
1524
+ containerDiv.style.display = 'none';
1525
+ }
1526
+ }
1527
+ }
1528
+
1529
+ function reloadContainerInfo() {
1530
+ // Selected element
1531
+ let containerDiv = document.getElementById('wpms-tagmanager-container-div');
1532
+ if (containerDiv) {
1533
+ containerDiv.style.display = 'none';
1534
+ }
1535
+ }
1536
+
1537
+ // Javascript display setting account after reload connect with GTM
1538
+ function tagmanagerDisplayAccountSetting(accList) {
1539
+ // Hide old information
1540
+ accountList = accList; // global variable
1541
+ document.getElementById('wpmstm-information').style.display = 'none';
1542
+ document.getElementById('wpms-tagmanager-title-info').style.display = 'none';
1543
+ document.getElementById('wpms-displaySelectContainers').innerHTML = '<option value="0">Select a container</option>';
1544
+
1545
+ // Selected element
1546
+ const selectedEl = document.getElementById('wpms-tagmanager-account-setting');
1547
+ let elementHtml = '<lable class="ju-setting-label wpms_width_100">' + 'Account:' + '</lable>';
1548
+ if (typeof accList !== 'undefined' && accList[0] !== null) {
1549
+ elementHtml += '<p class="p-d-20">' +
1550
+ '<label>' +
1551
+ '<input type="hidden" name="wpms_nonce" value="' + wpms_localize.wpms_nonce + '">' +
1552
+ '<select id="wpms-tagmanager-accounts" class="wpms-large-input wpms_width_100" ' +
1553
+ 'onchange="reloadContainerInfo()" onclick="getSelectedTagManagerAccount(accountList, this.value)"' +
1554
+ 'name="wpms-tagmanager-accounts">' +
1555
+ '<option value="0">Select an account</option>';
1556
+ accList.forEach(function (account) {
1557
+ elementHtml += '<optgroup label="' + account['path'] + '"><option value="' + account['accountId'] + '">' + account['name'] + '</option></optgroup>';
1558
+ })
1559
+ elementHtml += '</select></label></p>';
1560
+ if (selectedEl) {
1561
+ selectedEl.innerHTML = elementHtml;
1562
+ }
1563
+ } else {
1564
+ elementHtml += '<p class="wpms_width_50" style="margin: auto;" id="wpms-create-tagmanager-account">' +
1565
+ '<a style="border: none; background-color: #00a0d2" class="ju-button orange-button" href="https://tagmanager.google.com/#/admin/accounts/create" target="_blank">' +
1566
+ 'Create an account</a></p>';
1567
+ if (selectedEl) {
1568
+ selectedEl.innerHTML = elementHtml;
1569
+ }
1570
+ }
1571
+ }
1572
+
1573
+ // Refresh connection with google tag manager
1574
+ function refreshTagmanagerConnect() {
1575
+ wpmstm_refresh_process = document.getElementById('wpms-refresh-gtm-process');
1576
+ jQuery.ajax({
1577
+ url: wpms_localize.ajax_url,
1578
+ type: 'post',
1579
+ data: {
1580
+ 'action': 'wpms',
1581
+ 'task': 'wpms_tagmanager_refresh_connect',
1582
+ 'wpms_nonce': wpms_localize.wpms_nonce
1583
+ },
1584
+ dataType: 'json',
1585
+ beforeSend: function () {
1586
+ jQuery('.refresh-tm-spinner').css('visibility', 'visible');
1587
+ },
1588
+ success: function (response) {
1589
+ if (response) {
1590
+ tagmanagerDisplayAccountSetting(response);
1591
+ jQuery('.refresh-tm-spinner').css('visibility', 'hidden');
1592
+ wpmsSnackbarModule.show({
1593
+ id: 'wpms-refresh-gtm-success',
1594
+ content: "Refresh successfully",
1595
+ auto_close: true,
1596
+ is_progress: true
1597
+ });
1598
+ }
1599
+ },
1600
+ error: function (jqXHR, textStatus, errorThrown) {
1601
+ jQuery('.refresh-tm-spinner').css('visibility', 'hidden');
1602
+ if (textStatus === 'error' && errorThrown === 'Internal Server Error') {
1603
+ jQuery('.wpmstm-error-enable-api').removeClass('hidden');
1604
+ setTimeout(function () {
1605
+ jQuery('.wpmstm-error-enable-api').addClass('hidden');
1606
+ }, 5000);
1607
+ } else {
1608
+ jQuery('.wpmstm-error-access-code').removeClass('hidden');
1609
+ setTimeout(function () {
1610
+ jQuery('.wpmstm-error-access-code').addClass('hidden');
1611
+ }, 5000);
1612
+ }
1613
+ }
1614
+ });
1615
+ }
assets/js/snackbar.js ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ /**
4
+ * Snackbar main module
5
+ */
6
+ /*
7
+ How to use snack module
8
+ wpmsSnackbarModule.show(
9
+ {
10
+ id: 'id-here',
11
+ content: 'content-alert',
12
+ icon: '',
13
+ auto_close: false,
14
+ is_progress: true,
15
+ ...
16
+ }
17
+ ); */
18
+ var wpmsSnackbarModule = void 0;
19
+ (function ($) {
20
+ wpmsSnackbarModule = {
21
+ snackbar_ids: [],
22
+ $snackbar_wrapper: null, // Snackbar jQuery wrapper
23
+ snackbar_defaults: {
24
+ onClose: function onClose() {}, // Callback function when snackbar is closed
25
+ is_undoable: false, // Show or not the undo button
26
+ onUndo: function onUndo() {}, // Callback function when snackbar is undoed
27
+ icon: '<span class="material-icons-outlined material-icons wpms-snack-icon">notification_important</span>',
28
+ is_closable: true, // Can this snackbar be closed by user
29
+ auto_close: true, // Do the snackbar close automatically
30
+ auto_close_delay: 6000, // Time to wait before closing automatically
31
+ is_progress: false, // Do we show the progress bar
32
+ percentage: null // Percentage of the progress bar
33
+ },
34
+
35
+ /**
36
+ * Initialize snackbar module
37
+ */
38
+ initModule: function initModule() {
39
+ wpmsSnackbarModule.$snackbar_wrapper = $('<div class="wpms-snackbar-wrapper"></div>').appendTo('body');
40
+ },
41
+
42
+ /**
43
+ * Display a new snackbar
44
+ * @param options
45
+ * @return HTMLElement the snackbar generated
46
+ */
47
+ show: function show(options) {
48
+ if (options === undefined) {
49
+ options = {};
50
+ }
51
+
52
+ // Set default values
53
+ options = $.extend({}, wpmsSnackbarModule.snackbar_defaults, options);
54
+
55
+ // If an id is set save it
56
+ if (typeof options.id === "undefined") {
57
+ options.id = options.content;
58
+ }
59
+ if (options.id !== undefined) {
60
+ wpmsSnackbarModule.snackbar_ids[options.id] = options;
61
+ }
62
+
63
+ return wpmsSnackbarModule.renderSnack(options);
64
+ },
65
+
66
+ renderSnack: function renderSnack(notification_options) {
67
+ var notification_class = 'wpms-snackbar-wrap';
68
+ if (typeof notification_options !== "undefined" && typeof notification_options.error !== "undefined" && notification_options.error) {
69
+ notification_class += ' wpms-snackbar-error';
70
+ }
71
+ var snack = '<div class="' + notification_class + '">';
72
+ var snack_count = 0;
73
+ Object.keys(wpmsSnackbarModule.snackbar_ids).map(function (snack_id, index) {
74
+ snack_count++;
75
+ var options = wpmsSnackbarModule.snackbar_ids[snack_id];
76
+ // Generate undo html if needed
77
+ var undo = '';
78
+ if (options.is_undoable) {
79
+ undo = '<a href="#" class="wpms-snackbar-undo">' + wpms.l18n.wpms_undo + '</a>';
80
+ }
81
+
82
+ var id = '';
83
+ if (options.id) {
84
+ id = 'data-id="' + options.id + '"';
85
+ }
86
+
87
+ snack += '<div ' + id + ' class="wpms-snackbar">\n ' + options.icon + '\n <div class="wpms-snackbar-content">' + options.content + '</div>\n ' + undo + ' \n </div>';
88
+ });
89
+
90
+ snack += '<a class="wpms-snackbar-close" href="#"><i class="material-icons">close</i></a>';
91
+ snack += '</div>';
92
+
93
+ // Add element to the DOM
94
+ $('.wpms-snackbar-wrap').remove();
95
+ if (snack_count > 0) {
96
+ var $snack = $(snack).prependTo(wpmsSnackbarModule.$snackbar_wrapper);
97
+
98
+ // Initialize undo function
99
+ $snack.find('.wpms-snackbar-undo').click(function (e) {
100
+ var snack_id = $(this).closest('.wpms-snackbar').data('id');
101
+ e.preventDefault();
102
+ wpmsSnackbarModule.snackbar_ids[snack_id].onUndo();
103
+ // Reset the close function as we've done an undo
104
+ wpmsSnackbarModule.snackbar_ids[snack_id].onClose = function () {};
105
+ // Finally close the snackbar
106
+ wpmsSnackbarModule.snackbar_ids[snack_id].close(snack_id);
107
+ });
108
+
109
+ Object.keys(wpmsSnackbarModule.snackbar_ids).map(function (snack_id, index) {
110
+ // Initialize autoclose feature
111
+ var options = wpmsSnackbarModule.snackbar_ids[snack_id];
112
+ if (options.auto_close) {
113
+ setTimeout(function () {
114
+ wpmsSnackbarModule.close(options.id);
115
+ }, options.auto_close_delay);
116
+ }
117
+ });
118
+
119
+ // Initialize close button
120
+ $snack.find('.wpms-snackbar-close').click(function (e) {
121
+ $(this).closest('.wpms-snackbar-wrap').remove();
122
+ wpmsSnackbarModule.snackbar_ids = [];
123
+ });
124
+ }
125
+ },
126
+
127
+ /**
128
+ * Remove a snackbar and call onClose callback if needed
129
+ * @param snack_id snackbar element
130
+ */
131
+ close: function close(snack_id) {
132
+ // Remove the id if exists
133
+ if (snack_id !== undefined) {
134
+ delete wpmsSnackbarModule.snackbar_ids[snack_id];
135
+ }
136
+
137
+ wpmsSnackbarModule.renderSnack();
138
+ },
139
+
140
+ /**
141
+ * Retrieve an existing snackbar from its id
142
+ * @param id
143
+ * @return {null|object}
144
+ */
145
+ getFromId: function getFromId(id) {
146
+ if (wpmsSnackbarModule.snackbar_ids[id] === undefined) {
147
+ return null;
148
+ }
149
+
150
+ return id;
151
+ },
152
+
153
+ /**
154
+ * Set the snackbar progress bar width
155
+ * @param $snack jQuery element representing a snackbar
156
+ * @param percentage int
157
+ */
158
+ setProgress: function setProgress($snack, percentage) {
159
+ if ($snack === null) {
160
+ return;
161
+ }
162
+
163
+ var $progress = $snack.find('.wpmsliner_progress > div');
164
+ if (percentage !== undefined) {
165
+ $progress.addClass('determinate').removeClass('indeterminate');
166
+ $progress.css('width', percentage + '%');
167
+ } else {
168
+ $progress.addClass('indeterminate').removeClass('determinate');
169
+ }
170
+ }
171
+ };
172
+
173
+ // Let's initialize wpms features
174
+ $(document).ready(function () {
175
+ wpmsSnackbarModule.initModule();
176
+ });
177
+ })(jQuery);
inc/class.metaseo-admin.php CHANGED
@@ -64,6 +64,13 @@ class MetaSeoAdmin
64
  */
65
  public $google_alanytics;
66
 
 
 
 
 
 
 
 
67
  /**
68
  * All settings for meta seo
69
  *
@@ -87,6 +94,7 @@ class MetaSeoAdmin
87
  $this->setErrorTimeout();
88
  $this->initSettings();
89
  $this->initGaSettings();
 
90
  if (!get_option('_wpms_dash_last_update', false)) {
91
  update_option('_wpms_dash_last_update', time());
92
  }
@@ -108,7 +116,7 @@ class MetaSeoAdmin
108
  }
109
 
110
  add_action('wp_ajax_wpms_set_ignore', array($this, 'setIgnore'));
111
- if (0 === (int) get_option('blog_public')) {
112
  add_action('admin_notices', array($this, 'publicWarning'));
113
  }
114
  add_action('wp_enqueue_editor', array($this, 'linkTitleField'), 20);
@@ -133,10 +141,10 @@ class MetaSeoAdmin
133
  add_action('edit_term', array($this, 'saveCategoryMeta'), 10, 3);
134
  }
135
  add_action('wp_ajax_wpms', array($this, 'startProcess'));
136
- add_action('wp_ajax_wpms_ga_save_information', array($this, 'wpmsGASaveInformation'));
137
  add_filter('wpms_the_content', array($this, 'wpmsTheContent'), 10, 2);
138
 
139
- $settings = get_option('_metaseo_settings');
140
  if (isset($settings['metaseo_removecatprefix']) && $settings['metaseo_removecatprefix'] === '1') {
141
  add_action('created_category', array($this, 'wpmsScheduleRewriteFlush'));
142
  add_action('edited_category', array($this, 'wpmsScheduleRewriteFlush'));
@@ -152,13 +160,13 @@ class MetaSeoAdmin
152
  public function initSettings()
153
  {
154
  $this->settings = wpmsGetDefaultSettings();
155
- $settings = get_option('_metaseo_settings');
156
 
157
  if (is_array($settings)) {
158
  $this->settings = array_merge($this->settings, $settings);
159
  }
160
 
161
- if ((isset($this->settings['metaseo_showtmetablock']) && (int) $this->settings['metaseo_showtmetablock'] === 1)) {
162
  $this->loadMetaBoxes();
163
  }
164
  }
@@ -171,34 +179,142 @@ class MetaSeoAdmin
171
  public function initGaSettings()
172
  {
173
  $this->ga_tracking = array(
174
- 'wpmsga_dash_tracking' => 1,
175
- 'wpmsga_dash_tracking_type' => 'universal',
176
- 'wpmsga_dash_anonim' => 0,
177
- 'wpmsga_dash_remarketing' => 0,
178
- 'wpmsga_event_tracking' => 0,
179
- 'wpmsga_event_downloads' => 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*',
180
- 'wpmsga_aff_tracking' => 0,
181
- 'wpmsga_event_affiliates' => '/out/',
182
- 'wpmsga_hash_tracking' => 0,
183
- 'wpmsga_author_dimindex' => 0,
184
- 'wpmsga_pubyear_dimindex' => 0,
185
- 'wpmsga_category_dimindex' => 0,
186
- 'wpmsga_user_dimindex' => 0,
187
- 'wpmsga_tag_dimindex' => 0,
188
- 'wpmsga_speed_samplerate' => 1,
189
- 'wpmsga_event_bouncerate' => 0,
190
- 'wpmsga_enhanced_links' => 0,
191
- 'wpmsga_dash_adsense' => 0,
192
  'wpmsga_crossdomain_tracking' => 0,
193
- 'wpmsga_crossdomain_list' => '',
194
- 'wpmsga_cookiedomain' => '',
195
- 'wpmsga_cookiename' => '',
196
- 'wpmsga_cookieexpires' => '',
197
- 'wpmsga_track_exclude' => array(),
198
- 'wpmsga_code_tracking' => ''
199
  );
200
  }
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  /**
203
  * Admin init
204
  *
@@ -262,7 +378,7 @@ class MetaSeoAdmin
262
 
263
  <?php
264
  $settings = get_option('_metaseo_settings');
265
- if (isset($settings['metaseo_showkeywords']) && (int) $settings['metaseo_showkeywords'] === 1) :
266
  ?>
267
  <div class="form-field" style="margin-top: 20px;margin-bottom: 20px;">
268
  <label class="wpms_custom_cat_field"
@@ -290,7 +406,7 @@ class MetaSeoAdmin
290
  <div class="cat-desc-len"><?php echo esc_html(MPMSCAT_DESC_LENGTH); ?></div>
291
  </div>
292
  <?php
293
- if (isset($settings['metaseo_canonical']) && (int) $settings['metaseo_canonical'] === 1) : ?>
294
  <div class="form-field" style="margin-top: 20px;margin-bottom: 20px;">
295
  <label class="wpms_custom_cat_field"
296
  data-tippy="<?php esc_attr_e('Put the canonical URL which this page should point to. By default, it\'s the permalink', 'wp-meta-seo') ?>">
@@ -330,13 +446,13 @@ class MetaSeoAdmin
330
  }
331
 
332
  $settings = get_option('_metaseo_settings');
333
- if (isset($settings['metaseo_showkeywords']) && (int) $settings['metaseo_showkeywords'] === 1) {
334
  if (isset($_POST['wpms_category_metakeywords'])) {
335
  update_term_meta($term_id, 'wpms_category_metakeywords', $_POST['wpms_category_metakeywords']);
336
  }
337
  }
338
 
339
- if (isset($settings['metaseo_canonical']) && (int) $settings['metaseo_canonical'] === 1) {
340
  if (isset($_POST['wpms_category_canonical'])) {
341
  // Set link to field
342
  $canonical = self::convertCanonicalUrlToSave($_POST['wpms_category_canonical']);
@@ -381,9 +497,9 @@ class MetaSeoAdmin
381
 
382
  wp_enqueue_style('wpms-category-field');
383
  wp_enqueue_script('wpms-category-field');
384
- $t_id = $tag->term_id;
385
- $metatitle = get_term_meta($t_id, 'wpms_category_metatitle', true);
386
- $metadesc = get_term_meta($t_id, 'wpms_category_metadesc', true);
387
  $metakeywords = get_term_meta($t_id, 'wpms_category_metakeywords', true);
388
  $metacanonical = get_term_meta($t_id, 'wpms_category_canonical', true);
389
  $metacanonical = self::convertCanonicalUrlToDisplay($metacanonical);
@@ -417,7 +533,7 @@ class MetaSeoAdmin
417
 
418
  <?php
419
  $settings = get_option('_metaseo_settings');
420
- if (isset($settings['metaseo_showkeywords']) && (int) $settings['metaseo_showkeywords'] === 1) :
421
  ?>
422
  <tr class="form-field">
423
  <th scope="row" valign="top">
@@ -474,7 +590,7 @@ class MetaSeoAdmin
474
  </td>
475
  </tr>
476
  <?php
477
- if (isset($settings['metaseo_canonical']) && (int) $settings['metaseo_canonical'] === 1) : ?>
478
  <tr class="form-field">
479
  <th scope="row" valign="top">
480
  <label for="extra1" class="wpms_custom_cat_field"
@@ -584,7 +700,7 @@ class MetaSeoAdmin
584
  ));
585
 
586
  if (empty($post_if)) {
587
- $content = '<div class="wall"
588
  style="background-color: #F2F3F7; border: 30px solid #fff; width: 90%; height: 90%; margin: 0 auto;">
589
 
590
  <h1 style="text-align: center; font-family:\'open-sans\', arial;
@@ -599,16 +715,16 @@ class MetaSeoAdmin
599
  href="' . get_home_url() . '"><< Go back to home page >></a></p>
600
  </div>';
601
  $_page404 = array(
602
- 'post_title' => $newtitle,
603
  'post_content' => $content,
604
- 'post_status' => 'publish',
605
  'post_excerpt' => 'metaseo_404_page',
606
- 'post_type' => 'page'
607
  );
608
  wp_insert_post($_page404);
609
  } else {
610
  $my_post = array(
611
- 'ID' => $post_if[0]->ID,
612
  'post_title' => $newtitle
613
  );
614
 
@@ -624,7 +740,7 @@ class MetaSeoAdmin
624
  public function updateLinksTable()
625
  {
626
  global $wpdb;
627
- $option_v = 'metaseo_db_version3.7.2';
628
  $db_installed = get_option($option_v, false);
629
  if (!$db_installed) {
630
  $wpdb->query('ALTER TABLE ' . $wpdb->prefix . 'wpms_links MODIFY `link_url` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL');
@@ -632,7 +748,7 @@ class MetaSeoAdmin
632
  }
633
 
634
  // Add index for wpms links
635
- $option_v = 'metaseo_db_version4.0.4';
636
  $db_installed = get_option($option_v, false);
637
  if (!$db_installed) {
638
  // Add index for wpms_links table;
@@ -655,7 +771,7 @@ class MetaSeoAdmin
655
  public function createDatabase()
656
  {
657
  global $wpdb;
658
- $option_v = 'metaseo_db_version3.3.0';
659
  $db_installed = get_option($option_v, false);
660
  if (!$db_installed) {
661
  // create table wpms_links
@@ -724,11 +840,11 @@ class MetaSeoAdmin
724
  );
725
  if ($post_if < 1) {
726
  $_sitemap_page = array(
727
- 'post_title' => 'WPMS HTML Sitemap',
728
  'post_content' => '',
729
- 'post_status' => 'publish',
730
  'post_excerpt' => 'metaseo_html_sitemap',
731
- 'post_type' => 'page',
732
  );
733
  wp_insert_post($_sitemap_page);
734
  }
@@ -737,7 +853,7 @@ class MetaSeoAdmin
737
  }
738
 
739
 
740
- $option_v = 'metaseo_db_version3.7.3';
741
  $db_installed = get_option($option_v, false);
742
  if (!$db_installed) {
743
  // create page 404
@@ -745,7 +861,7 @@ class MetaSeoAdmin
745
  update_option($option_v, true);
746
  }
747
 
748
- $option_v = 'metaseo_db_version4.0.0';
749
  $db_installed = get_option($option_v, false);
750
  if (!$db_installed) {
751
  $row = $wpdb->get_results($wpdb->prepare(
@@ -768,7 +884,7 @@ class MetaSeoAdmin
768
  */
769
  public function linkTitleField()
770
  {
771
- if (isset($this->settings['metaseo_linkfield']) && (int) $this->settings['metaseo_linkfield'] === 1) {
772
  wp_enqueue_script(
773
  'wpmslinkTitle',
774
  plugins_url('assets/js/wpms-link-title-field.js', dirname(__FILE__)),
@@ -807,7 +923,7 @@ class MetaSeoAdmin
807
  return;
808
  }
809
 
810
- if ((int) get_option('wpms_set_ignore') === 0) {
811
  return;
812
  }
813
 
@@ -858,7 +974,7 @@ class MetaSeoAdmin
858
  add_action('admin_print_scripts', function () {
859
  global $wp_filter;
860
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
861
- if ((!empty($_GET['page']) && in_array($_GET['page'], array('wpms-setup', 'metaseo_settings','metaseo_console')))) {
862
  if (is_user_admin()) {
863
  if (isset($wp_filter['user_admin_notices'])) {
864
  unset($wp_filter['user_admin_notices']);
@@ -948,7 +1064,7 @@ class MetaSeoAdmin
948
  if (is_plugin_active('oxygen/functions.php')) {
949
  $shortcodes = get_post_meta($post_id, 'ct_builder_shortcodes', true);
950
  $cf = do_shortcode($shortcodes);
951
- $content = $content.$cf;
952
  }
953
 
954
  return $content;
@@ -1025,7 +1141,7 @@ class MetaSeoAdmin
1025
  }
1026
  }
1027
  if (is_string($values)) {
1028
- $data .= ' '. $values;
1029
  }
1030
  return $data;
1031
  }
@@ -1054,30 +1170,30 @@ class MetaSeoAdmin
1054
  if ($caption) {
1055
  $inject .= '<div class="wp-caption">';
1056
  }
1057
- $inject = '<a href="'.$field['value']['url'].'" title="'.$field['value']['title'].'">';
1058
- $inject .= '<img src="'.$field['value']['sizes'][ $size ].'" alt="'.$field['value']['alt'].'" width="'.$field['value']['sizes'][ $size . '-width' ].'" height="'.$field['value']['sizes'][ $size . '-height' ].'" />';
1059
- $inject .= '</a>';
1060
  if ($caption) {
1061
- $inject .= '<p class="wp-caption-text">'. $caption.'</p>';
1062
  }
1063
- $inject .= '</div>';
1064
  } elseif (is_string($field['value'])) {
1065
- $inject = '<img src="'.$field['value'].'" />';
1066
  } else {
1067
  $inject = wp_get_attachment_image($field['value'], $size);
1068
  }
1069
  } elseif ($field['type'] === 'link') {
1070
  // Get link if field is array
1071
  if (is_array($field['value'])) {
1072
- $inject = '<a class="link-url" href="'.$field['value']['url'].'" target="'.($field['value']['target'] ? $field['value']['target'] : '_self').'">'.esc_html($field['value']['title']).'</a>';
1073
  } else {
1074
- $inject = '<a class="link-url" href="'.$field['value'].'">'.esc_html($field['value']).'</a>';
1075
  }
1076
  } else {
1077
  $inject = $this->getACFData($field['value']);
1078
  }
1079
 
1080
- $content .= ' '.$inject;
1081
  }
1082
  }
1083
  }
@@ -1105,6 +1221,7 @@ class MetaSeoAdmin
1105
 
1106
  return $content;
1107
  }
 
1108
  /**
1109
  * Ajax load page analysis
1110
  *
@@ -1120,17 +1237,17 @@ class MetaSeoAdmin
1120
  if (!current_user_can('edit_posts')) {
1121
  wp_send_json(array('status' => false));
1122
  }
1123
- $tooltip_page = array();
1124
  $tooltip_page['title_in_heading'] = esc_attr__('Check if a word of this content title
1125
  is also in a title heading (h1, h2...)', 'wp-meta-seo');
1126
  $tooltip_page['title_in_content'] = esc_attr__('Check if a word of this content
1127
  title is also in the text', 'wp-meta-seo');
1128
- $tooltip_page['page_url'] = esc_attr__('Does the page title match with the permalink (URL structure)', 'wp-meta-seo');
1129
- $tooltip_page['meta_title'] = esc_attr__('Is the meta title of this page filled?', 'wp-meta-seo');
1130
- $tooltip_page['meta_desc'] = esc_attr__('Is the meta description of this page filled?', 'wp-meta-seo');
1131
- $tooltip_page['image_resize'] = esc_attr__('Check for image HTML resizing in content
1132
  (usually image resized using handles)', 'wp-meta-seo');
1133
- $tooltip_page['image_alt'] = esc_attr__('Check for image Alt text and title', 'wp-meta-seo');
1134
  if (empty($_POST['datas'])) {
1135
  wp_send_json(false);
1136
  }
@@ -1139,15 +1256,15 @@ class MetaSeoAdmin
1139
  update_post_meta($_POST['datas']['post_id'], 'wpms_validate_analysis', '');
1140
  }
1141
 
1142
- $meta_analysis = get_post_meta((int) $_POST['datas']['post_id'], 'wpms_validate_analysis', true);
1143
- $check = 0;
1144
- $output = '';
1145
 
1146
  // title heading
1147
  $words_post_title = preg_split(
1148
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1149
  strtolower($_POST['datas']['title']),
1150
- - 1,
1151
  PREG_SPLIT_NO_EMPTY
1152
  );
1153
 
@@ -1158,7 +1275,7 @@ class MetaSeoAdmin
1158
 
1159
  $content = apply_filters(
1160
  'wpms_the_content',
1161
- '<div>' . html_entity_decode(stripcslashes($_POST['datas']['content'])) . '</div>',
1162
  $_POST['datas']['post_id']
1163
  );
1164
 
@@ -1174,7 +1291,7 @@ class MetaSeoAdmin
1174
  esc_html__('Page title word in content heading', 'wp-meta-seo'),
1175
  1
1176
  );
1177
- $check ++;
1178
  } else {
1179
  if ($content === '') {
1180
  $output .= $this->createFieldAnalysis(
@@ -1204,7 +1321,7 @@ class MetaSeoAdmin
1204
  $words_tagh1 = preg_split(
1205
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1206
  utf8_decode(strtolower($tagh1['contents'])),
1207
- - 1,
1208
  PREG_SPLIT_NO_EMPTY
1209
  );
1210
 
@@ -1224,7 +1341,7 @@ class MetaSeoAdmin
1224
  $words_tagh2 = preg_split(
1225
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1226
  utf8_decode(strtolower($tagh2['contents'])),
1227
- - 1,
1228
  PREG_SPLIT_NO_EMPTY
1229
  );
1230
  if (is_array($words_tagh2) && is_array($words_post_title)) {
@@ -1243,7 +1360,7 @@ class MetaSeoAdmin
1243
  $words_tagh3 = preg_split(
1244
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1245
  utf8_decode(strtolower($tagh3['contents'])),
1246
- - 1,
1247
  PREG_SPLIT_NO_EMPTY
1248
  );
1249
  if (is_array($words_tagh3) && is_array($words_post_title)) {
@@ -1262,7 +1379,7 @@ class MetaSeoAdmin
1262
  $words_tagh4 = preg_split(
1263
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1264
  utf8_decode(strtolower($tagh4['contents'])),
1265
- - 1,
1266
  PREG_SPLIT_NO_EMPTY
1267
  );
1268
  if (is_array($words_tagh4) && is_array($words_post_title)) {
@@ -1281,7 +1398,7 @@ class MetaSeoAdmin
1281
  $words_tagh5 = preg_split(
1282
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1283
  utf8_decode(strtolower($tagh5['contents'])),
1284
- - 1,
1285
  PREG_SPLIT_NO_EMPTY
1286
  );
1287
  if (is_array($words_tagh5) && is_array($words_post_title)) {
@@ -1300,7 +1417,7 @@ class MetaSeoAdmin
1300
  $words_tagh6 = preg_split(
1301
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1302
  utf8_decode(strtolower($tagh6['contents'])),
1303
- - 1,
1304
  PREG_SPLIT_NO_EMPTY
1305
  );
1306
  if (is_array($words_tagh6) && is_array($words_post_title)) {
@@ -1322,7 +1439,7 @@ class MetaSeoAdmin
1322
  esc_html__('Page title word in content heading', 'wp-meta-seo'),
1323
  1
1324
  );
1325
- $check ++;
1326
  } else {
1327
  $output .= $this->createFieldAnalysis(
1328
  'heading_title',
@@ -1336,16 +1453,16 @@ class MetaSeoAdmin
1336
  }
1337
 
1338
  // title content
1339
- $words_title = preg_split(
1340
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1341
  strtolower($_POST['datas']['title']),
1342
- - 1,
1343
  PREG_SPLIT_NO_EMPTY
1344
  );
1345
  $words_post_content = preg_split(
1346
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1347
  strtolower(strip_tags($content)),
1348
- - 1,
1349
  PREG_SPLIT_NO_EMPTY
1350
  );
1351
 
@@ -1369,7 +1486,7 @@ class MetaSeoAdmin
1369
  esc_html__('Page title word in content', 'wp-meta-seo'),
1370
  1
1371
  );
1372
- $check ++;
1373
  } else {
1374
  if ($test1) {
1375
  $output .= $this->createFieldAnalysis(
@@ -1379,7 +1496,7 @@ class MetaSeoAdmin
1379
  esc_html__('Page title word in content', 'wp-meta-seo'),
1380
  1
1381
  );
1382
- $check ++;
1383
  } else {
1384
  $output .= $this->createFieldAnalysis(
1385
  'content_title',
@@ -1401,12 +1518,12 @@ class MetaSeoAdmin
1401
  esc_html__('Page url matches with page title', 'wp-meta-seo'),
1402
  1
1403
  );
1404
- $check ++;
1405
  } else {
1406
  $mpageurl = '';
1407
  if ($_POST['datas']['editor'] === 'gutenberg') {
1408
  if (isset($_POST['datas']['mpageurl'])) {
1409
- $infos = pathinfo($_POST['datas']['mpageurl']);
1410
  $mpageurl = $infos['filename'];
1411
  }
1412
  } else {
@@ -1421,7 +1538,7 @@ class MetaSeoAdmin
1421
  esc_html__('Page url matches with page title', 'wp-meta-seo'),
1422
  1
1423
  );
1424
- $check ++;
1425
  } else {
1426
  $output .= $this->createFieldAnalysis(
1427
  'pageurl',
@@ -1442,10 +1559,10 @@ class MetaSeoAdmin
1442
  esc_html__('Meta title filled', 'wp-meta-seo'),
1443
  1
1444
  );
1445
- $check ++;
1446
  } else {
1447
  if (($_POST['datas']['meta_title'] !== ''
1448
- && mb_strlen($_POST['datas']['meta_title'], 'UTF-8') <= self::$title_length)) {
1449
  $output .= $this->createFieldAnalysis(
1450
  'metatitle',
1451
  $tooltip_page['meta_title'],
@@ -1453,7 +1570,7 @@ class MetaSeoAdmin
1453
  esc_html__('Meta title filled', 'wp-meta-seo'),
1454
  1
1455
  );
1456
- $check ++;
1457
  } else {
1458
  $output .= $this->createFieldAnalysis(
1459
  'metatitle',
@@ -1474,7 +1591,7 @@ class MetaSeoAdmin
1474
  esc_html__('Meta description filled', 'wp-meta-seo'),
1475
  1
1476
  );
1477
- $check ++;
1478
  } else {
1479
  if ($_POST['datas']['meta_desc'] !== ''
1480
  && mb_strlen($_POST['datas']['meta_desc'], 'UTF-8') <= self::$desc_length) {
@@ -1485,7 +1602,7 @@ class MetaSeoAdmin
1485
  esc_html__('Meta description filled', 'wp-meta-seo'),
1486
  1
1487
  );
1488
- $check ++;
1489
  } else {
1490
  $output .= $this->createFieldAnalysis(
1491
  'metadesc',
@@ -1513,11 +1630,11 @@ class MetaSeoAdmin
1513
  esc_html__('Image alt information filled', 'wp-meta-seo'),
1514
  1
1515
  );
1516
- $check += 2;
1517
  } else {
1518
  // Extracting the specified elements from the web page
1519
  $img_tags = wpmsExtractTags($content, 'img', true, true);
1520
- $img_wrong = false;
1521
  $img_wrong_alt = false;
1522
  foreach ($img_tags as $order => $tag) {
1523
  if (!isset($tag['attributes']['src'])) {
@@ -1537,8 +1654,8 @@ class MetaSeoAdmin
1537
  $img_wrong = false;
1538
  } else {
1539
  if (!empty($width_origin) && !empty($height_origin)) {
1540
- if ((isset($tag['attributes']['width']) && (int) $width_origin !== (int) $tag['attributes']['width'])
1541
- || (isset($tag['attributes']['height']) && (int) $height_origin !== (int) $tag['attributes']['height'])) {
1542
  $img_wrong = true;
1543
  }
1544
  }
@@ -1557,7 +1674,7 @@ class MetaSeoAdmin
1557
  esc_html__('Wrong image resize', 'wp-meta-seo'),
1558
  1
1559
  );
1560
- $check ++;
1561
  } else {
1562
  if (!$img_wrong) {
1563
  $output .= $this->createFieldAnalysis(
@@ -1567,7 +1684,7 @@ class MetaSeoAdmin
1567
  esc_html__('Wrong image resize', 'wp-meta-seo'),
1568
  1
1569
  );
1570
- $check ++;
1571
  } else {
1572
  $output .= $this->createFieldAnalysis(
1573
  'imgresize',
@@ -1587,7 +1704,7 @@ class MetaSeoAdmin
1587
  esc_html__('Image alt information filled', 'wp-meta-seo'),
1588
  1
1589
  );
1590
- $check ++;
1591
  } else {
1592
  if (!$img_wrong_alt) {
1593
  $output .= $this->createFieldAnalysis(
@@ -1597,7 +1714,7 @@ class MetaSeoAdmin
1597
  esc_html__('Image alt information filled', 'wp-meta-seo'),
1598
  1
1599
  );
1600
- $check ++;
1601
  } else {
1602
  $output .= $this->createFieldAnalysis(
1603
  'imgalt',
@@ -1617,7 +1734,7 @@ class MetaSeoAdmin
1617
  0
1618
  );
1619
 
1620
- $right_output = '<div class="metaseo_analysis metaseo_tool"><span style="font-weight: 700">'.esc_html__('Page SEO keywords check', 'wp-meta-seo').'</span></div>';
1621
 
1622
  $right_output .= $this->createFieldAnalysis(
1623
  'keyintitle',
@@ -1690,8 +1807,8 @@ class MetaSeoAdmin
1690
  if (!current_user_can('manage_options')) {
1691
  wp_send_json(false);
1692
  }
1693
- $post_id = $_POST['post_id'];
1694
- $key = 'wpms_validate_analysis';
1695
  $analysis = get_post_meta($post_id, $key, true);
1696
  if (empty($analysis)) {
1697
  $analysis = array();
@@ -1720,7 +1837,7 @@ class MetaSeoAdmin
1720
 
1721
  global $wpdb;
1722
  if (isset($_POST['link_id'])) {
1723
- $wpdb->delete($wpdb->prefix . 'wpms_links', array('id' => (int) $_POST['link_id']));
1724
  wp_send_json(array('status' => true));
1725
  }
1726
 
@@ -1750,7 +1867,7 @@ class MetaSeoAdmin
1750
  $wpdb->update(
1751
  $wpdb->prefix . 'wpms_links',
1752
  $value,
1753
- array('id' => (int) $link_id)
1754
  );
1755
  $post = get_post($link_detail->source_id);
1756
 
@@ -1771,7 +1888,7 @@ class MetaSeoAdmin
1771
  }
1772
 
1773
  $my_post = array(
1774
- 'ID' => (int) $link_detail->source_id,
1775
  'post_content' => $post_content
1776
  );
1777
  remove_action('post_updated', array('MetaSeoBrokenLinkTable', 'updatePost'));
@@ -1847,7 +1964,7 @@ class MetaSeoAdmin
1847
  */
1848
  protected function replaceNewTitle($post_content, $link_detail, $title)
1849
  {
1850
- $links = wpmsExtractTags($post_content, 'a', false, true);
1851
  $title_tag = sprintf('%s="%s"', 'title', esc_attr($title));
1852
  if (!empty($links)) {
1853
  foreach ($links as $link) {
@@ -1856,7 +1973,7 @@ class MetaSeoAdmin
1856
  // Not titlte, add new
1857
  $new_html = preg_replace(
1858
  '/<a/is',
1859
- '<a '.$title_tag,
1860
  $link['full_tag']
1861
  );
1862
  } else {
@@ -1867,7 +1984,7 @@ class MetaSeoAdmin
1867
  );
1868
  }
1869
  // Replace tag
1870
- $post_content = str_replace($link['full_tag'], $new_html, $post_content);
1871
  }
1872
  }
1873
  }
@@ -1895,7 +2012,7 @@ class MetaSeoAdmin
1895
  $link_detail = $wpdb->get_row($wpdb->prepare(
1896
  'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE id=%d',
1897
  array(
1898
- (int) $_POST['link_id']
1899
  )
1900
  ));
1901
  if (empty($link_detail)) {
@@ -1952,7 +2069,7 @@ class MetaSeoAdmin
1952
  wp_send_json(array('status' => false));
1953
  }
1954
  if (isset($_POST['page_id']) && isset($_POST['follow'])) {
1955
- update_post_meta((int) $_POST['page_id'], '_metaseo_metafollow', $_POST['follow']);
1956
 
1957
  /**
1958
  * Update follow/nofollow for robots meta tag of a page
@@ -2013,7 +2130,7 @@ class MetaSeoAdmin
2013
  }
2014
  global $wpdb;
2015
  $action_name = $_POST['action_name'];
2016
- $limit = 20;
2017
 
2018
  switch ($action_name) {
2019
  case 'copy_title_selected':
@@ -2021,7 +2138,7 @@ class MetaSeoAdmin
2021
  wp_send_json(array('status' => true));
2022
  }
2023
  foreach ($_POST['linkids'] as $linkId) {
2024
- $link = $wpdb->get_row(
2025
  $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE id = %d', $linkId)
2026
  );
2027
  $link_text = $link->link_text;
@@ -2063,8 +2180,8 @@ class MetaSeoAdmin
2063
  break;
2064
  case 'follow_all':
2065
  $follow = 1;
2066
- $i = 0;
2067
- $links = $wpdb->get_results(
2068
  'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE follow=0 AND type="url"'
2069
  );
2070
  foreach ($links as $link) {
@@ -2072,7 +2189,7 @@ class MetaSeoAdmin
2072
  wp_send_json(array('status' => false, 'message' => 'limit'));
2073
  } else {
2074
  $this->doUpdateFollow($link->id, $follow);
2075
- $i ++;
2076
  /**
2077
  * Update follow/nofollow for rel attribute of a link
2078
  *
@@ -2106,8 +2223,8 @@ class MetaSeoAdmin
2106
  break;
2107
  case 'nofollow_all':
2108
  $follow = 0;
2109
- $i = 0;
2110
- $links = $wpdb->get_results(
2111
  'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE follow=1 AND type="url"'
2112
  );
2113
  foreach ($links as $link) {
@@ -2115,7 +2232,7 @@ class MetaSeoAdmin
2115
  wp_send_json(array('status' => false, 'message' => 'limit'));
2116
  } else {
2117
  $this->doUpdateFollow($link->id, $follow);
2118
- $i ++;
2119
  /**
2120
  * Update follow/nofollow for rel attribute of a link
2121
  *
@@ -2145,7 +2262,7 @@ class MetaSeoAdmin
2145
  global $wpdb;
2146
  $link_detail = $wpdb->get_row($wpdb->prepare(
2147
  'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE id=%d',
2148
- array((int) $linkId)
2149
  ));
2150
  if (empty($link_detail)) {
2151
  wp_send_json(array('status' => false));
@@ -2155,12 +2272,12 @@ class MetaSeoAdmin
2155
  $wpdb->update(
2156
  $wpdb->prefix . 'wpms_links',
2157
  $value,
2158
- array('id' => (int) $linkId)
2159
  );
2160
 
2161
  $post = get_post($link_detail->source_id);
2162
  if (!empty($post)) {
2163
- $old_value = $post->post_content;
2164
  $edit_result = $this->editLinkHtml(
2165
  $old_value,
2166
  $link_detail->link_url,
@@ -2168,8 +2285,8 @@ class MetaSeoAdmin
2168
  $link_detail->meta_title,
2169
  $follow
2170
  );
2171
- $my_post = array(
2172
- 'ID' => (int) $link_detail->source_id,
2173
  'post_content' => $edit_result['content']
2174
  );
2175
  remove_action('post_updated', array('MetaSeoBrokenLinkTable', 'updatePost'));
@@ -2193,11 +2310,11 @@ class MetaSeoAdmin
2193
  {
2194
  //Save the old & new URLs for use in the edit callback.
2195
  $args = array(
2196
- 'old_url' => $old_url,
2197
- 'new_url' => $new_url,
2198
- 'new_text' => $new_text,
2199
  'meta_title' => $meta_title,
2200
- 'follow' => $follow
2201
  );
2202
 
2203
  //Find all links and replace those that match $old_url.
@@ -2241,7 +2358,7 @@ class MetaSeoAdmin
2241
  }
2242
 
2243
  if (is_plugin_active(WPMSEO_ADDON_FILENAME)) {
2244
- $params = array('enable', 'numberFrequency', 'showlinkFrequency');
2245
  $settinglink = array();
2246
  foreach ($params as $param) {
2247
  if (isset($_POST[$param])) {
@@ -2274,7 +2391,7 @@ class MetaSeoAdmin
2274
  wp_send_json(false);
2275
  }
2276
 
2277
- $params = array('separator', 'include_home', 'home_text', 'clickable', 'home_text_default');
2278
  $settinglink = array();
2279
  foreach ($params as $param) {
2280
  if (isset($_POST[$param])) {
@@ -2319,39 +2436,39 @@ class MetaSeoAdmin
2319
  if (!current_user_can('manage_options')) {
2320
  wp_send_json(array('status' => false));
2321
  }
2322
- $_POST = stripslashes_deep($_POST);
2323
- $response = new stdClass();
2324
- $metakey = strtolower(trim($_POST['metakey']));
2325
- $postID = intval($_POST['postid']);
2326
- $value = trim($_POST['value']);
2327
  $response->msg = esc_html__('Modification was saved', 'wp-meta-seo');
2328
  if ($metakey === 'metatitle') {
2329
  if (!update_post_meta($postID, '_metaseo_metatitle', $value)) {
2330
  $response->updated = false;
2331
- $response->msg = esc_html__('Meta title was not saved', 'wp-meta-seo');
2332
  } else {
2333
  $response->updated = true;
2334
- $response->msg = esc_html__('Meta title was saved', 'wp-meta-seo');
2335
  }
2336
  }
2337
 
2338
  if ($metakey === 'metadesc') {
2339
  if (!update_post_meta($postID, '_metaseo_metadesc', $value)) {
2340
  $response->updated = false;
2341
- $response->msg = esc_html__('Meta description was not saved', 'wp-meta-seo');
2342
  } else {
2343
  $response->updated = true;
2344
- $response->msg = esc_html__('Meta description was saved', 'wp-meta-seo');
2345
  }
2346
  }
2347
 
2348
  if ($metakey === 'metakeywords') {
2349
  if (!update_post_meta($postID, '_metaseo_metakeywords', $value)) {
2350
  $response->updated = false;
2351
- $response->msg = esc_html__('Meta keywords was not saved', 'wp-meta-seo');
2352
  } else {
2353
  $response->updated = true;
2354
- $response->msg = esc_html__('Meta keywords was saved', 'wp-meta-seo');
2355
  }
2356
  }
2357
  update_option('wpms_last_update_post', time());
@@ -2686,8 +2803,21 @@ class MetaSeoAdmin
2686
  array(),
2687
  WPMSEO_VERSION
2688
  );
2689
-
2690
-
 
 
 
 
 
 
 
 
 
 
 
 
 
2691
  wp_register_script(
2692
  'wpms-broken-link',
2693
  plugins_url('assets/js/wpms-broken-link.js', dirname(__FILE__)),
@@ -2750,52 +2880,77 @@ class MetaSeoAdmin
2750
  true
2751
  );
2752
 
 
 
 
 
 
 
 
 
 
 
 
2753
  /* @formatter:off */
2754
  wp_localize_script(
2755
  'wpms-google-analytics',
2756
  'wpmsItemData',
2757
  array(
2758
- 'ajaxurl' => admin_url('admin-ajax.php'),
2759
- 'security' => wp_create_nonce('wpms_backend_item_reports'),
2760
- 'dateList' => array(
2761
- 'realtime' => esc_html__('Real-Time', 'wp-meta-seo'),
2762
- 'today' => esc_html__('Today', 'wp-meta-seo'),
2763
- 'yesterday' => esc_html__('Yesterday', 'wp-meta-seo'),
2764
- '7daysAgo' => sprintf(esc_html__('Last %d Days', 'wp-meta-seo'), 7),
2765
- '14daysAgo' => sprintf(esc_html__('Last %d Days', 'wp-meta-seo'), 14),
2766
- '30daysAgo' => sprintf(esc_html__('Last %d Days', 'wp-meta-seo'), 30),
2767
- '90daysAgo' => sprintf(esc_html__('Last %d Days', 'wp-meta-seo'), 90),
2768
- '365daysAgo' => sprintf(_n('%s Year', '%s Years', 1, 'wp-meta-seo'), esc_html__('One', 'wp-meta-seo')),
2769
  '1095daysAgo' => sprintf(
2770
  _n('%s Year', '%s Years', 3, 'wp-meta-seo'),
2771
  esc_html__('Three', 'wp-meta-seo')
2772
  ),
2773
  ),
2774
- 'reportList' => array(
2775
- 'sessions' => esc_html__('Sessions', 'wp-meta-seo'),
2776
- 'users' => esc_html__('Users', 'wp-meta-seo'),
2777
- 'organicSearches' => esc_html__('Organic', 'wp-meta-seo'),
2778
- 'pageviews' => esc_html__('Page Views', 'wp-meta-seo'),
2779
- 'visitBounceRate' => esc_html__('Bounce Rate', 'wp-meta-seo'),
2780
- 'locations' => esc_html__('Location', 'wp-meta-seo'),
2781
- 'contentpages' => esc_html__('Pages', 'wp-meta-seo'),
2782
- 'referrers' => esc_html__('Referrers', 'wp-meta-seo'),
2783
- 'searches' => esc_html__('Searches', 'wp-meta-seo'),
2784
- 'trafficdetails' => esc_html__('Traffic', 'wp-meta-seo'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2785
  'technologydetails' => esc_html__('Technology', 'wp-meta-seo'),
2786
  ),
2787
- 'i18n' => array(
2788
  esc_html__('A JavaScript Error is blocking plugin resources!', 'wp-meta-seo'), //0
2789
  esc_html__('Traffic Mediums', 'wp-meta-seo'),
2790
  esc_html__('Visitor Type', 'wp-meta-seo'),
2791
  esc_html__('Search Engines', 'wp-meta-seo'),
2792
  esc_html__('Social Networks', 'wp-meta-seo'),
2793
- esc_html__('Sessions', 'wp-meta-seo'),
2794
  esc_html__('Users', 'wp-meta-seo'),
2795
  esc_html__('Page Views', 'wp-meta-seo'),
2796
  esc_html__('Bounce Rate', 'wp-meta-seo'),
2797
  esc_html__('Organic Search', 'wp-meta-seo'),
2798
- esc_html__('Pages/Session', 'wp-meta-seo'),
2799
  esc_html__('Invalid response', 'wp-meta-seo'),
2800
  esc_html__('Not enough data collected', 'wp-meta-seo'),
2801
  esc_html__('This report is unavailable', 'wp-meta-seo'),
@@ -2816,8 +2971,10 @@ class MetaSeoAdmin
2816
  esc_html__('You need select a profile:', 'wp-meta-seo') . '
2817
  <a href="' . esc_html(admin_url('admin.php?page=metaseo_google_analytics&view=wpmsga_trackcode')) . '">
2818
  ' . esc_html__('authorize the plugin', 'wp-meta-seo') . '</a>.',
 
 
2819
  ),
2820
- 'rtLimitPages' => 10,
2821
  'colorVariations' => array(
2822
  '#1e73be',
2823
  '#0459a4',
@@ -2827,11 +2984,11 @@ class MetaSeoAdmin
2827
  '#6abfff',
2828
  '#002671'
2829
  ),
2830
- 'region' => false,
2831
- 'language' => get_bloginfo('language'),
2832
- 'viewList' => false,
2833
- 'scope' => 'admin-widgets',
2834
- 'admin_url' => admin_url()
2835
  )
2836
  );
2837
 
@@ -2867,30 +3024,35 @@ class MetaSeoAdmin
2867
  }
2868
  // in JavaScript, object properties are accessed as ajax_object.ajax_url, ajax_object.we_value
2869
  wp_localize_script('wpmetaseoAdmin', 'wpms_localize', array(
2870
- 'filter_by' => esc_html__('Select to filter', 'wp-meta-seo'),
2871
- 'replaced' => esc_html__('Replaced', 'wp-meta-seo'),
2872
- 'index_link' => esc_html__('Loading...', 'wp-meta-seo'),
2873
- 'addon_active' => $addon_active,
2874
- 'ajax_url' => admin_url('admin-ajax.php'),
2875
- 'settings' => $this->settings,
2876
- 'wpms_cat_metatitle_length' => MPMSCAT_TITLE_LENGTH,
2877
- 'wpms_cat_metadesc_length' => MPMSCAT_DESC_LENGTH,
2878
  'wpms_cat_metakeywords_length' => MPMSCAT_KEYWORDS_LENGTH,
2879
- 'wpms_nonce' => wp_create_nonce('wpms_nonce'),
2880
- 'home_url' => home_url(),
2881
- 'images_url' => WPMETASEO_PLUGIN_URL . 'assets/images/',
2882
- 'dashboard_tooltips' => array(
2883
- 'url_rewwrite' => esc_html__('Optimized at: ', 'wp-meta-seo'),
2884
- 'images_resized' => esc_html__('HTML image resized (using handles) count: ', 'wp-meta-seo'),
2885
- 'metatitle' => esc_html__('Meta title filled: ', 'wp-meta-seo'),
2886
- 'image_alt' => esc_html__('Image data filled (in content): ', 'wp-meta-seo'),
2887
- 'metadesc' => esc_html__('Meta description filled: ', 'wp-meta-seo'),
2888
- 'link_title' => esc_html__('Links title completed: ', 'wp-meta-seo'),
2889
- 'fresh_content' => esc_html__('Last month new or updated content: ', 'wp-meta-seo'),
2890
- 'elements' => esc_html__(' elements', 'wp-meta-seo'),
2891
  'duplicate_title' => esc_html__('Duplicate Meta Titles: ', 'wp-meta-seo'),
2892
- 'duplicate_desc' => esc_html__('Duplicate Meta Descriptions: ', 'wp-meta-seo'),
2893
- '404' => esc_html__('Redirected 404 errors: ', 'wp-meta-seo')
 
 
 
 
 
2894
  )
2895
  ));
2896
 
@@ -2953,7 +3115,7 @@ class MetaSeoAdmin
2953
  <span class="wpms-column-display score <?php echo esc_attr($class); ?> <?php echo empty($score) ? 'disabled' : ''; ?>">
2954
  <strong><?php echo esc_html($score); ?></strong>
2955
  </span>
2956
- <span class="wpms-column-display keyword" <?php echo (empty($keywords))? 'style="display:none"' :'';?> >
2957
  <strong title="SEO Keyword" class="title"><?php esc_html_e('Keyword', 'wp-meta-seo'); ?>:</strong>
2958
  <span><?php echo $keywords ? esc_html($keywords) : ''; ?></span>
2959
  </span>
@@ -2992,11 +3154,11 @@ class MetaSeoAdmin
2992
  {
2993
  foreach (self::getAccessiblePostTypes() as $post_type) {
2994
  add_filter('edd_download_columns', array($this, 'addColumns'), 11);
2995
- add_filter('manage_'.$post_type.'_posts_columns', array($this, 'addColumns'), 11);
2996
 
2997
 
2998
- add_action('manage_'.$post_type.'_posts_custom_column', array($this, 'columnsContents'), 11, 2);
2999
- add_filter('manage_edit-'.$post_type.'_sortable_columns', array($this, 'sortableColumns'), 11);
3000
  }
3001
  }
3002
 
@@ -3127,13 +3289,13 @@ class MetaSeoAdmin
3127
  $title = !(empty($content_post->post_title)) ? $content_post->post_title : null;
3128
  $meta_title = get_post_meta($post_id, '_metaseo_metatitle', true);
3129
  $meta_desc = get_post_meta($post_id, '_metaseo_metadesc', true);
3130
- $check = 0;
3131
 
3132
  // title heading
3133
  $words_post_title = preg_split(
3134
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
3135
  strtolower($title),
3136
- - 1,
3137
  PREG_SPLIT_NO_EMPTY
3138
  );
3139
 
@@ -3142,7 +3304,7 @@ class MetaSeoAdmin
3142
  add_shortcode('mk_fancy_title', 'vc_do_shortcode');
3143
  }
3144
 
3145
- $content = apply_filters('wpms_the_content', '<div>' . html_entity_decode(stripcslashes($content)) . '</div>', $post_id);
3146
  $content = $this->injectAcfField($content, $post_id);
3147
  $content = $this->injectWooCommerce($content, $post_id);
3148
 
@@ -3282,16 +3444,16 @@ class MetaSeoAdmin
3282
  }
3283
 
3284
  // title content
3285
- $words_title = preg_split(
3286
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
3287
  strtolower($title),
3288
- - 1,
3289
  PREG_SPLIT_NO_EMPTY
3290
  );
3291
  $words_post_content = preg_split(
3292
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
3293
  strtolower(strip_tags($content)),
3294
- - 1,
3295
  PREG_SPLIT_NO_EMPTY
3296
  );
3297
 
@@ -3308,7 +3470,7 @@ class MetaSeoAdmin
3308
  }
3309
 
3310
  if ($test1) {
3311
- $check ++;
3312
  }
3313
 
3314
  // page url matches page title
@@ -3317,26 +3479,26 @@ class MetaSeoAdmin
3317
  $mpageurl = $pageurl['filename'];
3318
 
3319
  if (!empty($mpageurl) && !empty($mtitle) && $mpageurl === sanitize_title($mtitle)) {
3320
- $check ++;
3321
  }
3322
 
3323
  // meta title filled
3324
  if (($meta_title !== '' && mb_strlen($meta_title, 'UTF-8') <= self::$title_length)) {
3325
- $check ++;
3326
  }
3327
 
3328
  // desc filled
3329
  if ($meta_desc !== '' && mb_strlen($meta_desc, 'UTF-8') <= self::$desc_length) {
3330
- $check ++;
3331
  }
3332
 
3333
  // image resize
3334
  if ($content === '') {
3335
- $check += 2;
3336
  } else {
3337
  // Extracting the specified elements from the web page
3338
  $img_tags = wpmsExtractTags($content, 'img', true, true);
3339
- $img_wrong = false;
3340
  $img_wrong_alt = false;
3341
  foreach ($img_tags as $order => $tag) {
3342
  if (!isset($tag['attributes']['src'])) {
@@ -3356,8 +3518,8 @@ class MetaSeoAdmin
3356
  $img_wrong = false;
3357
  } else {
3358
  if (!empty($width_origin) && !empty($height_origin)) {
3359
- if ((isset($tag['attributes']['width']) && (int) $width_origin !== (int) $tag['attributes']['width'])
3360
- || (isset($tag['attributes']['height']) && (int) $height_origin !== (int) $tag['attributes']['height'])) {
3361
  $img_wrong = true;
3362
  }
3363
  }
@@ -3369,12 +3531,12 @@ class MetaSeoAdmin
3369
  }
3370
 
3371
  if (!$img_wrong) {
3372
- $check ++;
3373
  }
3374
 
3375
 
3376
  if (!$img_wrong_alt) {
3377
- $check ++;
3378
  }
3379
  }
3380
 
@@ -3405,7 +3567,7 @@ class MetaSeoAdmin
3405
  break;
3406
  }
3407
 
3408
- $pattern = '/<h[2-6][^>]*>.*'.$key.'.*<\/h[2-6]>/';
3409
  if (preg_match($pattern, $content)) {
3410
  $check++;
3411
  break;
@@ -3459,9 +3621,8 @@ class MetaSeoAdmin
3459
  /**
3460
  * Allow changing the capability users need to view the settings pages
3461
  *
3462
- * @api string Default capability
3463
- *
3464
  * @return string
 
3465
  */
3466
  $manage_options_cap = apply_filters('metaseo_manage_options_capability', 'manage_options');
3467
 
@@ -3615,11 +3776,103 @@ class MetaSeoAdmin
3615
  */
3616
  public function setErrorTimeout()
3617
  {
3618
- $midnight = strtotime('tomorrow 00:00:00'); // UTC midnight
3619
- $midnight = $midnight + 8 * 3600; // UTC 8 AM
3620
  $this->error_timeout = $midnight - time();
3621
  }
3622
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3623
  /**
3624
  * Retrieves all Google Analytics Views with details
3625
  *
@@ -3629,9 +3882,50 @@ class MetaSeoAdmin
3629
  {
3630
  try {
3631
  $ga_dash_profile_list = array();
3632
- $startindex = 1;
3633
- $totalresults = 65535; // use something big
3634
  while ($startindex < $totalresults) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3635
  $profiles = $this->service->management_profiles->listManagementProfiles(
3636
  '~all',
3637
  '~all',
@@ -3639,27 +3933,41 @@ class MetaSeoAdmin
3639
  'start-index' => $startindex
3640
  )
3641
  );
3642
- $items = $profiles->getItems();
3643
-
3644
  $totalresults = $profiles->getTotalResults();
3645
 
3646
  if ($totalresults > 0) {
3647
  foreach ($items as $profile) {
3648
- $timetz = new DateTimeZone($profile->getTimezone());
3649
- $localtime = new DateTime('now', $timetz);
3650
- $timeshift = strtotime($localtime->format('Y-m-d H:i:s')) - time();
3651
- $ga_dash_profile_list[] = array(
3652
  $profile->getName(),
3653
  $profile->getId(),
3654
  $profile->getwebPropertyId(),
3655
  $profile->getwebsiteUrl(),
 
3656
  $timeshift,
3657
  $profile->getTimezone(),
3658
- $profile->getDefaultPage()
 
3659
  );
3660
- $startindex ++;
3661
  }
3662
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
3663
  }
3664
 
3665
  if (empty($ga_dash_profile_list)) {
@@ -3712,11 +4020,15 @@ class MetaSeoAdmin
3712
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
3713
  switch ($_GET['page']) {
3714
  case 'metaseo_google_analytics':
3715
- echo "<div class='error wpms_msg_ublock'><p>";
3716
- esc_html_e('It seems that you use an adblocker, you need to
3717
- deactivate it for this page in order to load the Google Analytics scripts. ', 'wp-meta-seo');
3718
- echo '</p></div>';
3719
  $this->google_alanytics = get_option('wpms_google_alanytics');
 
 
 
 
 
 
 
 
3720
  if (isset($_POST['_metaseo_ggtracking_settings'])) {
3721
  if (empty($_POST['gadash_security'])
3722
  || !wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
@@ -3729,13 +4041,18 @@ class MetaSeoAdmin
3729
  <span class="screen-reader-text">Dismiss this notice.</span></button></div>';
3730
  }
3731
 
 
3732
  if (!empty($_POST['tableid_jail'])) {
3733
  if (empty($_POST['wpms_nonce'])
3734
  || !wp_verify_nonce($_POST['wpms_nonce'], 'wpms_nonce')) {
3735
  die();
3736
  }
3737
- $this->google_alanytics['tableid_jail'] = $_POST['tableid_jail'];
3738
- update_option('wpms_google_alanytics', $this->google_alanytics);
 
 
 
 
3739
  }
3740
 
3741
  $ga_tracking = get_option('_metaseo_ggtracking_settings');
@@ -3747,41 +4064,49 @@ class MetaSeoAdmin
3747
  wp_enqueue_style('wpms-tippy-style');
3748
  wp_enqueue_script('wpms-tippy-core');
3749
  wp_enqueue_script('wpms-tippy');
3750
- if (isset($_GET['view']) && $_GET['view'] === 'wpmsga_trackcode') {
 
 
 
 
 
3751
  wp_enqueue_style('wpms-backend-tracking-code');
3752
- include_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-analytics/ga-trackcode.php');
3753
- } else {
3754
  wp_enqueue_style('wpms-backend-item-reports');
 
 
3755
  if (isset($_POST['wpmsga_dash_clientid']) && isset($_POST['wpmsga_dash_clientsecret'])) {
 
3756
  if (empty($_POST['wpms_nonce'])
3757
  || !wp_verify_nonce($_POST['wpms_nonce'], 'wpms_nonce')) {
3758
  die();
3759
  }
3760
- $this->google_alanytics['wpmsga_dash_clientid'] = $_POST['wpmsga_dash_clientid'];
3761
  $this->google_alanytics['wpmsga_dash_clientsecret'] = $_POST['wpmsga_dash_clientsecret'];
3762
  update_option('wpms_google_alanytics', $this->google_alanytics);
3763
  }
3764
 
3765
  require_once 'lib/google-api/vendor/autoload.php';
3766
  $this->client = new WPMSGoogle\Client();
3767
- $this->client->setScopes('https://www.googleapis.com/auth/analytics.readonly');
 
 
3768
  $this->client->setAccessType('offline');
3769
  $this->client->setApplicationName('WP Meta SEO');
3770
  $this->client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
3771
  $this->setErrorTimeout();
3772
- $this->client = WpmsGaTools::setClient($this->client, $this->google_alanytics, $this->access);
3773
- $authUrl = $this->client->createAuthUrl();
3774
  $this->service = new Google_Service_Analytics($this->client);
3775
- $controller = new WpmsGapiController();
3776
 
3777
- if (!empty($_POST['wpms_ga_code'])) {
3778
- $wpms_ga_code = $_POST['wpms_ga_code'];
3779
- if (!stripos('x' . $wpms_ga_code, 'UA-', 1)) {
3780
  WpmsGaTools::deleteCache('gapi_errors');
3781
  WpmsGaTools::deleteCache('last_error');
3782
  WpmsGaTools::clearCache();
3783
  try {
3784
- $this->client->authenticate($wpms_ga_code);
3785
  $getAccessToken = $this->client->getAccessToken();
3786
  if ($getAccessToken) {
3787
  try {
@@ -3820,9 +4145,9 @@ class MetaSeoAdmin
3820
  $profiles = $this->refreshProfiles();
3821
  }
3822
 
3823
- $this->google_alanytics['code'] = $wpms_ga_code;
3824
  $this->google_alanytics['googleCredentials'] = $getAccessToken;
3825
- $this->google_alanytics['profile_list'] = $profiles;
3826
  update_option('wpms_google_alanytics', $this->google_alanytics);
3827
  } catch (Google_IO_Exception $e) {
3828
  echo '';
@@ -3832,21 +4157,45 @@ class MetaSeoAdmin
3832
  echo '';
3833
  }
3834
  } else {
3835
- echo '<div class="error"><p>' . esc_html__('The access code is
3836
  <strong>NOT</strong> your <strong>Tracking ID</strong>
3837
  (UA-XXXXX-X). Try again, and use the red link to get your access code', 'wp-meta-seo') . '.</p></div>';
3838
  }
3839
-
3840
  update_option('wpms_google_alanytics', $this->google_alanytics);
3841
- wp_redirect(admin_url('admin.php?page=metaseo_google_analytics&view=wpmsga_trackcode'));
3842
  exit;
3843
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3844
  $this->gaDisconnect = array(
3845
- 'wpms_ga_uax_reference' => '',
3846
- 'wpmsga_dash_tracking_type' => 'universal',
3847
- 'wpmsga_code_tracking' => ''
 
 
3848
  );
3849
- $gaDisconnect = get_option('_metaseo_ggtracking_disconnect_settings');
3850
  if (is_array($gaDisconnect)) {
3851
  $this->gaDisconnect = array_merge(
3852
  $this->gaDisconnect,
@@ -3854,9 +4203,19 @@ class MetaSeoAdmin
3854
  );
3855
  }
3856
 
3857
- if (isset($_POST['_metaseo_ga_disconnect'])) {
3858
- $_metaseo_ga_disconnect = $_POST['_metaseo_ga_disconnect'];
 
 
 
 
 
 
 
 
3859
  $_metaseo_ga_disconnect['wpmsga_code_tracking'] = stripslashes($_metaseo_ga_disconnect['wpmsga_code_tracking']);
 
 
3860
  update_option(
3861
  '_metaseo_ggtracking_disconnect_settings',
3862
  $_metaseo_ga_disconnect
@@ -3869,35 +4228,11 @@ class MetaSeoAdmin
3869
  );
3870
  }
3871
  }
3872
-
3873
- $this->google_alanytics = get_option('wpms_google_alanytics');
3874
- if (!empty($this->google_alanytics['googleCredentials'])) {
3875
- if (empty($this->ga_tracking['wpmsga_dash_tracking'])) {
3876
- echo '<div class="error"><p>' . esc_html__('The tracking component is
3877
- disabled. You should set <strong>Tracking Options</strong> to <strong>Enabled</strong>
3878
- ', 'wp-meta-seo') . '.</p></div>';
3879
- }
3880
- echo '<div class="wrap wpmsga_wrap">';
3881
- echo '<div>';
3882
- require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-analytics/menu.php');
3883
- echo '<h1 class="wpms-top-h1">' . esc_html__('Google Analytics Settings', 'wp-meta-seo') . '
3884
- <i class="material-icons intro-topic-tooltip" data-tippy="'.esc_html__('Create a Google Analytics property then connect WordPress to this Analytics property. You can then follow your traffic and include the data in your Email report (Pro Addon)', 'wp-meta-seo').'">help_outline</i>
3885
- </h1>';
3886
- echo '<div id="wpms-window-1"></div>';
3887
- echo '</div>';
3888
- echo '</div>';
3889
- } else {
3890
- if (empty($this->ga_tracking['wpmsga_dash_tracking'])) {
3891
- echo '<div class="error"><p>' . esc_html__('The tracking component is disabled.
3892
- You should set <strong>Tracking Options</strong> to <strong>Enabled</strong>
3893
- ', 'wp-meta-seo') . '.</p></div>';
3894
- }
3895
- require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-analytics/google-analytics.php');
3896
- }
3897
  }
3898
 
3899
- $w = '99%';
3900
- $text = esc_html__('Bring your WordPress website SEO to the next level with the PRO Addon: Email Report,
3901
  Google Search Console Connect, Automatic Redirect, Advanced Sitemaps and more!', 'wp-meta-seo');
3902
  $class_btn_close = 'close_gga';
3903
  require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php');
@@ -3938,20 +4273,20 @@ class MetaSeoAdmin
3938
  $_SESSION['_metaseo_settings_search_console'] = 1;
3939
  }
3940
  }
3941
- $posts = get_posts(array('post_type' => 'page', 'posts_per_page' => - 1, 'numberposts' => - 1));
3942
  $types_404 = array(
3943
- 'none' => 'None',
3944
  'wp-meta-seo-page' => esc_html__('WP Meta SEO page', 'wp-meta-seo'),
3945
- 'custom_page' => esc_html__('Custom page', 'wp-meta-seo')
3946
  );
3947
 
3948
  // get settings 404
3949
  $defaul_settings_404 = array(
3950
  'wpms_redirect_homepage' => 0,
3951
- 'wpms_type_404' => 'none',
3952
- 'wpms_page_redirected' => 'none'
3953
  );
3954
- $wpms_settings_404 = get_option('wpms_settings_404');
3955
  if (is_array($wpms_settings_404)) {
3956
  $defaul_settings_404 = array_merge($defaul_settings_404, $wpms_settings_404);
3957
  }
@@ -3961,12 +4296,12 @@ class MetaSeoAdmin
3961
  if (empty($home_title)) {
3962
  $home_title = get_bloginfo('title');
3963
  }
3964
- $breadcrumbs = array(
3965
- 'separator' => ' &gt; ',
3966
- 'include_home' => 1,
3967
- 'home_text' => $home_title,
3968
  'home_text_default' => 0,
3969
- 'clickable' => 1
3970
  );
3971
  $breadcrumb_settings = get_option('_metaseo_breadcrumbs');
3972
  if (is_array($breadcrumb_settings)) {
@@ -3975,13 +4310,13 @@ class MetaSeoAdmin
3975
 
3976
  // email settings
3977
  $email_settings = array(
3978
- 'enable' => 0,
3979
- 'host' => 'smtp.gmail.com',
3980
  'type_encryption' => 'ssl',
3981
- 'port' => '465',
3982
- 'autentication' => 'yes',
3983
- 'username' => '',
3984
- 'password' => '',
3985
  );
3986
 
3987
  $mailsettings = get_option('wpms_email_settings');
@@ -3993,8 +4328,8 @@ class MetaSeoAdmin
3993
 
3994
  // link settings
3995
  $link_settings = array(
3996
- 'enable' => 0,
3997
- 'numberFrequency' => 1,
3998
  'showlinkFrequency' => 'month'
3999
  );
4000
 
@@ -4007,14 +4342,14 @@ class MetaSeoAdmin
4007
 
4008
  // local business settings
4009
  $local_business = array(
4010
- 'enable' => 0,
4011
- 'logo' => '',
4012
- 'type_name' => '',
4013
- 'country' => '',
4014
- 'address' => '',
4015
- 'city' => '',
4016
- 'state' => '',
4017
- 'phone' => '',
4018
  'pricerange' => '$$'
4019
  );
4020
 
@@ -4022,13 +4357,13 @@ class MetaSeoAdmin
4022
  if (is_array($business)) {
4023
  $local_business = array_merge($local_business, $business);
4024
  }
4025
- $countrys = apply_filters('wpms_get_countryList', array());
4026
  $local_business_html = apply_filters('wpmsaddon_local_business', '', $local_business, $countrys);
4027
 
4028
  $search_console_html = apply_filters('wpmsaddon_search_console', '');
4029
 
4030
  $default_settings = wpmsGetDefaultSettings();
4031
- $settings = get_option('_metaseo_settings');
4032
  if (is_array($settings)) {
4033
  $settings = array_merge($default_settings, $settings);
4034
  } else {
@@ -4087,20 +4422,20 @@ class MetaSeoAdmin
4087
  switch ($_POST['action_name']) {
4088
  case 'img-copy-alt':
4089
  $margs = array(
4090
- 'posts_per_page' => - 1,
4091
- 'post_type' => 'attachment',
4092
- 'post_status' => 'any',
4093
- 'meta_query' => array(
4094
  'relation' => 'OR',
4095
  array(
4096
- 'key' => '_wp_attachment_image_alt',
4097
- 'value' => '',
4098
  'compare' => '!='
4099
  )
4100
  )
4101
  );
4102
 
4103
- $m_newquery = new WP_Query($margs);
4104
  $mposts_empty_alt = $m_newquery->get_posts();
4105
  if (!empty($mposts_empty_alt)) {
4106
  wp_send_json(true);
@@ -4157,9 +4492,9 @@ class MetaSeoAdmin
4157
  $total = $wpdb->get_var('SELECT COUNT(posts.ID) as total FROM ' . $wpdb->prefix . 'posts as posts
4158
  WHERE posts.post_type = "attachment"');
4159
 
4160
- $j = ceil((int) $total / $limit);
4161
- for ($i = 0; $i <= $j; $i ++) {
4162
- $ofset = $i * $limit;
4163
  $attachments = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'posts as posts
4164
  WHERE posts.post_type = %s LIMIT %d OFFSET %d', array('attachment', $limit, $ofset)));
4165
 
@@ -4214,18 +4549,18 @@ class MetaSeoAdmin
4214
  switch ($_POST['action_name']) {
4215
  case 'img-copy-alt':
4216
  $margs = array(
4217
- 'posts_per_page' => - 1,
4218
- 'post_type' => 'attachment',
4219
- 'post_status' => 'any',
4220
- 'post__in' => $ids
4221
  );
4222
 
4223
- $m_newquery = new WP_Query($margs);
4224
  $mposts_empty_alt = $m_newquery->get_posts();
4225
  if (!empty($mposts_empty_alt)) {
4226
  foreach ($mposts_empty_alt as $post) {
4227
  $i_info_url = pathinfo($post->guid);
4228
- $value = $i_info_url['filename'];
4229
  /**
4230
  * Filter before update meta for image
4231
  *
@@ -4255,7 +4590,7 @@ class MetaSeoAdmin
4255
  if (!empty($posts_result)) {
4256
  foreach ($posts_result as $post) {
4257
  $i_info_url = pathinfo($post->guid);
4258
- $value = $i_info_url['filename'];
4259
  /**
4260
  * Filter before update meta for image
4261
  *
@@ -4324,18 +4659,18 @@ class MetaSeoAdmin
4324
 
4325
  if (isset($_POST['sl_bulk']) && $_POST['sl_bulk'] === 'all') { // for select a;;
4326
  $margs = array(
4327
- 'posts_per_page' => - 1,
4328
- 'post_type' => $post_types,
4329
- 'post_status' => 'any'
4330
  );
4331
  } else { // for select some post
4332
  if (isset($_POST['ids'])) {
4333
- $ids = $_POST['ids'];
4334
  $margs = array(
4335
- 'posts_per_page' => - 1,
4336
- 'post_type' => $post_types,
4337
- 'post_status' => 'any',
4338
- 'post__in' => $ids
4339
  );
4340
  } else {
4341
  wp_send_json(false);
@@ -4343,7 +4678,7 @@ class MetaSeoAdmin
4343
  }
4344
 
4345
  $m_newquery = new WP_Query($margs);
4346
- $mposts = $m_newquery->get_posts();
4347
  if (!empty($mposts)) {
4348
  foreach ($mposts as $post) {
4349
  $value = $post->post_title;
@@ -4393,7 +4728,7 @@ class MetaSeoAdmin
4393
  *
4394
  * @return void
4395
  */
4396
- public function wpmsGASaveInformation()
4397
  {
4398
  check_ajax_referer('wpms_nonce', 'wpms_nonce');
4399
 
@@ -4409,11 +4744,13 @@ class MetaSeoAdmin
4409
  require_once WPMETASEO_PLUGIN_DIR . 'inc/lib/google-api/vendor/autoload.php';
4410
 
4411
  $client = new WPMSGoogle\Client();
4412
- $client->setScopes('https://www.googleapis.com/auth/analytics.readonly');
 
 
4413
  $client->setAccessType('offline');
4414
  $client->setApplicationName('WP Meta SEO');
4415
  $client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
4416
- $client = WpmsGaTools::setClient($client, array(), array($google_alanytics['wpmsga_dash_clientid'], $google_alanytics['wpmsga_dash_clientsecret']));
4417
  $authUrl = $client->createAuthUrl();
4418
 
4419
  if (!empty($authUrl)) {
@@ -4519,6 +4856,15 @@ class MetaSeoAdmin
4519
  case 'backend_item_reports':
4520
  MetaSeoGoogleAnalytics::itemsReport();
4521
  break;
 
 
 
 
 
 
 
 
 
4522
  case 'ga_clearauthor':
4523
  MetaSeoGoogleAnalytics::clearAuthor();
4524
  break;
64
  */
65
  public $google_alanytics;
66
 
67
+ /**
68
+ * Google Tag Manager options setting
69
+ *
70
+ * @var Google tag manager options
71
+ */
72
+ public $google_tagmanager;
73
+
74
  /**
75
  * All settings for meta seo
76
  *
94
  $this->setErrorTimeout();
95
  $this->initSettings();
96
  $this->initGaSettings();
97
+ $this->initTagManagerSetting();
98
  if (!get_option('_wpms_dash_last_update', false)) {
99
  update_option('_wpms_dash_last_update', time());
100
  }
116
  }
117
 
118
  add_action('wp_ajax_wpms_set_ignore', array($this, 'setIgnore'));
119
+ if (0 === (int)get_option('blog_public')) {
120
  add_action('admin_notices', array($this, 'publicWarning'));
121
  }
122
  add_action('wp_enqueue_editor', array($this, 'linkTitleField'), 20);
141
  add_action('edit_term', array($this, 'saveCategoryMeta'), 10, 3);
142
  }
143
  add_action('wp_ajax_wpms', array($this, 'startProcess'));
144
+ add_action('wp_ajax_wpms_gg_save_information', array($this, 'wpmsGGSaveInformation'));
145
  add_filter('wpms_the_content', array($this, 'wpmsTheContent'), 10, 2);
146
 
147
+ $settings = get_option('_metaseo_settings');
148
  if (isset($settings['metaseo_removecatprefix']) && $settings['metaseo_removecatprefix'] === '1') {
149
  add_action('created_category', array($this, 'wpmsScheduleRewriteFlush'));
150
  add_action('edited_category', array($this, 'wpmsScheduleRewriteFlush'));
160
  public function initSettings()
161
  {
162
  $this->settings = wpmsGetDefaultSettings();
163
+ $settings = get_option('_metaseo_settings');
164
 
165
  if (is_array($settings)) {
166
  $this->settings = array_merge($this->settings, $settings);
167
  }
168
 
169
+ if ((isset($this->settings['metaseo_showtmetablock']) && (int)$this->settings['metaseo_showtmetablock'] === 1)) {
170
  $this->loadMetaBoxes();
171
  }
172
  }
179
  public function initGaSettings()
180
  {
181
  $this->ga_tracking = array(
182
+ 'wpmsga_dash_tracking' => 1,
183
+ 'wpmsga_dash_tracking_type' => 'universal',
184
+ 'wpmsga_dash_anonim' => 0,
185
+ 'wpmsga_dash_remarketing' => 0,
186
+ 'wpmsga_event_tracking' => 0,
187
+ 'wpmsga_event_downloads' => 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*',
188
+ 'wpmsga_aff_tracking' => 0,
189
+ 'wpmsga_event_affiliates' => '/out/',
190
+ 'wpmsga_hash_tracking' => 0,
191
+ 'wpmsga_author_dimindex' => 0,
192
+ 'wpmsga_pubyear_dimindex' => 0,
193
+ 'wpmsga_category_dimindex' => 0,
194
+ 'wpmsga_user_dimindex' => 0,
195
+ 'wpmsga_tag_dimindex' => 0,
196
+ 'wpmsga_speed_samplerate' => 1,
197
+ 'wpmsga_event_bouncerate' => 0,
198
+ 'wpmsga_enhanced_links' => 0,
199
+ 'wpmsga_dash_adsense' => 0,
200
  'wpmsga_crossdomain_tracking' => 0,
201
+ 'wpmsga_crossdomain_list' => '',
202
+ 'wpmsga_cookiedomain' => '',
203
+ 'wpmsga_cookiename' => '',
204
+ 'wpmsga_cookieexpires' => '',
205
+ 'wpmsga_track_exclude' => array(),
206
+ 'wpmsga_code_tracking' => ''
207
  );
208
  }
209
 
210
+ /**
211
+ * Init GTM setting
212
+ *
213
+ * @return void
214
+ */
215
+ public function initTagManagerSetting()
216
+ {
217
+ $this->google_tagmanager = array(
218
+ 'list_accounts' => array(),
219
+ 'list_containers' => array(),
220
+ 'selected_account' => '',
221
+ 'selected_container' => ''
222
+ );
223
+ }
224
+
225
+ /**
226
+ * Ajax request google tag manager containers list
227
+ *
228
+ * @return mixed
229
+ */
230
+ public function tagmanagerContainersReport()
231
+ {
232
+ if (empty($_POST['wpms_nonce'])
233
+ || !wp_verify_nonce($_POST['wpms_nonce'], 'wpms_nonce')) {
234
+ die();
235
+ }
236
+ $accont_id = $_POST['accountID'];
237
+ if (isset($accont_id) && $accont_id) {
238
+ $accont_id = sanitize_text_field($accont_id);
239
+ require_once(WPMETASEO_PLUGIN_DIR . 'inc/google-tag-manager/wpms-tagmanager-api.php');
240
+ $wpmstm = new WpmsTagManagerController();
241
+ $list_containers = $wpmstm->getListContainers($accont_id);
242
+ $this->google_tagmanager = get_option('wpms_tagmanager_setting');
243
+ $listsContainer = $list_containers->getContainer();
244
+ $lists = array();
245
+ foreach ($listsContainer as $container) {
246
+ $lists[] = array(
247
+ 'containerId' => $container->getContainerId(),
248
+ 'name' => $container->getName(),
249
+ 'path' => $container->getPath(),
250
+ 'publicId' => $container->getPublicId(),
251
+ 'usageContext' => $container->getUsageContext(),
252
+ 'notes' => $container->getNotes(),
253
+ );
254
+ }
255
+ $this->google_tagmanager['list_containers'] = $lists;
256
+ update_option('wpms_tagmanager_setting', $this->google_tagmanager);
257
+ return wp_send_json($list_containers->getContainer());
258
+ }
259
+ }
260
+
261
+ /**
262
+ * Ajax return tag manager container information
263
+ *
264
+ * @return mixed
265
+ */
266
+ public function tagmanagerContainerInfo()
267
+ {
268
+ if (empty($_POST['wpms_nonce'])
269
+ || !wp_verify_nonce($_POST['wpms_nonce'], 'wpms_nonce')) {
270
+ die();
271
+ }
272
+ $container_id = $_POST['containerID'];
273
+ if (isset($container_id) && $container_id) {
274
+ $container_id = sanitize_text_field($container_id);
275
+ $gg_tagmanager = get_option('wpms_tagmanager_setting');
276
+ $gg_tagmanager_containers = $gg_tagmanager['list_containers'];
277
+ $containerIndex = 0;
278
+ foreach ($gg_tagmanager_containers as $container) {
279
+ if ($container['containerId'] === $container_id) {
280
+ break;
281
+ }
282
+ $containerIndex++;
283
+ }
284
+
285
+ return wp_send_json($gg_tagmanager_containers[$containerIndex]);
286
+ }
287
+ }
288
+
289
+ /**
290
+ * Ajax refresh tag manager connect
291
+ *
292
+ * @return mixed
293
+ */
294
+ public function tagmanagerRefreshConnect()
295
+ {
296
+ // Update list accounts tag managers
297
+ require_once(WPMETASEO_PLUGIN_DIR . 'inc/google-tag-manager/wpms-tagmanager-api.php');
298
+ $wpmstm_controller = new WpmsTagManagerController();
299
+ $wpmstm_listAccounts = $wpmstm_controller->getListAccounts();
300
+ $wpmstm_accounts = $wpmstm_listAccounts->getAccount();
301
+ if (isset($wpmstm_accounts[0])) {
302
+ $lists_acc = array();
303
+ foreach ($wpmstm_accounts as $account) {
304
+ $lists_acc[] = array(
305
+ 'accountId' => $account->getAccountId(),
306
+ 'name' => $account->getName(),
307
+ 'path' => $account->getPath(),
308
+ );
309
+ }
310
+ $this->google_tagmanager['list_accounts'] = $lists_acc;
311
+ update_option('wpms_tagmanager_setting', $this->google_tagmanager);
312
+ return wp_send_json($this->google_tagmanager['list_accounts']);
313
+ } else {
314
+ return false;
315
+ }
316
+ }
317
+
318
  /**
319
  * Admin init
320
  *
378
 
379
  <?php
380
  $settings = get_option('_metaseo_settings');
381
+ if (isset($settings['metaseo_showkeywords']) && (int)$settings['metaseo_showkeywords'] === 1) :
382
  ?>
383
  <div class="form-field" style="margin-top: 20px;margin-bottom: 20px;">
384
  <label class="wpms_custom_cat_field"
406
  <div class="cat-desc-len"><?php echo esc_html(MPMSCAT_DESC_LENGTH); ?></div>
407
  </div>
408
  <?php
409
+ if (isset($settings['metaseo_canonical']) && (int)$settings['metaseo_canonical'] === 1) : ?>
410
  <div class="form-field" style="margin-top: 20px;margin-bottom: 20px;">
411
  <label class="wpms_custom_cat_field"
412
  data-tippy="<?php esc_attr_e('Put the canonical URL which this page should point to. By default, it\'s the permalink', 'wp-meta-seo') ?>">
446
  }
447
 
448
  $settings = get_option('_metaseo_settings');
449
+ if (isset($settings['metaseo_showkeywords']) && (int)$settings['metaseo_showkeywords'] === 1) {
450
  if (isset($_POST['wpms_category_metakeywords'])) {
451
  update_term_meta($term_id, 'wpms_category_metakeywords', $_POST['wpms_category_metakeywords']);
452
  }
453
  }
454
 
455
+ if (isset($settings['metaseo_canonical']) && (int)$settings['metaseo_canonical'] === 1) {
456
  if (isset($_POST['wpms_category_canonical'])) {
457
  // Set link to field
458
  $canonical = self::convertCanonicalUrlToSave($_POST['wpms_category_canonical']);
497
 
498
  wp_enqueue_style('wpms-category-field');
499
  wp_enqueue_script('wpms-category-field');
500
+ $t_id = $tag->term_id;
501
+ $metatitle = get_term_meta($t_id, 'wpms_category_metatitle', true);
502
+ $metadesc = get_term_meta($t_id, 'wpms_category_metadesc', true);
503
  $metakeywords = get_term_meta($t_id, 'wpms_category_metakeywords', true);
504
  $metacanonical = get_term_meta($t_id, 'wpms_category_canonical', true);
505
  $metacanonical = self::convertCanonicalUrlToDisplay($metacanonical);
533
 
534
  <?php
535
  $settings = get_option('_metaseo_settings');
536
+ if (isset($settings['metaseo_showkeywords']) && (int)$settings['metaseo_showkeywords'] === 1) :
537
  ?>
538
  <tr class="form-field">
539
  <th scope="row" valign="top">
590
  </td>
591
  </tr>
592
  <?php
593
+ if (isset($settings['metaseo_canonical']) && (int)$settings['metaseo_canonical'] === 1) : ?>
594
  <tr class="form-field">
595
  <th scope="row" valign="top">
596
  <label for="extra1" class="wpms_custom_cat_field"
700
  ));
701
 
702
  if (empty($post_if)) {
703
+ $content = '<div class="wall"
704
  style="background-color: #F2F3F7; border: 30px solid #fff; width: 90%; height: 90%; margin: 0 auto;">
705
 
706
  <h1 style="text-align: center; font-family:\'open-sans\', arial;
715
  href="' . get_home_url() . '"><< Go back to home page >></a></p>
716
  </div>';
717
  $_page404 = array(
718
+ 'post_title' => $newtitle,
719
  'post_content' => $content,
720
+ 'post_status' => 'publish',
721
  'post_excerpt' => 'metaseo_404_page',
722
+ 'post_type' => 'page'
723
  );
724
  wp_insert_post($_page404);
725
  } else {
726
  $my_post = array(
727
+ 'ID' => $post_if[0]->ID,
728
  'post_title' => $newtitle
729
  );
730
 
740
  public function updateLinksTable()
741
  {
742
  global $wpdb;
743
+ $option_v = 'metaseo_db_version3.7.2';
744
  $db_installed = get_option($option_v, false);
745
  if (!$db_installed) {
746
  $wpdb->query('ALTER TABLE ' . $wpdb->prefix . 'wpms_links MODIFY `link_url` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL');
748
  }
749
 
750
  // Add index for wpms links
751
+ $option_v = 'metaseo_db_version4.0.4';
752
  $db_installed = get_option($option_v, false);
753
  if (!$db_installed) {
754
  // Add index for wpms_links table;
771
  public function createDatabase()
772
  {
773
  global $wpdb;
774
+ $option_v = 'metaseo_db_version3.3.0';
775
  $db_installed = get_option($option_v, false);
776
  if (!$db_installed) {
777
  // create table wpms_links
840
  );
841
  if ($post_if < 1) {
842
  $_sitemap_page = array(
843
+ 'post_title' => 'WPMS HTML Sitemap',
844
  'post_content' => '',
845
+ 'post_status' => 'publish',
846
  'post_excerpt' => 'metaseo_html_sitemap',
847
+ 'post_type' => 'page',
848
  );
849
  wp_insert_post($_sitemap_page);
850
  }
853
  }
854
 
855
 
856
+ $option_v = 'metaseo_db_version3.7.3';
857
  $db_installed = get_option($option_v, false);
858
  if (!$db_installed) {
859
  // create page 404
861
  update_option($option_v, true);
862
  }
863
 
864
+ $option_v = 'metaseo_db_version4.0.0';
865
  $db_installed = get_option($option_v, false);
866
  if (!$db_installed) {
867
  $row = $wpdb->get_results($wpdb->prepare(
884
  */
885
  public function linkTitleField()
886
  {
887
+ if (isset($this->settings['metaseo_linkfield']) && (int)$this->settings['metaseo_linkfield'] === 1) {
888
  wp_enqueue_script(
889
  'wpmslinkTitle',
890
  plugins_url('assets/js/wpms-link-title-field.js', dirname(__FILE__)),
923
  return;
924
  }
925
 
926
+ if ((int)get_option('wpms_set_ignore') === 0) {
927
  return;
928
  }
929
 
974
  add_action('admin_print_scripts', function () {
975
  global $wp_filter;
976
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
977
+ if ((!empty($_GET['page']) && in_array($_GET['page'], array('wpms-setup', 'metaseo_settings', 'metaseo_console')))) {
978
  if (is_user_admin()) {
979
  if (isset($wp_filter['user_admin_notices'])) {
980
  unset($wp_filter['user_admin_notices']);
1064
  if (is_plugin_active('oxygen/functions.php')) {
1065
  $shortcodes = get_post_meta($post_id, 'ct_builder_shortcodes', true);
1066
  $cf = do_shortcode($shortcodes);
1067
+ $content = $content . $cf;
1068
  }
1069
 
1070
  return $content;
1141
  }
1142
  }
1143
  if (is_string($values)) {
1144
+ $data .= ' ' . $values;
1145
  }
1146
  return $data;
1147
  }
1170
  if ($caption) {
1171
  $inject .= '<div class="wp-caption">';
1172
  }
1173
+ $inject = '<a href="' . $field['value']['url'] . '" title="' . $field['value']['title'] . '">';
1174
+ $inject .= '<img src="' . $field['value']['sizes'][$size] . '" alt="' . $field['value']['alt'] . '" width="' . $field['value']['sizes'][$size . '-width'] . '" height="' . $field['value']['sizes'][$size . '-height'] . '" />';
1175
+ $inject .= '</a>';
1176
  if ($caption) {
1177
+ $inject .= '<p class="wp-caption-text">' . $caption . '</p>';
1178
  }
1179
+ $inject .= '</div>';
1180
  } elseif (is_string($field['value'])) {
1181
+ $inject = '<img src="' . $field['value'] . '" />';
1182
  } else {
1183
  $inject = wp_get_attachment_image($field['value'], $size);
1184
  }
1185
  } elseif ($field['type'] === 'link') {
1186
  // Get link if field is array
1187
  if (is_array($field['value'])) {
1188
+ $inject = '<a class="link-url" href="' . $field['value']['url'] . '" target="' . ($field['value']['target'] ? $field['value']['target'] : '_self') . '">' . esc_html($field['value']['title']) . '</a>';
1189
  } else {
1190
+ $inject = '<a class="link-url" href="' . $field['value'] . '">' . esc_html($field['value']) . '</a>';
1191
  }
1192
  } else {
1193
  $inject = $this->getACFData($field['value']);
1194
  }
1195
 
1196
+ $content .= ' ' . $inject;
1197
  }
1198
  }
1199
  }
1221
 
1222
  return $content;
1223
  }
1224
+
1225
  /**
1226
  * Ajax load page analysis
1227
  *
1237
  if (!current_user_can('edit_posts')) {
1238
  wp_send_json(array('status' => false));
1239
  }
1240
+ $tooltip_page = array();
1241
  $tooltip_page['title_in_heading'] = esc_attr__('Check if a word of this content title
1242
  is also in a title heading (h1, h2...)', 'wp-meta-seo');
1243
  $tooltip_page['title_in_content'] = esc_attr__('Check if a word of this content
1244
  title is also in the text', 'wp-meta-seo');
1245
+ $tooltip_page['page_url'] = esc_attr__('Does the page title match with the permalink (URL structure)', 'wp-meta-seo');
1246
+ $tooltip_page['meta_title'] = esc_attr__('Is the meta title of this page filled?', 'wp-meta-seo');
1247
+ $tooltip_page['meta_desc'] = esc_attr__('Is the meta description of this page filled?', 'wp-meta-seo');
1248
+ $tooltip_page['image_resize'] = esc_attr__('Check for image HTML resizing in content
1249
  (usually image resized using handles)', 'wp-meta-seo');
1250
+ $tooltip_page['image_alt'] = esc_attr__('Check for image Alt text and title', 'wp-meta-seo');
1251
  if (empty($_POST['datas'])) {
1252
  wp_send_json(false);
1253
  }
1256
  update_post_meta($_POST['datas']['post_id'], 'wpms_validate_analysis', '');
1257
  }
1258
 
1259
+ $meta_analysis = get_post_meta((int)$_POST['datas']['post_id'], 'wpms_validate_analysis', true);
1260
+ $check = 0;
1261
+ $output = '';
1262
 
1263
  // title heading
1264
  $words_post_title = preg_split(
1265
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1266
  strtolower($_POST['datas']['title']),
1267
+ -1,
1268
  PREG_SPLIT_NO_EMPTY
1269
  );
1270
 
1275
 
1276
  $content = apply_filters(
1277
  'wpms_the_content',
1278
+ '<div>' . html_entity_decode(stripcslashes($_POST['datas']['content']), ENT_COMPAT, 'UTF-8') . '</div>',
1279
  $_POST['datas']['post_id']
1280
  );
1281
 
1291
  esc_html__('Page title word in content heading', 'wp-meta-seo'),
1292
  1
1293
  );
1294
+ $check++;
1295
  } else {
1296
  if ($content === '') {
1297
  $output .= $this->createFieldAnalysis(
1321
  $words_tagh1 = preg_split(
1322
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1323
  utf8_decode(strtolower($tagh1['contents'])),
1324
+ -1,
1325
  PREG_SPLIT_NO_EMPTY
1326
  );
1327
 
1341
  $words_tagh2 = preg_split(
1342
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1343
  utf8_decode(strtolower($tagh2['contents'])),
1344
+ -1,
1345
  PREG_SPLIT_NO_EMPTY
1346
  );
1347
  if (is_array($words_tagh2) && is_array($words_post_title)) {
1360
  $words_tagh3 = preg_split(
1361
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1362
  utf8_decode(strtolower($tagh3['contents'])),
1363
+ -1,
1364
  PREG_SPLIT_NO_EMPTY
1365
  );
1366
  if (is_array($words_tagh3) && is_array($words_post_title)) {
1379
  $words_tagh4 = preg_split(
1380
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1381
  utf8_decode(strtolower($tagh4['contents'])),
1382
+ -1,
1383
  PREG_SPLIT_NO_EMPTY
1384
  );
1385
  if (is_array($words_tagh4) && is_array($words_post_title)) {
1398
  $words_tagh5 = preg_split(
1399
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1400
  utf8_decode(strtolower($tagh5['contents'])),
1401
+ -1,
1402
  PREG_SPLIT_NO_EMPTY
1403
  );
1404
  if (is_array($words_tagh5) && is_array($words_post_title)) {
1417
  $words_tagh6 = preg_split(
1418
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1419
  utf8_decode(strtolower($tagh6['contents'])),
1420
+ -1,
1421
  PREG_SPLIT_NO_EMPTY
1422
  );
1423
  if (is_array($words_tagh6) && is_array($words_post_title)) {
1439
  esc_html__('Page title word in content heading', 'wp-meta-seo'),
1440
  1
1441
  );
1442
+ $check++;
1443
  } else {
1444
  $output .= $this->createFieldAnalysis(
1445
  'heading_title',
1453
  }
1454
 
1455
  // title content
1456
+ $words_title = preg_split(
1457
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1458
  strtolower($_POST['datas']['title']),
1459
+ -1,
1460
  PREG_SPLIT_NO_EMPTY
1461
  );
1462
  $words_post_content = preg_split(
1463
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
1464
  strtolower(strip_tags($content)),
1465
+ -1,
1466
  PREG_SPLIT_NO_EMPTY
1467
  );
1468
 
1486
  esc_html__('Page title word in content', 'wp-meta-seo'),
1487
  1
1488
  );
1489
+ $check++;
1490
  } else {
1491
  if ($test1) {
1492
  $output .= $this->createFieldAnalysis(
1496
  esc_html__('Page title word in content', 'wp-meta-seo'),
1497
  1
1498
  );
1499
+ $check++;
1500
  } else {
1501
  $output .= $this->createFieldAnalysis(
1502
  'content_title',
1518
  esc_html__('Page url matches with page title', 'wp-meta-seo'),
1519
  1
1520
  );
1521
+ $check++;
1522
  } else {
1523
  $mpageurl = '';
1524
  if ($_POST['datas']['editor'] === 'gutenberg') {
1525
  if (isset($_POST['datas']['mpageurl'])) {
1526
+ $infos = pathinfo($_POST['datas']['mpageurl']);
1527
  $mpageurl = $infos['filename'];
1528
  }
1529
  } else {
1538
  esc_html__('Page url matches with page title', 'wp-meta-seo'),
1539
  1
1540
  );
1541
+ $check++;
1542
  } else {
1543
  $output .= $this->createFieldAnalysis(
1544
  'pageurl',
1559
  esc_html__('Meta title filled', 'wp-meta-seo'),
1560
  1
1561
  );
1562
+ $check++;
1563
  } else {
1564
  if (($_POST['datas']['meta_title'] !== ''
1565
+ && mb_strlen($_POST['datas']['meta_title'], 'UTF-8') <= self::$title_length)) {
1566
  $output .= $this->createFieldAnalysis(
1567
  'metatitle',
1568
  $tooltip_page['meta_title'],
1570
  esc_html__('Meta title filled', 'wp-meta-seo'),
1571
  1
1572
  );
1573
+ $check++;
1574
  } else {
1575
  $output .= $this->createFieldAnalysis(
1576
  'metatitle',
1591
  esc_html__('Meta description filled', 'wp-meta-seo'),
1592
  1
1593
  );
1594
+ $check++;
1595
  } else {
1596
  if ($_POST['datas']['meta_desc'] !== ''
1597
  && mb_strlen($_POST['datas']['meta_desc'], 'UTF-8') <= self::$desc_length) {
1602
  esc_html__('Meta description filled', 'wp-meta-seo'),
1603
  1
1604
  );
1605
+ $check++;
1606
  } else {
1607
  $output .= $this->createFieldAnalysis(
1608
  'metadesc',
1630
  esc_html__('Image alt information filled', 'wp-meta-seo'),
1631
  1
1632
  );
1633
+ $check += 2;
1634
  } else {
1635
  // Extracting the specified elements from the web page
1636
  $img_tags = wpmsExtractTags($content, 'img', true, true);
1637
+ $img_wrong = false;
1638
  $img_wrong_alt = false;
1639
  foreach ($img_tags as $order => $tag) {
1640
  if (!isset($tag['attributes']['src'])) {
1654
  $img_wrong = false;
1655
  } else {
1656
  if (!empty($width_origin) && !empty($height_origin)) {
1657
+ if ((isset($tag['attributes']['width']) && (int)$width_origin !== (int)$tag['attributes']['width'])
1658
+ || (isset($tag['attributes']['height']) && (int)$height_origin !== (int)$tag['attributes']['height'])) {
1659
  $img_wrong = true;
1660
  }
1661
  }
1674
  esc_html__('Wrong image resize', 'wp-meta-seo'),
1675
  1
1676
  );
1677
+ $check++;
1678
  } else {
1679
  if (!$img_wrong) {
1680
  $output .= $this->createFieldAnalysis(
1684
  esc_html__('Wrong image resize', 'wp-meta-seo'),
1685
  1
1686
  );
1687
+ $check++;
1688
  } else {
1689
  $output .= $this->createFieldAnalysis(
1690
  'imgresize',
1704
  esc_html__('Image alt information filled', 'wp-meta-seo'),
1705
  1
1706
  );
1707
+ $check++;
1708
  } else {
1709
  if (!$img_wrong_alt) {
1710
  $output .= $this->createFieldAnalysis(
1714
  esc_html__('Image alt information filled', 'wp-meta-seo'),
1715
  1
1716
  );
1717
+ $check++;
1718
  } else {
1719
  $output .= $this->createFieldAnalysis(
1720
  'imgalt',
1734
  0
1735
  );
1736
 
1737
+ $right_output = '<div class="metaseo_analysis metaseo_tool"><span style="font-weight: 700">' . esc_html__('Page SEO keywords check', 'wp-meta-seo') . '</span></div>';
1738
 
1739
  $right_output .= $this->createFieldAnalysis(
1740
  'keyintitle',
1807
  if (!current_user_can('manage_options')) {
1808
  wp_send_json(false);
1809
  }
1810
+ $post_id = $_POST['post_id'];
1811
+ $key = 'wpms_validate_analysis';
1812
  $analysis = get_post_meta($post_id, $key, true);
1813
  if (empty($analysis)) {
1814
  $analysis = array();
1837
 
1838
  global $wpdb;
1839
  if (isset($_POST['link_id'])) {
1840
+ $wpdb->delete($wpdb->prefix . 'wpms_links', array('id' => (int)$_POST['link_id']));
1841
  wp_send_json(array('status' => true));
1842
  }
1843
 
1867
  $wpdb->update(
1868
  $wpdb->prefix . 'wpms_links',
1869
  $value,
1870
+ array('id' => (int)$link_id)
1871
  );
1872
  $post = get_post($link_detail->source_id);
1873
 
1888
  }
1889
 
1890
  $my_post = array(
1891
+ 'ID' => (int)$link_detail->source_id,
1892
  'post_content' => $post_content
1893
  );
1894
  remove_action('post_updated', array('MetaSeoBrokenLinkTable', 'updatePost'));
1964
  */
1965
  protected function replaceNewTitle($post_content, $link_detail, $title)
1966
  {
1967
+ $links = wpmsExtractTags($post_content, 'a', false, true);
1968
  $title_tag = sprintf('%s="%s"', 'title', esc_attr($title));
1969
  if (!empty($links)) {
1970
  foreach ($links as $link) {
1973
  // Not titlte, add new
1974
  $new_html = preg_replace(
1975
  '/<a/is',
1976
+ '<a ' . $title_tag,
1977
  $link['full_tag']
1978
  );
1979
  } else {
1984
  );
1985
  }
1986
  // Replace tag
1987
+ $post_content = str_replace($link['full_tag'], $new_html, $post_content);
1988
  }
1989
  }
1990
  }
2012
  $link_detail = $wpdb->get_row($wpdb->prepare(
2013
  'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE id=%d',
2014
  array(
2015
+ (int)$_POST['link_id']
2016
  )
2017
  ));
2018
  if (empty($link_detail)) {
2069
  wp_send_json(array('status' => false));
2070
  }
2071
  if (isset($_POST['page_id']) && isset($_POST['follow'])) {
2072
+ update_post_meta((int)$_POST['page_id'], '_metaseo_metafollow', $_POST['follow']);
2073
 
2074
  /**
2075
  * Update follow/nofollow for robots meta tag of a page
2130
  }
2131
  global $wpdb;
2132
  $action_name = $_POST['action_name'];
2133
+ $limit = 20;
2134
 
2135
  switch ($action_name) {
2136
  case 'copy_title_selected':
2138
  wp_send_json(array('status' => true));
2139
  }
2140
  foreach ($_POST['linkids'] as $linkId) {
2141
+ $link = $wpdb->get_row(
2142
  $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE id = %d', $linkId)
2143
  );
2144
  $link_text = $link->link_text;
2180
  break;
2181
  case 'follow_all':
2182
  $follow = 1;
2183
+ $i = 0;
2184
+ $links = $wpdb->get_results(
2185
  'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE follow=0 AND type="url"'
2186
  );
2187
  foreach ($links as $link) {
2189
  wp_send_json(array('status' => false, 'message' => 'limit'));
2190
  } else {
2191
  $this->doUpdateFollow($link->id, $follow);
2192
+ $i++;
2193
  /**
2194
  * Update follow/nofollow for rel attribute of a link
2195
  *
2223
  break;
2224
  case 'nofollow_all':
2225
  $follow = 0;
2226
+ $i = 0;
2227
+ $links = $wpdb->get_results(
2228
  'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE follow=1 AND type="url"'
2229
  );
2230
  foreach ($links as $link) {
2232
  wp_send_json(array('status' => false, 'message' => 'limit'));
2233
  } else {
2234
  $this->doUpdateFollow($link->id, $follow);
2235
+ $i++;
2236
  /**
2237
  * Update follow/nofollow for rel attribute of a link
2238
  *
2262
  global $wpdb;
2263
  $link_detail = $wpdb->get_row($wpdb->prepare(
2264
  'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE id=%d',
2265
+ array((int)$linkId)
2266
  ));
2267
  if (empty($link_detail)) {
2268
  wp_send_json(array('status' => false));
2272
  $wpdb->update(
2273
  $wpdb->prefix . 'wpms_links',
2274
  $value,
2275
+ array('id' => (int)$linkId)
2276
  );
2277
 
2278
  $post = get_post($link_detail->source_id);
2279
  if (!empty($post)) {
2280
+ $old_value = $post->post_content;
2281
  $edit_result = $this->editLinkHtml(
2282
  $old_value,
2283
  $link_detail->link_url,
2285
  $link_detail->meta_title,
2286
  $follow
2287
  );
2288
+ $my_post = array(
2289
+ 'ID' => (int)$link_detail->source_id,
2290
  'post_content' => $edit_result['content']
2291
  );
2292
  remove_action('post_updated', array('MetaSeoBrokenLinkTable', 'updatePost'));
2310
  {
2311
  //Save the old & new URLs for use in the edit callback.
2312
  $args = array(
2313
+ 'old_url' => $old_url,
2314
+ 'new_url' => $new_url,
2315
+ 'new_text' => $new_text,
2316
  'meta_title' => $meta_title,
2317
+ 'follow' => $follow
2318
  );
2319
 
2320
  //Find all links and replace those that match $old_url.
2358
  }
2359
 
2360
  if (is_plugin_active(WPMSEO_ADDON_FILENAME)) {
2361
+ $params = array('enable', 'numberFrequency', 'showlinkFrequency');
2362
  $settinglink = array();
2363
  foreach ($params as $param) {
2364
  if (isset($_POST[$param])) {
2391
  wp_send_json(false);
2392
  }
2393
 
2394
+ $params = array('separator', 'include_home', 'home_text', 'clickable', 'home_text_default');
2395
  $settinglink = array();
2396
  foreach ($params as $param) {
2397
  if (isset($_POST[$param])) {
2436
  if (!current_user_can('manage_options')) {
2437
  wp_send_json(array('status' => false));
2438
  }
2439
+ $_POST = stripslashes_deep($_POST);
2440
+ $response = new stdClass();
2441
+ $metakey = strtolower(trim($_POST['metakey']));
2442
+ $postID = intval($_POST['postid']);
2443
+ $value = trim($_POST['value']);
2444
  $response->msg = esc_html__('Modification was saved', 'wp-meta-seo');
2445
  if ($metakey === 'metatitle') {
2446
  if (!update_post_meta($postID, '_metaseo_metatitle', $value)) {
2447
  $response->updated = false;
2448
+ $response->msg = esc_html__('Meta title was not saved', 'wp-meta-seo');
2449
  } else {
2450
  $response->updated = true;
2451
+ $response->msg = esc_html__('Meta title was saved', 'wp-meta-seo');
2452
  }
2453
  }
2454
 
2455
  if ($metakey === 'metadesc') {
2456
  if (!update_post_meta($postID, '_metaseo_metadesc', $value)) {
2457
  $response->updated = false;
2458
+ $response->msg = esc_html__('Meta description was not saved', 'wp-meta-seo');
2459
  } else {
2460
  $response->updated = true;
2461
+ $response->msg = esc_html__('Meta description was saved', 'wp-meta-seo');
2462
  }
2463
  }
2464
 
2465
  if ($metakey === 'metakeywords') {
2466
  if (!update_post_meta($postID, '_metaseo_metakeywords', $value)) {
2467
  $response->updated = false;
2468
+ $response->msg = esc_html__('Meta keywords was not saved', 'wp-meta-seo');
2469
  } else {
2470
  $response->updated = true;
2471
+ $response->msg = esc_html__('Meta keywords was saved', 'wp-meta-seo');
2472
  }
2473
  }
2474
  update_option('wpms_last_update_post', time());
2803
  array(),
2804
  WPMSEO_VERSION
2805
  );
2806
+ // Register snackbar script alert
2807
+ wp_register_script(
2808
+ 'wpms-snackbar-script',
2809
+ plugins_url('assets/js/snackbar.js', dirname(__FILE__)),
2810
+ array('jquery'),
2811
+ WPMSEO_VERSION,
2812
+ true
2813
+ );
2814
+ // Register snackbar style alert
2815
+ wp_register_style(
2816
+ 'wpms-snackbar-style',
2817
+ plugins_url('assets/css/snackbar.css', dirname(__FILE__)),
2818
+ array(),
2819
+ WPMSEO_VERSION
2820
+ );
2821
  wp_register_script(
2822
  'wpms-broken-link',
2823
  plugins_url('assets/js/wpms-broken-link.js', dirname(__FILE__)),
2880
  true
2881
  );
2882
 
2883
+ // Select toolbar
2884
+ require_once 'google_analytics/wpmstools.php';
2885
+ $wpms_google_analytics = get_option('wpms_google_alanytics');
2886
+ if (isset($wpms_google_analytics['tableid_jail']) && isset($wpms_google_analytics['profile_list'])) {
2887
+ $wpms_profile = WpmsGaTools::getSelectedProfile($wpms_google_analytics['profile_list'], $wpms_google_analytics['tableid_jail']);
2888
+ }
2889
+ if (isset($wpms_profile[4])) {
2890
+ $property_type = $wpms_profile[4];
2891
+ } else {
2892
+ $property_type = 'UA';
2893
+ }
2894
  /* @formatter:off */
2895
  wp_localize_script(
2896
  'wpms-google-analytics',
2897
  'wpmsItemData',
2898
  array(
2899
+ 'ajaxurl' => admin_url('admin-ajax.php'),
2900
+ 'security' => wp_create_nonce('wpms_backend_item_reports'),
2901
+ 'dateList' => array(
2902
+ 'realtime' => esc_html__('Real-Time', 'wp-meta-seo'),
2903
+ 'today' => esc_html__('Today', 'wp-meta-seo'),
2904
+ 'yesterday' => esc_html__('Yesterday', 'wp-meta-seo'),
2905
+ '7daysAgo' => sprintf(esc_html__('Last %d Days', 'wp-meta-seo'), 7),
2906
+ '14daysAgo' => sprintf(esc_html__('Last %d Days', 'wp-meta-seo'), 14),
2907
+ '30daysAgo' => sprintf(esc_html__('Last %d Days', 'wp-meta-seo'), 30),
2908
+ '90daysAgo' => sprintf(esc_html__('Last %d Days', 'wp-meta-seo'), 90),
2909
+ '365daysAgo' => sprintf(_n('%s Year', '%s Years', 1, 'wp-meta-seo'), esc_html__('One', 'wp-meta-seo')),
2910
  '1095daysAgo' => sprintf(
2911
  _n('%s Year', '%s Years', 3, 'wp-meta-seo'),
2912
  esc_html__('Three', 'wp-meta-seo')
2913
  ),
2914
  ),
2915
+ 'property_type' => $property_type,
2916
+ 'reportList' => array(
2917
+ 'sessions' => esc_html__('Sessions', 'wp-meta-seo'),
2918
+ 'users' => esc_html__('Users', 'wp-meta-seo'),
2919
+ 'organicSearches' => esc_html__('Organic', 'wp-meta-seo'),
2920
+ 'pageviews' => esc_html__('Page Views', 'wp-meta-seo'),
2921
+ 'visitBounceRate' => esc_html__('Bounce Rate', 'wp-meta-seo'),
2922
+ 'locations' => esc_html__('Location', 'wp-meta-seo'),
2923
+ 'contentpages' => esc_html__('Pages', 'wp-meta-seo'),
2924
+ 'referrers' => esc_html__('Referrers', 'wp-meta-seo'),
2925
+ 'searches' => esc_html__('Searches', 'wp-meta-seo'),
2926
+ 'trafficdetails' => esc_html__('Traffic', 'wp-meta-seo'),
2927
+ 'technologydetails' => esc_html__('Technology', 'wp-meta-seo'),
2928
+ ),
2929
+ 'reportList_ga4' => array(
2930
+ 'sessions' => esc_html__('Sessions', 'wp-meta-seo'),
2931
+ 'users' => esc_html__('Users', 'wp-meta-seo'),
2932
+ 'pageviews' => esc_html__('Page Views', 'wp-meta-seo'),
2933
+ 'visitBounceRate' => esc_html__('Engagement', 'wp-meta-seo'),
2934
+ 'organicSearches' => esc_html__('Transactions', 'wp-meta-seo'),
2935
+ 'locations' => esc_html__('Location', 'wp-meta-seo'),
2936
+ 'contentpages' => esc_html__('Pages', 'wp-meta-seo'),
2937
+ 'referrers' => esc_html__('Referrers', 'wp-meta-seo'),
2938
+ 'searches' => esc_html__('Searches', 'wp-meta-seo'),
2939
+ 'trafficdetails' => esc_html__('Traffic', 'wp-meta-seo'),
2940
  'technologydetails' => esc_html__('Technology', 'wp-meta-seo'),
2941
  ),
2942
+ 'i18n' => array(
2943
  esc_html__('A JavaScript Error is blocking plugin resources!', 'wp-meta-seo'), //0
2944
  esc_html__('Traffic Mediums', 'wp-meta-seo'),
2945
  esc_html__('Visitor Type', 'wp-meta-seo'),
2946
  esc_html__('Search Engines', 'wp-meta-seo'),
2947
  esc_html__('Social Networks', 'wp-meta-seo'),
2948
+ esc_html__('Sessions', 'wp-meta-seo'), //5
2949
  esc_html__('Users', 'wp-meta-seo'),
2950
  esc_html__('Page Views', 'wp-meta-seo'),
2951
  esc_html__('Bounce Rate', 'wp-meta-seo'),
2952
  esc_html__('Organic Search', 'wp-meta-seo'),
2953
+ esc_html__('Pages/Session', 'wp-meta-seo'), //10
2954
  esc_html__('Invalid response', 'wp-meta-seo'),
2955
  esc_html__('Not enough data collected', 'wp-meta-seo'),
2956
  esc_html__('This report is unavailable', 'wp-meta-seo'),
2971
  esc_html__('You need select a profile:', 'wp-meta-seo') . '
2972
  <a href="' . esc_html(admin_url('admin.php?page=metaseo_google_analytics&view=wpmsga_trackcode')) . '">
2973
  ' . esc_html__('authorize the plugin', 'wp-meta-seo') . '</a>.',
2974
+ esc_html__('Engagement', 'wp-meta-seo'),
2975
+ esc_html__('Transactions', 'wp-meta-seo'),
2976
  ),
2977
+ 'rtLimitPages' => 10,
2978
  'colorVariations' => array(
2979
  '#1e73be',
2980
  '#0459a4',
2984
  '#6abfff',
2985
  '#002671'
2986
  ),
2987
+ 'region' => false,
2988
+ 'language' => get_bloginfo('language'),
2989
+ 'viewList' => false,
2990
+ 'scope' => 'admin-widgets',
2991
+ 'admin_url' => admin_url()
2992
  )
2993
  );
2994
 
3024
  }
3025
  // in JavaScript, object properties are accessed as ajax_object.ajax_url, ajax_object.we_value
3026
  wp_localize_script('wpmetaseoAdmin', 'wpms_localize', array(
3027
+ 'filter_by' => esc_html__('Select to filter', 'wp-meta-seo'),
3028
+ 'replaced' => esc_html__('Replaced', 'wp-meta-seo'),
3029
+ 'index_link' => esc_html__('Loading...', 'wp-meta-seo'),
3030
+ 'addon_active' => $addon_active,
3031
+ 'ajax_url' => admin_url('admin-ajax.php'),
3032
+ 'settings' => $this->settings,
3033
+ 'wpms_cat_metatitle_length' => MPMSCAT_TITLE_LENGTH,
3034
+ 'wpms_cat_metadesc_length' => MPMSCAT_DESC_LENGTH,
3035
  'wpms_cat_metakeywords_length' => MPMSCAT_KEYWORDS_LENGTH,
3036
+ 'wpms_nonce' => wp_create_nonce('wpms_nonce'),
3037
+ 'home_url' => home_url(),
3038
+ 'images_url' => WPMETASEO_PLUGIN_URL . 'assets/images/',
3039
+ 'dashboard_tooltips' => array(
3040
+ 'url_rewwrite' => esc_html__('Optimized at: ', 'wp-meta-seo'),
3041
+ 'images_resized' => esc_html__('HTML image resized (using handles) count: ', 'wp-meta-seo'),
3042
+ 'metatitle' => esc_html__('Meta title filled: ', 'wp-meta-seo'),
3043
+ 'image_alt' => esc_html__('Image data filled (in content): ', 'wp-meta-seo'),
3044
+ 'metadesc' => esc_html__('Meta description filled: ', 'wp-meta-seo'),
3045
+ 'link_title' => esc_html__('Links title completed: ', 'wp-meta-seo'),
3046
+ 'fresh_content' => esc_html__('Last month new or updated content: ', 'wp-meta-seo'),
3047
+ 'elements' => esc_html__(' elements', 'wp-meta-seo'),
3048
  'duplicate_title' => esc_html__('Duplicate Meta Titles: ', 'wp-meta-seo'),
3049
+ 'duplicate_desc' => esc_html__('Duplicate Meta Descriptions: ', 'wp-meta-seo'),
3050
+ '404' => esc_html__('Redirected 404 errors: ', 'wp-meta-seo')
3051
+ ),
3052
+ 'gg_disconnect_title' => array (
3053
+ 'universal' => esc_html__('UA-Tracking ID', 'wp-meta-seo'),
3054
+ 'ga4' => esc_html__('Measurement ID', 'wp-meta-seo'),
3055
+ 'tagmanager' => esc_html__('Container ID', 'wp-meta-seo'),
3056
  )
3057
  ));
3058
 
3115
  <span class="wpms-column-display score <?php echo esc_attr($class); ?> <?php echo empty($score) ? 'disabled' : ''; ?>">
3116
  <strong><?php echo esc_html($score); ?></strong>
3117
  </span>
3118
+ <span class="wpms-column-display keyword" <?php echo (empty($keywords)) ? 'style="display:none"' : ''; ?> >
3119
  <strong title="SEO Keyword" class="title"><?php esc_html_e('Keyword', 'wp-meta-seo'); ?>:</strong>
3120
  <span><?php echo $keywords ? esc_html($keywords) : ''; ?></span>
3121
  </span>
3154
  {
3155
  foreach (self::getAccessiblePostTypes() as $post_type) {
3156
  add_filter('edd_download_columns', array($this, 'addColumns'), 11);
3157
+ add_filter('manage_' . $post_type . '_posts_columns', array($this, 'addColumns'), 11);
3158
 
3159
 
3160
+ add_action('manage_' . $post_type . '_posts_custom_column', array($this, 'columnsContents'), 11, 2);
3161
+ add_filter('manage_edit-' . $post_type . '_sortable_columns', array($this, 'sortableColumns'), 11);
3162
  }
3163
  }
3164
 
3289
  $title = !(empty($content_post->post_title)) ? $content_post->post_title : null;
3290
  $meta_title = get_post_meta($post_id, '_metaseo_metatitle', true);
3291
  $meta_desc = get_post_meta($post_id, '_metaseo_metadesc', true);
3292
+ $check = 0;
3293
 
3294
  // title heading
3295
  $words_post_title = preg_split(
3296
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
3297
  strtolower($title),
3298
+ -1,
3299
  PREG_SPLIT_NO_EMPTY
3300
  );
3301
 
3304
  add_shortcode('mk_fancy_title', 'vc_do_shortcode');
3305
  }
3306
 
3307
+ $content = apply_filters('wpms_the_content', '<div>' . html_entity_decode(stripcslashes($content), ENT_COMPAT, 'UTF-8') . '</div>', $post_id);
3308
  $content = $this->injectAcfField($content, $post_id);
3309
  $content = $this->injectWooCommerce($content, $post_id);
3310
 
3444
  }
3445
 
3446
  // title content
3447
+ $words_title = preg_split(
3448
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
3449
  strtolower($title),
3450
+ -1,
3451
  PREG_SPLIT_NO_EMPTY
3452
  );
3453
  $words_post_content = preg_split(
3454
  '/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
3455
  strtolower(strip_tags($content)),
3456
+ -1,
3457
  PREG_SPLIT_NO_EMPTY
3458
  );
3459
 
3470
  }
3471
 
3472
  if ($test1) {
3473
+ $check++;
3474
  }
3475
 
3476
  // page url matches page title
3479
  $mpageurl = $pageurl['filename'];
3480
 
3481
  if (!empty($mpageurl) && !empty($mtitle) && $mpageurl === sanitize_title($mtitle)) {
3482
+ $check++;
3483
  }
3484
 
3485
  // meta title filled
3486
  if (($meta_title !== '' && mb_strlen($meta_title, 'UTF-8') <= self::$title_length)) {
3487
+ $check++;
3488
  }
3489
 
3490
  // desc filled
3491
  if ($meta_desc !== '' && mb_strlen($meta_desc, 'UTF-8') <= self::$desc_length) {
3492
+ $check++;
3493
  }
3494
 
3495
  // image resize
3496
  if ($content === '') {
3497
+ $check += 2;
3498
  } else {
3499
  // Extracting the specified elements from the web page
3500
  $img_tags = wpmsExtractTags($content, 'img', true, true);
3501
+ $img_wrong = false;
3502
  $img_wrong_alt = false;
3503
  foreach ($img_tags as $order => $tag) {
3504
  if (!isset($tag['attributes']['src'])) {
3518
  $img_wrong = false;
3519
  } else {
3520
  if (!empty($width_origin) && !empty($height_origin)) {
3521
+ if ((isset($tag['attributes']['width']) && (int)$width_origin !== (int)$tag['attributes']['width'])
3522
+ || (isset($tag['attributes']['height']) && (int)$height_origin !== (int)$tag['attributes']['height'])) {
3523
  $img_wrong = true;
3524
  }
3525
  }
3531
  }
3532
 
3533
  if (!$img_wrong) {
3534
+ $check++;
3535
  }
3536
 
3537
 
3538
  if (!$img_wrong_alt) {
3539
+ $check++;
3540
  }
3541
  }
3542
 
3567
  break;
3568
  }
3569
 
3570
+ $pattern = '/<h[2-6][^>]*>.*' . $key . '.*<\/h[2-6]>/';
3571
  if (preg_match($pattern, $content)) {
3572
  $check++;
3573
  break;
3621
  /**
3622
  * Allow changing the capability users need to view the settings pages
3623
  *
 
 
3624
  * @return string
3625
+ * @api string Default capability
3626
  */
3627
  $manage_options_cap = apply_filters('metaseo_manage_options_capability', 'manage_options');
3628
 
3776
  */
3777
  public function setErrorTimeout()
3778
  {
3779
+ $midnight = strtotime('tomorrow 00:00:00'); // UTC midnight
3780
+ $midnight = $midnight + 8 * 3600; // UTC 8 AM
3781
  $this->error_timeout = $midnight - time();
3782
  }
3783
 
3784
+ /**
3785
+ * Get Google analytics 4 properties
3786
+ *
3787
+ * @param string $account_id GA4 account ID
3788
+ *
3789
+ * @return array
3790
+ */
3791
+ public function get_ga4_properties($account_id)
3792
+ {
3793
+ $query_url = 'https://analyticsadmin.googleapis.com/v1alpha/properties';
3794
+ $query_url = add_query_arg('access_token', $this->google_alanytics['googleCredentials']['access_token'], $query_url);
3795
+ $properties = array();
3796
+ $pageToken = null;
3797
+ do {
3798
+ try {
3799
+ $additional = array();
3800
+ $additional['filter'] = 'parent:accounts/' . $account_id;
3801
+ $additional['pageSize'] = 40;
3802
+ if ($pageToken) {
3803
+ $additional['pageToken'] = $pageToken;
3804
+ }
3805
+
3806
+ $call_args = array();
3807
+ $call_args['method'] = 'GET';
3808
+ $call_args['body'] = $additional;
3809
+ $response = wp_remote_request($query_url, $call_args);
3810
+ if (!is_wp_error($response)) {
3811
+ $body = wp_remote_retrieve_body($response);
3812
+ $body = json_decode($body);
3813
+ }
3814
+
3815
+ $items = isset($body->properties) ? $body->properties : array();
3816
+ $properties = array_merge($properties, $items);
3817
+ if (isset($body->nextPageToken)) {
3818
+ $pageToken = $body->nextPageToken;
3819
+ } else {
3820
+ $pageToken = null;
3821
+ }
3822
+ } catch (Exception $e) {
3823
+ $pageToken = null;
3824
+ }
3825
+ } while ($pageToken);
3826
+
3827
+ return $properties;
3828
+ }
3829
+
3830
+ /**
3831
+ * Retrieve all data stream google analytics 4 property
3832
+ *
3833
+ * @param string $property_id GA4 property ID
3834
+ *
3835
+ * @return array
3836
+ */
3837
+ public function webDataStreamsList($property_id)
3838
+ {
3839
+ $query_url = 'https://analyticsadmin.googleapis.com/v1alpha/properties/' . $property_id . '/webDataStreams';
3840
+ $query_url = add_query_arg('access_token', $this->google_alanytics['googleCredentials']['access_token'], $query_url);
3841
+ $webDataStreams = array();
3842
+ $pageToken = null;
3843
+ do {
3844
+ try {
3845
+ $additional = array();
3846
+ $additional['pageSize'] = 40;
3847
+ if ($pageToken) {
3848
+ $additional['pageToken'] = $pageToken;
3849
+ }
3850
+
3851
+ $call_args = array();
3852
+ $call_args['method'] = 'GET';
3853
+ $call_args['body'] = $additional;
3854
+
3855
+ $response = wp_remote_request($query_url, $call_args);
3856
+ if (!is_wp_error($response)) {
3857
+ $body = wp_remote_retrieve_body($response);
3858
+ $body = json_decode($body);
3859
+ }
3860
+
3861
+ $items = isset($body->webDataStreams) ? $body->webDataStreams : array();
3862
+ $webDataStreams = array_merge($webDataStreams, $items);
3863
+ if (isset($body->nextPageToken)) {
3864
+ $pageToken = $body->nextPageToken;
3865
+ } else {
3866
+ $pageToken = null;
3867
+ }
3868
+ } catch (Exception $e) {
3869
+ $pageToken = null;
3870
+ }
3871
+ } while ($pageToken);
3872
+
3873
+ return $webDataStreams;
3874
+ }
3875
+
3876
  /**
3877
  * Retrieves all Google Analytics Views with details
3878
  *
3882
  {
3883
  try {
3884
  $ga_dash_profile_list = array();
3885
+ $startindex = 1;
3886
+ $totalresults = 65535; // use something big
3887
  while ($startindex < $totalresults) {
3888
+ // Get profile for google analytics 4 properties (GA4)
3889
+ $accounts = $this->service->management_accounts->listManagementAccounts();
3890
+ $accounts_id = array();
3891
+ if (count($accounts) > 0) {
3892
+ foreach ($accounts as $account) {
3893
+ $accounts_id[] = $account->id;
3894
+ }
3895
+
3896
+ $ga4_properties = array();
3897
+ foreach ($accounts_id as $account_id) {
3898
+ $ga4_properties = array_merge($ga4_properties, $this->get_ga4_properties($account_id));
3899
+ }
3900
+
3901
+ if (!empty($ga4_properties)) {
3902
+ $webDataStreams = array();
3903
+ foreach ($ga4_properties as $ga4_property) {
3904
+ $webDataStreams = array_merge($webDataStreams, $this->webDataStreamsList(str_replace('properties/', '', $ga4_property->name)));
3905
+ }
3906
+
3907
+ foreach ($webDataStreams as $profile) {
3908
+ $profile_name = $profile->name;
3909
+ $profile_name_arr = explode('/', $profile_name);
3910
+ $property_id = $profile_name_arr[1];
3911
+ $webDataStream_id = $profile_name_arr[3];
3912
+
3913
+ $ga4_profile_list[] = array(
3914
+ $profile->displayName,
3915
+ $webDataStream_id,
3916
+ $property_id,
3917
+ $profile->defaultUri,
3918
+ 'GA4',
3919
+ '',
3920
+ '',
3921
+ '',
3922
+ $profile->measurementId
3923
+ );
3924
+ }
3925
+ }
3926
+ }
3927
+
3928
+ // Get profile for google universal analytics (UA)
3929
  $profiles = $this->service->management_profiles->listManagementProfiles(
3930
  '~all',
3931
  '~all',
3933
  'start-index' => $startindex
3934
  )
3935
  );
3936
+ $items = $profiles->getItems();
 
3937
  $totalresults = $profiles->getTotalResults();
3938
 
3939
  if ($totalresults > 0) {
3940
  foreach ($items as $profile) {
3941
+ $timetz = new DateTimeZone($profile->getTimezone());
3942
+ $localtime = new DateTime('now', $timetz);
3943
+ $timeshift = strtotime($localtime->format('Y-m-d H:i:s')) - time();
3944
+ $ua_profile_list[] = array(
3945
  $profile->getName(),
3946
  $profile->getId(),
3947
  $profile->getwebPropertyId(),
3948
  $profile->getwebsiteUrl(),
3949
+ 'UA',
3950
  $timeshift,
3951
  $profile->getTimezone(),
3952
+ $profile->getDefaultPage(),
3953
+ ''
3954
  );
3955
+ $startindex++;
3956
  }
3957
  }
3958
+ /*
3959
+ $ga_dash_profile_list[
3960
+ view_name/stream_name,
3961
+ view_id/stream_id,
3962
+ property_id
3963
+ website_url,
3964
+ type_code,
3965
+ time_shift,
3966
+ time_zone,
3967
+ default_page,
3968
+ measurementId
3969
+ ]*/
3970
+ $ga_dash_profile_list = array_merge($ga4_profile_list, $ua_profile_list);
3971
  }
3972
 
3973
  if (empty($ga_dash_profile_list)) {
4020
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
4021
  switch ($_GET['page']) {
4022
  case 'metaseo_google_analytics':
 
 
 
 
4023
  $this->google_alanytics = get_option('wpms_google_alanytics');
4024
+ if (isset($this->google_alanytics['setting_success']) && $this->google_alanytics['setting_success'] === 1) {
4025
+ echo '<div id="setting-error-settings_updated"
4026
+ class="updated settings-error notice is-dismissible">
4027
+ <p><strong>' . esc_html__('Settings saved.', 'wp-meta-seo') . '</strong></p><button type="button" class="notice-dismiss">
4028
+ <span class="screen-reader-text">Dismiss this notice.</span></button></div>';
4029
+ $this->google_alanytics['setting_success'] = 0;
4030
+ update_option('wpms_google_alanytics', $this->google_alanytics);
4031
+ }
4032
  if (isset($_POST['_metaseo_ggtracking_settings'])) {
4033
  if (empty($_POST['gadash_security'])
4034
  || !wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
4041
  <span class="screen-reader-text">Dismiss this notice.</span></button></div>';
4042
  }
4043
 
4044
+ // Update selected profile
4045
  if (!empty($_POST['tableid_jail'])) {
4046
  if (empty($_POST['wpms_nonce'])
4047
  || !wp_verify_nonce($_POST['wpms_nonce'], 'wpms_nonce')) {
4048
  die();
4049
  }
4050
+ if ($this->google_alanytics['tableid_jail'] !== $_POST['tableid_jail']) {
4051
+ $this->google_alanytics['tableid_jail'] = $_POST['tableid_jail'];
4052
+ $this->google_alanytics['setting_success'] = 1;
4053
+ update_option('wpms_google_alanytics', $this->google_alanytics);
4054
+ wp_redirect($_SERVER['HTTP_REFERER']);
4055
+ }
4056
  }
4057
 
4058
  $ga_tracking = get_option('_metaseo_ggtracking_settings');
4064
  wp_enqueue_style('wpms-tippy-style');
4065
  wp_enqueue_script('wpms-tippy-core');
4066
  wp_enqueue_script('wpms-tippy');
4067
+ // Enqueue snackbar
4068
+ wp_enqueue_style('wpms-snackbar-style');
4069
+ wp_enqueue_script('wpms-snackbar-script');
4070
+
4071
+ // WPMS Google Analytics Data
4072
+ if (isset($_GET['view']) && $_GET['view'] === 'wpms_gg_service_data') {
4073
  wp_enqueue_style('wpms-backend-tracking-code');
 
 
4074
  wp_enqueue_style('wpms-backend-item-reports');
4075
+
4076
+ // When user save access code
4077
  if (isset($_POST['wpmsga_dash_clientid']) && isset($_POST['wpmsga_dash_clientsecret'])) {
4078
+ // Check nonce field
4079
  if (empty($_POST['wpms_nonce'])
4080
  || !wp_verify_nonce($_POST['wpms_nonce'], 'wpms_nonce')) {
4081
  die();
4082
  }
4083
+ $this->google_alanytics['wpmsga_dash_clientid'] = $_POST['wpmsga_dash_clientid'];
4084
  $this->google_alanytics['wpmsga_dash_clientsecret'] = $_POST['wpmsga_dash_clientsecret'];
4085
  update_option('wpms_google_alanytics', $this->google_alanytics);
4086
  }
4087
 
4088
  require_once 'lib/google-api/vendor/autoload.php';
4089
  $this->client = new WPMSGoogle\Client();
4090
+ $this->client->setScopes(array(
4091
+ 'https://www.googleapis.com/auth/analytics.readonly'
4092
+ ));
4093
  $this->client->setAccessType('offline');
4094
  $this->client->setApplicationName('WP Meta SEO');
4095
  $this->client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
4096
  $this->setErrorTimeout();
4097
+ $this->client = WpmsGaTools::setClient($this->client, $this->google_alanytics, $this->access);
4098
+ $authUrl = $this->client->createAuthUrl();
4099
  $this->service = new Google_Service_Analytics($this->client);
4100
+ $controller = new WpmsGapiController();
4101
 
4102
+ if (!empty($_POST['wpms_gg_access_code'])) {
4103
+ $wpms_gg_access_code = $_POST['wpms_gg_access_code'];
4104
+ if (!stripos('x' . $wpms_gg_access_code, 'UA-', 1)) {
4105
  WpmsGaTools::deleteCache('gapi_errors');
4106
  WpmsGaTools::deleteCache('last_error');
4107
  WpmsGaTools::clearCache();
4108
  try {
4109
+ $this->client->authenticate($wpms_gg_access_code);
4110
  $getAccessToken = $this->client->getAccessToken();
4111
  if ($getAccessToken) {
4112
  try {
4145
  $profiles = $this->refreshProfiles();
4146
  }
4147
 
4148
+ $this->google_alanytics['code'] = $wpms_gg_access_code;
4149
  $this->google_alanytics['googleCredentials'] = $getAccessToken;
4150
+ $this->google_alanytics['profile_list'] = $profiles;
4151
  update_option('wpms_google_alanytics', $this->google_alanytics);
4152
  } catch (Google_IO_Exception $e) {
4153
  echo '';
4157
  echo '';
4158
  }
4159
  } else {
4160
+ echo '<div class="error"><p>' . esc_html__('The access code is
4161
  <strong>NOT</strong> your <strong>Tracking ID</strong>
4162
  (UA-XXXXX-X). Try again, and use the red link to get your access code', 'wp-meta-seo') . '.</p></div>';
4163
  }
 
4164
  update_option('wpms_google_alanytics', $this->google_alanytics);
4165
+ wp_redirect($_SERVER['HTTP_REFERER']);
4166
  exit;
4167
  }
4168
+ $gg_analytcis = get_option('wpms_google_alanytics');
4169
+ if (is_array($gg_analytcis)) {
4170
+ $this->google_alanytics = array_merge($gg_analytcis, $this->google_alanytics);
4171
+ }
4172
+ // If user have google credentials
4173
+ if (!empty($this->google_alanytics['googleCredentials'])) {
4174
+ // WPMS google analytics setting
4175
+ include_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-services/ga-trackcode.php');
4176
+ // Google analytics data
4177
+ if (!empty($this->google_alanytics['tableid_jail'])) {
4178
+ echo '<h1 class="wpms-top-h1">' . esc_html__('Google Analytics Report', 'wp-meta-seo') . '
4179
+ <i class="material-icons intro-topic-tooltip" data-tippy="' . esc_html__('Create a Google Analytics property then connect WordPress to this Analytics property. You can then follow your traffic and include the data in your Email report (Pro Addon)', 'wp-meta-seo') . '">help_outline</i>
4180
+ </h1>';
4181
+ echo '<div id="wpms-window-1">
4182
+ <!-- WPMS Google analytics response using JS -->
4183
+
4184
+ </div>';
4185
+ }
4186
+ } else {
4187
+ include_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-services/gg-services-connect.php');
4188
+ }
4189
+ } else {
4190
+ // WPMS Google Service Tracking - when user don't have Google cloud credentials
4191
  $this->gaDisconnect = array(
4192
+ 'wpms_gg_service_tracking_id' => '',
4193
+ 'wpms_gg_service_tracking_type' => 'universal',
4194
+ 'wpmsga_code_tracking' => '',
4195
+ 'wpmstm_header_code_tracking' => '',
4196
+ 'wpmstm_body_code_tracking' => ''
4197
  );
4198
+ $gaDisconnect = get_option('_metaseo_ggtracking_disconnect_settings');
4199
  if (is_array($gaDisconnect)) {
4200
  $this->gaDisconnect = array_merge(
4201
  $this->gaDisconnect,
4203
  );
4204
  }
4205
 
4206
+ // When user submit tracking options
4207
+ if (isset($_POST['_metaseo_gg_service_disconnect'])) {
4208
+ // Check none field
4209
+ if (empty($_POST['wpms_nonce'])) {
4210
+ die();
4211
+ }
4212
+ // Sanitizing submit data and save options
4213
+ $_metaseo_ga_disconnect = $_POST['_metaseo_gg_service_disconnect'];
4214
+ $_metaseo_ga_disconnect['wpms_gg_service_tracking_id'] = sanitize_text_field($_metaseo_ga_disconnect['wpms_gg_service_tracking_id']);
4215
+ $_metaseo_ga_disconnect['wpms_gg_service_tracking_type'] = sanitize_text_field($_metaseo_ga_disconnect['wpms_gg_service_tracking_type']);
4216
  $_metaseo_ga_disconnect['wpmsga_code_tracking'] = stripslashes($_metaseo_ga_disconnect['wpmsga_code_tracking']);
4217
+ $_metaseo_ga_disconnect['wpmstm_header_code_tracking'] = stripslashes($_metaseo_ga_disconnect['wpmstm_header_code_tracking']);
4218
+ $_metaseo_ga_disconnect['wpmstm_body_code_tracking'] = stripslashes($_metaseo_ga_disconnect['wpmstm_body_code_tracking']);
4219
  update_option(
4220
  '_metaseo_ggtracking_disconnect_settings',
4221
  $_metaseo_ga_disconnect
4228
  );
4229
  }
4230
  }
4231
+ require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-services/google-services.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4232
  }
4233
 
4234
+ $w = '99%';
4235
+ $text = esc_html__('Bring your WordPress website SEO to the next level with the PRO Addon: Email Report,
4236
  Google Search Console Connect, Automatic Redirect, Advanced Sitemaps and more!', 'wp-meta-seo');
4237
  $class_btn_close = 'close_gga';
4238
  require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php');
4273
  $_SESSION['_metaseo_settings_search_console'] = 1;
4274
  }
4275
  }
4276
+ $posts = get_posts(array('post_type' => 'page', 'posts_per_page' => -1, 'numberposts' => -1));
4277
  $types_404 = array(
4278
+ 'none' => 'None',
4279
  'wp-meta-seo-page' => esc_html__('WP Meta SEO page', 'wp-meta-seo'),
4280
+ 'custom_page' => esc_html__('Custom page', 'wp-meta-seo')
4281
  );
4282
 
4283
  // get settings 404
4284
  $defaul_settings_404 = array(
4285
  'wpms_redirect_homepage' => 0,
4286
+ 'wpms_type_404' => 'none',
4287
+ 'wpms_page_redirected' => 'none'
4288
  );
4289
+ $wpms_settings_404 = get_option('wpms_settings_404');
4290
  if (is_array($wpms_settings_404)) {
4291
  $defaul_settings_404 = array_merge($defaul_settings_404, $wpms_settings_404);
4292
  }
4296
  if (empty($home_title)) {
4297
  $home_title = get_bloginfo('title');
4298
  }
4299
+ $breadcrumbs = array(
4300
+ 'separator' => ' &gt; ',
4301
+ 'include_home' => 1,
4302
+ 'home_text' => $home_title,
4303
  'home_text_default' => 0,
4304
+ 'clickable' => 1
4305
  );
4306
  $breadcrumb_settings = get_option('_metaseo_breadcrumbs');
4307
  if (is_array($breadcrumb_settings)) {
4310
 
4311
  // email settings
4312
  $email_settings = array(
4313
+ 'enable' => 0,
4314
+ 'host' => 'smtp.gmail.com',
4315
  'type_encryption' => 'ssl',
4316
+ 'port' => '465',
4317
+ 'autentication' => 'yes',
4318
+ 'username' => '',
4319
+ 'password' => '',
4320
  );
4321
 
4322
  $mailsettings = get_option('wpms_email_settings');
4328
 
4329
  // link settings
4330
  $link_settings = array(
4331
+ 'enable' => 0,
4332
+ 'numberFrequency' => 1,
4333
  'showlinkFrequency' => 'month'
4334
  );
4335
 
4342
 
4343
  // local business settings
4344
  $local_business = array(
4345
+ 'enable' => 0,
4346
+ 'logo' => '',
4347
+ 'type_name' => '',
4348
+ 'country' => '',
4349
+ 'address' => '',
4350
+ 'city' => '',
4351
+ 'state' => '',
4352
+ 'phone' => '',
4353
  'pricerange' => '$$'
4354
  );
4355
 
4357
  if (is_array($business)) {
4358
  $local_business = array_merge($local_business, $business);
4359
  }
4360
+ $countrys = apply_filters('wpms_get_countryList', array());
4361
  $local_business_html = apply_filters('wpmsaddon_local_business', '', $local_business, $countrys);
4362
 
4363
  $search_console_html = apply_filters('wpmsaddon_search_console', '');
4364
 
4365
  $default_settings = wpmsGetDefaultSettings();
4366
+ $settings = get_option('_metaseo_settings');
4367
  if (is_array($settings)) {
4368
  $settings = array_merge($default_settings, $settings);
4369
  } else {
4422
  switch ($_POST['action_name']) {
4423
  case 'img-copy-alt':
4424
  $margs = array(
4425
+ 'posts_per_page' => -1,
4426
+ 'post_type' => 'attachment',
4427
+ 'post_status' => 'any',
4428
+ 'meta_query' => array(
4429
  'relation' => 'OR',
4430
  array(
4431
+ 'key' => '_wp_attachment_image_alt',
4432
+ 'value' => '',
4433
  'compare' => '!='
4434
  )
4435
  )
4436
  );
4437
 
4438
+ $m_newquery = new WP_Query($margs);
4439
  $mposts_empty_alt = $m_newquery->get_posts();
4440
  if (!empty($mposts_empty_alt)) {
4441
  wp_send_json(true);
4492
  $total = $wpdb->get_var('SELECT COUNT(posts.ID) as total FROM ' . $wpdb->prefix . 'posts as posts
4493
  WHERE posts.post_type = "attachment"');
4494
 
4495
+ $j = ceil((int)$total / $limit);
4496
+ for ($i = 0; $i <= $j; $i++) {
4497
+ $ofset = $i * $limit;
4498
  $attachments = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'posts as posts
4499
  WHERE posts.post_type = %s LIMIT %d OFFSET %d', array('attachment', $limit, $ofset)));
4500
 
4549
  switch ($_POST['action_name']) {
4550
  case 'img-copy-alt':
4551
  $margs = array(
4552
+ 'posts_per_page' => -1,
4553
+ 'post_type' => 'attachment',
4554
+ 'post_status' => 'any',
4555
+ 'post__in' => $ids
4556
  );
4557
 
4558
+ $m_newquery = new WP_Query($margs);
4559
  $mposts_empty_alt = $m_newquery->get_posts();
4560
  if (!empty($mposts_empty_alt)) {
4561
  foreach ($mposts_empty_alt as $post) {
4562
  $i_info_url = pathinfo($post->guid);
4563
+ $value = $i_info_url['filename'];
4564
  /**
4565
  * Filter before update meta for image
4566
  *
4590
  if (!empty($posts_result)) {
4591
  foreach ($posts_result as $post) {
4592
  $i_info_url = pathinfo($post->guid);
4593
+ $value = $i_info_url['filename'];
4594
  /**
4595
  * Filter before update meta for image
4596
  *
4659
 
4660
  if (isset($_POST['sl_bulk']) && $_POST['sl_bulk'] === 'all') { // for select a;;
4661
  $margs = array(
4662
+ 'posts_per_page' => -1,
4663
+ 'post_type' => $post_types,
4664
+ 'post_status' => 'any'
4665
  );
4666
  } else { // for select some post
4667
  if (isset($_POST['ids'])) {
4668
+ $ids = $_POST['ids'];
4669
  $margs = array(
4670
+ 'posts_per_page' => -1,
4671
+ 'post_type' => $post_types,
4672
+ 'post_status' => 'any',
4673
+ 'post__in' => $ids
4674
  );
4675
  } else {
4676
  wp_send_json(false);
4678
  }
4679
 
4680
  $m_newquery = new WP_Query($margs);
4681
+ $mposts = $m_newquery->get_posts();
4682
  if (!empty($mposts)) {
4683
  foreach ($mposts as $post) {
4684
  $value = $post->post_title;
4728
  *
4729
  * @return void
4730
  */
4731
+ public function wpmsGGSaveInformation()
4732
  {
4733
  check_ajax_referer('wpms_nonce', 'wpms_nonce');
4734
 
4744
  require_once WPMETASEO_PLUGIN_DIR . 'inc/lib/google-api/vendor/autoload.php';
4745
 
4746
  $client = new WPMSGoogle\Client();
4747
+ $client->setScopes(array(
4748
+ 'https://www.googleapis.com/auth/analytics.readonly'
4749
+ ));
4750
  $client->setAccessType('offline');
4751
  $client->setApplicationName('WP Meta SEO');
4752
  $client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
4753
+ $client = WpmsGaTools::setClient($client, array(), array($google_alanytics['wpmsga_dash_clientid'], $google_alanytics['wpmsga_dash_clientsecret']));
4754
  $authUrl = $client->createAuthUrl();
4755
 
4756
  if (!empty($authUrl)) {
4856
  case 'backend_item_reports':
4857
  MetaSeoGoogleAnalytics::itemsReport();
4858
  break;
4859
+ case 'wpms_tagmanager_request_containers':
4860
+ $this->tagmanagerContainersReport();
4861
+ break;
4862
+ case 'wpms_tagmanager_container_info':
4863
+ $this->tagmanagerContainerInfo();
4864
+ break;
4865
+ case 'wpms_tagmanager_refresh_connect':
4866
+ $this->tagmanagerRefreshConnect();
4867
+ break;
4868
  case 'ga_clearauthor':
4869
  MetaSeoGoogleAnalytics::clearAuthor();
4870
  break;
inc/class.metaseo-broken-link-table.php CHANGED
@@ -2378,7 +2378,7 @@ class MetaSeoBrokenLinkTable extends WP_List_Table
2378
  public static function editLinkImg($content, $new_url, $old_url)
2379
  {
2380
  self::$old_url = $old_url;
2381
- self::$new_url = htmlentities($new_url);
2382
  $content = preg_replace_callback(
2383
  self::$img_pattern,
2384
  array(
2378
  public static function editLinkImg($content, $new_url, $old_url)
2379
  {
2380
  self::$old_url = $old_url;
2381
+ self::$new_url = htmlentities($new_url, ENT_COMPAT, 'UTF-8', true);
2382
  $content = preg_replace_callback(
2383
  self::$img_pattern,
2384
  array(
inc/class.metaseo-content-list-table.php CHANGED
@@ -548,6 +548,7 @@ class MetaSeoContentListTable extends WP_List_Table
548
 
549
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
550
  if (!empty($_REQUEST['metaseo_posts_per_page'])) {
 
551
  $_per_page = intval($_REQUEST['metaseo_posts_per_page']);
552
  } else {
553
  $_per_page = 0;
548
 
549
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
550
  if (!empty($_REQUEST['metaseo_posts_per_page'])) {
551
+ //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
552
  $_per_page = intval($_REQUEST['metaseo_posts_per_page']);
553
  } else {
554
  $_per_page = 0;
inc/class.metaseo-front_end.php CHANGED
@@ -23,36 +23,43 @@ class MetaSeoFront
23
  */
24
  public $gaDisconnect;
25
 
 
 
 
 
 
 
 
26
  /**
27
  * MetaSeoFront constructor.
28
  */
29
  public function __construct()
30
  {
31
  $this->ga_tracking = array(
32
- 'wpmsga_dash_tracking' => 1,
33
- 'wpmsga_dash_tracking_type' => 'universal',
34
- 'wpmsga_dash_anonim' => 0,
35
- 'wpmsga_dash_remarketing' => 0,
36
- 'wpmsga_event_tracking' => 0,
37
- 'wpmsga_event_downloads' => 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*',
38
- 'wpmsga_aff_tracking' => 0,
39
- 'wpmsga_event_affiliates' => '/out/',
40
- 'wpmsga_hash_tracking' => 0,
41
- 'wpmsga_author_dimindex' => 0,
42
- 'wpmsga_pubyear_dimindex' => 0,
43
- 'wpmsga_category_dimindex' => 0,
44
- 'wpmsga_user_dimindex' => 0,
45
- 'wpmsga_tag_dimindex' => 0,
46
- 'wpmsga_speed_samplerate' => 1,
47
- 'wpmsga_event_bouncerate' => 0,
48
- 'wpmsga_enhanced_links' => 0,
49
- 'wpmsga_dash_adsense' => 0,
50
  'wpmsga_crossdomain_tracking' => 0,
51
- 'wpmsga_crossdomain_list' => '',
52
- 'wpmsga_cookiedomain' => '',
53
- 'wpmsga_cookiename' => '',
54
- 'wpmsga_cookieexpires' => '',
55
- 'wpmsga_track_exclude' => array(),
56
  );
57
 
58
  $ga_tracking = get_option('_metaseo_ggtracking_settings');
@@ -61,16 +68,32 @@ class MetaSeoFront
61
  }
62
 
63
  $this->gaDisconnect = array(
64
- 'wpms_ga_uax_reference' => '',
65
- 'wpmsga_dash_tracking_type' => 'universal',
66
- 'wpmsga_code_tracking' => ''
 
 
 
 
 
 
 
 
 
67
  );
68
- $gaDisconnect = get_option('_metaseo_ggtracking_disconnect_settings');
 
 
 
 
 
69
  if (is_array($gaDisconnect)) {
70
  $this->gaDisconnect = array_merge($this->gaDisconnect, $gaDisconnect);
71
  }
72
 
73
  add_action('wp_head', array($this, 'trackingCode'), 99);
 
 
74
  }
75
 
76
  /**
@@ -85,51 +108,117 @@ class MetaSeoFront
85
  }
86
 
87
  $google_alanytics = get_option('wpms_google_alanytics');
88
- $traking_mode = $this->ga_tracking['wpmsga_dash_tracking'];
 
 
89
  if ($traking_mode > 0) {
90
- if (empty($google_alanytics['tableid_jail'])) {
91
- $tracking_code = trim($this->gaDisconnect['wpmsga_code_tracking']);
92
- if (!empty($tracking_code)) {
93
- echo '<script type="text/javascript">';
94
- // phpcs:ignore WordPress.Security.EscapeOutput -- Content has saved by user when save Analytics JS code
95
- echo strip_tags(stripslashes($this->gaDisconnect['wpmsga_code_tracking']));
96
- echo '</script>';
97
- } else {
98
- if (empty($this->gaDisconnect['wpms_ga_uax_reference'])) {
99
- return false;
100
- }
101
- $traking_type = $this->gaDisconnect['wpmsga_dash_tracking_type'];
 
 
102
  if ($traking_type === 'classic') {
103
- echo "\n<!-- BEGIN WPMSGA v" . esc_html(WPMSEO_VERSION) . " Classic Tracking
104
- - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
105
- require_once 'google_analytics/tracking/classic_disconnect.php';
 
 
106
  echo "\n<!-- END WPMSGA Classic Tracking -->\n\n";
107
- } else {
108
  echo "\n<!-- Universal Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
109
- require_once 'google_analytics/tracking/universal_disconnect.php';
 
 
 
 
 
110
  echo "\n<!-- END WPMSGA Universal Tracking -->\n\n";
 
 
111
  }
112
- }
113
- } else {
114
- $traking_type = $this->ga_tracking['wpmsga_dash_tracking_type'];
115
- if ($traking_type === 'classic') {
116
- echo "\n<!-- Classic Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
117
- if ($this->ga_tracking['wpmsga_event_tracking']) {
118
- require_once 'google_analytics/tracking/events-classic.php';
119
- }
120
- require_once 'google_analytics/tracking/code-classic.php';
121
- echo "\n<!-- END WPMSGA Classic Tracking -->\n\n";
122
  } else {
123
- echo "\n<!-- Universal Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
124
  if ($this->ga_tracking['wpmsga_event_tracking']
125
  || $this->ga_tracking['wpmsga_aff_tracking'] || $this->ga_tracking['wpmsga_hash_tracking']) {
126
- require_once 'google_analytics/tracking/events-universal.php';
 
 
 
127
  }
128
- require_once 'google_analytics/tracking/code-universal.php';
129
- echo "\n<!-- END WPMSGA Universal Tracking -->\n\n";
130
  }
131
  }
132
  }
133
  return true;
134
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  }
23
  */
24
  public $gaDisconnect;
25
 
26
+ /**
27
+ * Google tag manager
28
+ *
29
+ * @var array
30
+ */
31
+ public $google_tagmanager;
32
+
33
  /**
34
  * MetaSeoFront constructor.
35
  */
36
  public function __construct()
37
  {
38
  $this->ga_tracking = array(
39
+ 'wpmsga_dash_tracking' => 1,
40
+ 'wpmsga_dash_tracking_type' => 'universal',
41
+ 'wpmsga_dash_anonim' => 0,
42
+ 'wpmsga_dash_remarketing' => 0,
43
+ 'wpmsga_event_tracking' => 0,
44
+ 'wpmsga_event_downloads' => 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*',
45
+ 'wpmsga_aff_tracking' => 0,
46
+ 'wpmsga_event_affiliates' => '/out/',
47
+ 'wpmsga_hash_tracking' => 0,
48
+ 'wpmsga_author_dimindex' => 0,
49
+ 'wpmsga_pubyear_dimindex' => 0,
50
+ 'wpmsga_category_dimindex' => 0,
51
+ 'wpmsga_user_dimindex' => 0,
52
+ 'wpmsga_tag_dimindex' => 0,
53
+ 'wpmsga_speed_samplerate' => 1,
54
+ 'wpmsga_event_bouncerate' => 0,
55
+ 'wpmsga_enhanced_links' => 0,
56
+ 'wpmsga_dash_adsense' => 0,
57
  'wpmsga_crossdomain_tracking' => 0,
58
+ 'wpmsga_crossdomain_list' => '',
59
+ 'wpmsga_cookiedomain' => '',
60
+ 'wpmsga_cookiename' => '',
61
+ 'wpmsga_cookieexpires' => '',
62
+ 'wpmsga_track_exclude' => array(),
63
  );
64
 
65
  $ga_tracking = get_option('_metaseo_ggtracking_settings');
68
  }
69
 
70
  $this->gaDisconnect = array(
71
+ 'wpms_gg_service_tracking_id' => '',
72
+ 'wpms_gg_service_tracking_type' => 'universal',
73
+ 'wpmsga_code_tracking' => '',
74
+ 'wpmstm_header_code_tracking' => '',
75
+ 'wpmstm_body_code_tracking' => ''
76
+ );
77
+
78
+ $this->google_tagmanager = array(
79
+ 'list_accounts' => array(),
80
+ 'list_containers' => array(),
81
+ 'selected_account' => '',
82
+ 'selected_container' => ''
83
  );
84
+
85
+ $gg_tagmanager = get_option('wpms_tagmanager_setting');
86
+ if (is_array($gg_tagmanager)) {
87
+ $this->google_tagmanager = array_merge($this->google_tagmanager, $gg_tagmanager);
88
+ }
89
+ $gaDisconnect = get_option('_metaseo_ggtracking_disconnect_settings');
90
  if (is_array($gaDisconnect)) {
91
  $this->gaDisconnect = array_merge($this->gaDisconnect, $gaDisconnect);
92
  }
93
 
94
  add_action('wp_head', array($this, 'trackingCode'), 99);
95
+ add_action('wp_head', array($this, 'wpms_gg_disconnect_tracking_header'), 99);
96
+ add_action('wp_body_open', array($this, 'wpms_gg_disconnect_tracking_body'), 99);
97
  }
98
 
99
  /**
108
  }
109
 
110
  $google_alanytics = get_option('wpms_google_alanytics');
111
+ $traking_mode = $this->ga_tracking['wpmsga_dash_tracking'];
112
+
113
+ // If enabled tracking option
114
  if ($traking_mode > 0) {
115
+ // If have tracking-id then WPMS tracking data
116
+ if (!empty($google_alanytics['tableid_jail'])) {
117
+ // Get selected profile
118
+ $profile_info = WpmsGaTools::getSelectedProfile(
119
+ $google_alanytics['profile_list'],
120
+ $google_alanytics['tableid_jail']
121
+ );
122
+
123
+ // Add google analytics tag to website
124
+ if (!isset($profile_info[4])) {
125
+ return false;
126
+ }
127
+ if ($profile_info[4] === 'UA') {
128
+ $traking_type = $this->ga_tracking['wpmsga_dash_tracking_type'];
129
  if ($traking_type === 'classic') {
130
+ echo "\n<!-- Classic Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
131
+ if ($this->ga_tracking['wpmsga_event_tracking']) {
132
+ require_once 'google_analytics/tracking/events-classic.php';
133
+ }
134
+ require_once 'google_analytics/tracking/code-classic.php';
135
  echo "\n<!-- END WPMSGA Classic Tracking -->\n\n";
136
+ } elseif ($traking_type === 'universal') {
137
  echo "\n<!-- Universal Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
138
+ if ($this->ga_tracking['wpmsga_event_tracking']
139
+ || $this->ga_tracking['wpmsga_aff_tracking']
140
+ || $this->ga_tracking['wpmsga_hash_tracking']) {
141
+ require_once 'google_analytics/tracking/events-universal.php';
142
+ }
143
+ require_once 'google_analytics/tracking/code-universal.php';
144
  echo "\n<!-- END WPMSGA Universal Tracking -->\n\n";
145
+ } else {
146
+ return false;
147
  }
 
 
 
 
 
 
 
 
 
 
148
  } else {
149
+ echo "\n<!-- WPMSGA Google Analytics 4 Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
150
  if ($this->ga_tracking['wpmsga_event_tracking']
151
  || $this->ga_tracking['wpmsga_aff_tracking'] || $this->ga_tracking['wpmsga_hash_tracking']) {
152
+ // Add tag for both Universal and Google analytics 4 property
153
+ echo "\n<!-- Events tracking -->\n\n";
154
+ require_once 'google_analytics/tracking/events-ga4.php';
155
+ echo "\n<!-- End events tracking -->\n\n";
156
  }
157
+ require_once 'google_analytics/tracking/code-ga4.php';
158
+ echo "\n<!-- END WPMSGA Google Analytics 4 Tracking -->\n\n";
159
  }
160
  }
161
  }
162
  return true;
163
  }
164
+
165
+ /**
166
+ * Add Google service analytics and tag manager tracking code to header website
167
+ *
168
+ * @return void
169
+ */
170
+ public function wpms_gg_disconnect_tracking_header()
171
+ {
172
+ $tracking_type = $this->gaDisconnect['wpms_gg_service_tracking_type'];
173
+ $tracking_id = $this->gaDisconnect['wpms_gg_service_tracking_id'];
174
+ $wpmstm_header_code_tracking = $this->gaDisconnect['wpmstm_header_code_tracking'];
175
+ $wpmsga_code_tracking = $this->gaDisconnect['wpmsga_code_tracking'];
176
+ if ($tracking_type && $tracking_id) {
177
+ if ($tracking_type === 'tagmanager') {
178
+ // Add GTM tracking js code to header
179
+ require_once 'google-tag-manager/tracking/gtm-header.php';
180
+ } elseif ($tracking_type === 'analytics4') {
181
+ // Add GA v4 tracking js code
182
+ require_once 'google_analytics/tracking/ga4_disconnect.php';
183
+ } elseif ($tracking_type === 'classic') {
184
+ // Add classic GA tracking js code
185
+ require_once 'google_analytics/tracking/classic_disconnect.php';
186
+ } else {
187
+ // Add universal GA tracking js code
188
+ require_once 'google_analytics/tracking/universal_disconnect.php';
189
+ }
190
+ }
191
+ // If user directly GA tracking js code
192
+ if (!empty($wpmsga_code_tracking)) {
193
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Content has saved by user when save Analytics JS code
194
+ echo stripslashes($wpmsga_code_tracking);
195
+ }
196
+ // If user directly GTM header tracking js code
197
+ if (!empty($wpmstm_header_code_tracking)) {
198
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Content has saved by user when save GTM JS code
199
+ echo stripslashes($wpmstm_header_code_tracking);
200
+ }
201
+ }
202
+
203
+ /**
204
+ * Add Google Tag Manager to body website
205
+ *
206
+ * @return void
207
+ */
208
+ public function wpms_gg_disconnect_tracking_body()
209
+ {
210
+ $tracking_type = $this->gaDisconnect['wpms_gg_service_tracking_type'];
211
+ $tracking_id = $this->gaDisconnect['wpms_gg_service_tracking_id'];
212
+ $wpmstm_body_code_tracking = $this->gaDisconnect['wpmstm_body_code_tracking'];
213
+ if (isset($tracking_type) && $tracking_type === 'tagmanager' && $tracking_id) {
214
+ // Add GTM tracking js code to body
215
+ require_once 'google-tag-manager/tracking/gtm-body.php';
216
+ }
217
+
218
+ // If user directly GTM body tracking js code
219
+ if (!empty($wpmstm_body_code_tracking)) {
220
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Content has saved by user when save GTM body JS code
221
+ echo stripslashes($wpmstm_body_code_tracking);
222
+ }
223
+ }
224
  }
inc/class.metaseo-google-analytics.php CHANGED
@@ -40,7 +40,6 @@ class MetaSeoGoogleAnalytics
40
  if (ob_get_length()) {
41
  ob_clean();
42
  }
43
-
44
  if (!empty($google_alanytics['tableid_jail'])) {
45
  if (empty($controller)) {
46
  $controller = new WpmsGapiController();
@@ -59,11 +58,16 @@ class MetaSeoGoogleAnalytics
59
  }
60
 
61
  if (!$projectId) {
62
- $projectId = $google_alanytics['tableid_jail'];
 
63
  }
64
  $profile_info = WpmsGaTools::getSelectedProfile($google_alanytics['profile_list'], $projectId);
65
- if (isset($profile_info[4])) {
66
- $controller->timeshift = $profile_info[4];
 
 
 
 
67
  } else {
68
  $controller->timeshift = (int) current_time('timestamp') - time();
69
  }
@@ -82,8 +86,8 @@ class MetaSeoGoogleAnalytics
82
  $filter = apply_filters('wpmsga_backenditem_uri', $uri);
83
  $lastchar = substr($filter, - 1);
84
 
85
- if (isset($profile_info[6]) && $profile_info[6] && $lastchar === '/') {
86
- $filter = $filter . $profile_info[6];
87
  }
88
 
89
  // Encode URL
@@ -92,11 +96,10 @@ class MetaSeoGoogleAnalytics
92
  wp_die(- 25);
93
  }
94
  }
95
-
96
  $queries = explode(',', $query);
97
  $results = array();
98
  foreach ($queries as $value) {
99
- $results[] = $controller->get($projectId, $value, $from, $to, $filter);
100
  }
101
 
102
  wp_send_json($results);
40
  if (ob_get_length()) {
41
  ob_clean();
42
  }
 
43
  if (!empty($google_alanytics['tableid_jail'])) {
44
  if (empty($controller)) {
45
  $controller = new WpmsGapiController();
58
  }
59
 
60
  if (!$projectId) {
61
+ $projectId = $google_alanytics['tableid_jail']; // View ID of Google analytics universal
62
+ $property_type = 'UA';
63
  }
64
  $profile_info = WpmsGaTools::getSelectedProfile($google_alanytics['profile_list'], $projectId);
65
+ if (isset($profile_info[4]) && $profile_info[4] === 'GA4') {
66
+ $projectId = $profile_info[2]; // Property ID of GA4
67
+ $property_type = 'GA4';
68
+ }
69
+ if (isset($profile_info[5])) {
70
+ $controller->timeshift = $profile_info[5];
71
  } else {
72
  $controller->timeshift = (int) current_time('timestamp') - time();
73
  }
86
  $filter = apply_filters('wpmsga_backenditem_uri', $uri);
87
  $lastchar = substr($filter, - 1);
88
 
89
+ if (isset($profile_info[7]) && $profile_info[7] && $lastchar === '/') {
90
+ $filter = $filter . $profile_info[7];
91
  }
92
 
93
  // Encode URL
96
  wp_die(- 25);
97
  }
98
  }
 
99
  $queries = explode(',', $query);
100
  $results = array();
101
  foreach ($queries as $value) {
102
+ $results[] = $controller->get($projectId, $value, $from, $to, $filter, $property_type);
103
  }
104
 
105
  wp_send_json($results);
inc/class.metaseo-image-list-table.php CHANGED
@@ -1933,7 +1933,7 @@ class MetaSeoImageListTable extends WP_List_Table
1933
 
1934
  $meta_key = strtolower(trim($wpmspost['meta_key']));
1935
  $meta_type = strtolower(trim($wpmspost['meta_type']));
1936
- $meta_value = htmlspecialchars(trim($wpmspost['meta_value']));
1937
  $meta_order = intval($wpmspost['meta_order']);
1938
  $img_post_id = intval($wpmspost['img_post_id']);
1939
  $post_id = intval($wpmspost['post_id']);
1933
 
1934
  $meta_key = strtolower(trim($wpmspost['meta_key']));
1935
  $meta_type = strtolower(trim($wpmspost['meta_type']));
1936
+ $meta_value = htmlspecialchars(trim($wpmspost['meta_value']), ENT_COMPAT, 'UTF-8', 'true');
1937
  $meta_order = intval($wpmspost['meta_order']);
1938
  $img_post_id = intval($wpmspost['img_post_id']);
1939
  $post_id = intval($wpmspost['post_id']);
inc/class.metaseo-meta.php CHANGED
@@ -26,7 +26,7 @@ class WPMSEOMeta
26
  *
27
  * @var integer
28
  */
29
- public static $meta_length = 158;
30
  /**
31
  * Meta title max length
32
  *
26
  *
27
  * @var integer
28
  */
29
+ public static $meta_length = 143;
30
  /**
31
  * Meta title max length
32
  *
inc/class.metaseo-metabox.php CHANGED
@@ -812,6 +812,7 @@ class WPMSEOMetabox extends WPMSEOMeta
812
  {
813
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
814
  if (isset($_GET['post'])) {
 
815
  $post_id = (int) $_GET['post'];
816
  $post = get_post($post_id);
817
  } else {
812
  {
813
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
814
  if (isset($_GET['post'])) {
815
+ //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
816
  $post_id = (int) $_GET['post'];
817
  $post = get_post($post_id);
818
  } else {
inc/google-tag-manager/tracking/gtm-body.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Prohibit direct script loading */
3
+ defined('ABSPATH') || die('No direct script access allowed!');
4
+ ?>
5
+ <!-- WPMSGA Google Tag Manager Tracking Body JS Code - https://wordpress.org/plugins/wp-meta-seo/ -->
6
+ <noscript>
7
+ <iframe src="https://www.googletagmanager.com/ns.html?id=
8
+ <?php echo esc_html($this->gaDisconnect['wpms_gg_service_tracking_id'], 'wp-meta-seo'); ?>"
9
+ height="0" width="0" style="display:none;visibility:hidden"></iframe>
10
+ </noscript>
11
+ <!-- End WPMSGA Google Tag Manager Tracking Body JS Code - https://wordpress.org/plugins/wp-meta-seo/ -->
inc/google-tag-manager/tracking/gtm-header.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Prohibit direct script loading */
3
+ defined('ABSPATH') || die('No direct script access allowed!');
4
+ ?>
5
+ <!--WPMSGA Google Tag Manager Header - https://wordpress.org/plugins/wp-meta-seo/ -->
6
+ <script> (function (w, d, s, l, i) {
7
+ w[l] = w[l] || [];
8
+ w[l].push({
9
+ 'gtm.start':
10
+ new Date().getTime(), event: 'gtm.js'
11
+ });
12
+ var f = d.getElementsByTagName(s)[0],
13
+ j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
14
+ j.async = true;
15
+ j.src =
16
+ 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
17
+ f.parentNode.insertBefore(j, f);
18
+ })(window, document, 'script', 'dataLayer',
19
+ '<?php echo esc_html($this->gaDisconnect['wpms_gg_service_tracking_id'], 'wp-meta-seo'); ?>');</script>
20
+ <!--End WPMSGA Google Tag Manager Header - https://wordpress.org/plugins/wp-meta-seo/ -->
inc/google-tag-manager/wpms-tagmanager-api.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Prohibit direct script loading */
3
+ defined('ABSPATH') || die('No direct script access allowed!');
4
+
5
+ if (!class_exists('WpmsTagManagerController')) {
6
+
7
+ /**
8
+ * Class WpmsTagManagerController
9
+ */
10
+ class WpmsTagManagerController
11
+ {
12
+ /**
13
+ * Google API client
14
+ *
15
+ * @var \WPMSGoogle\Client
16
+ */
17
+ public $client;
18
+ /**
19
+ * Google service tag manager
20
+ *
21
+ * @var Google_Service_TagManager
22
+ */
23
+ public $tagmanager_service;
24
+
25
+ /**
26
+ * WpmsTagManagerController constructor.
27
+ */
28
+ public function __construct()
29
+ {
30
+ $google_alanytics = get_option('wpms_google_alanytics');
31
+ include_once(WPMETASEO_PLUGIN_DIR . 'inc/lib/google-api/vendor/autoload.php');
32
+
33
+ $this->client = new WPMSGoogle\Client();
34
+ $this->client->setScopes(array(
35
+ 'https://www.googleapis.com/auth/tagmanager.edit.containers',
36
+ 'https://www.googleapis.com/auth/analytics.readonly'
37
+ ));
38
+ $this->client->setAccessType('offline');
39
+ $this->client->setApplicationName('WP Meta SEO');
40
+ $this->client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
41
+ $this->managequota = 'u' . get_current_user_id() . 's' . get_current_blog_id();
42
+ $this->client->setClientId($google_alanytics['wpmsga_dash_clientid']);
43
+ $this->client->setClientSecret($google_alanytics['wpmsga_dash_clientsecret']);
44
+ $this->tagmanager_service = new Google_Service_TagManager($this->client);
45
+ if (!empty($google_alanytics['googleCredentials'])) {
46
+ $token = $google_alanytics['googleCredentials'];
47
+ if ($token) {
48
+ $this->client->setAccessToken($token);
49
+ }
50
+ }
51
+ }
52
+
53
+ /**
54
+ * Get list GTM accounts
55
+ *
56
+ * @return Google_Service_TagManager_ListAccountsResponse
57
+ */
58
+ public function getListAccounts()
59
+ {
60
+ return $this->tagmanager_service->accounts->listAccounts();
61
+ }
62
+
63
+ /**
64
+ * Get list GTM containers
65
+ *
66
+ * @param string $account_id GTM account ID
67
+ *
68
+ * @return Google_Service_TagManager_ListContainersResponse
69
+ */
70
+ public function getListContainers($account_id)
71
+ {
72
+ return $this->tagmanager_service->accounts_containers->listAccountsContainers('accounts/' . $account_id);
73
+ }
74
+ }
75
+ }
inc/google_analytics/tracking/classic_disconnect.php CHANGED
@@ -2,9 +2,10 @@
2
  /* Prohibit direct script loading */
3
  defined('ABSPATH') || die('No direct script access allowed!');
4
  ?>
 
5
  <script type="text/javascript">
6
  var _gaq = _gaq || [];
7
- _gaq.push(['_setAccount', '<?php echo esc_html($this->gaDisconnect['wpms_ga_uax_reference']); ?>']);
8
  _gaq.push(['_trackPageview']);
9
 
10
  (function () {
@@ -19,4 +20,5 @@ defined('ABSPATH') || die('No direct script access allowed!');
19
  var s = document.getElementsByTagName('script')[0];
20
  s.parentNode.insertBefore(ga, s);
21
  })();
22
- </script>
 
2
  /* Prohibit direct script loading */
3
  defined('ABSPATH') || die('No direct script access allowed!');
4
  ?>
5
+ <!--WPMS Google Analytics classic tracking js code - https://wordpress.org/plugins/wp-meta-seo/ -->
6
  <script type="text/javascript">
7
  var _gaq = _gaq || [];
8
+ _gaq.push(['_setAccount', '<?php echo esc_html($this->gaDisconnect['wpms_gg_service_tracking_id']); ?>']);
9
  _gaq.push(['_trackPageview']);
10
 
11
  (function () {
20
  var s = document.getElementsByTagName('script')[0];
21
  s.parentNode.insertBefore(ga, s);
22
  })();
23
+ </script>
24
+ <!--End WPMS Google Analytics classic tracking js code-->
inc/google_analytics/tracking/code-ga4.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ defined('ABSPATH') || die('No direct script access allowed!');
4
+ $google_alanytics = get_option('wpms_google_alanytics');
5
+ $profile = WpmsGaTools::getSelectedProfile($google_alanytics['profile_list'], $google_alanytics['tableid_jail']);
6
+ if ($profile[4] === 'GA4') {
7
+ if (empty($profile[8])) {
8
+ die();
9
+ } else {
10
+ $measurement_id = $profile[8];
11
+ }
12
+ //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript -- add tracking script to header ?>
13
+ <script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo esc_html($measurement_id, 'wp-meta-seo') ?>"></script>
14
+ <script>
15
+ window.dataLayer = window.dataLayer || [];
16
+
17
+ function gtag() {
18
+ dataLayer.push(arguments);
19
+ }
20
+
21
+ gtag('js', new Date());
22
+ // send default page_view event
23
+ <?php if ($this->ga_tracking['wpmsga_dash_remarketing']) { ?>
24
+ gtag('config', '<?php echo esc_html($measurement_id, 'wp-meta-seo') ?>');
25
+ <?php } else { ?>
26
+ // disabled advertising features
27
+ gtag('config', '<?php echo esc_html($measurement_id, 'wp-meta-seo') ?>', {'allow_google_signals': false});
28
+ <?php } ?>
29
+ </script>
30
+
31
+ <?php
32
+ }
inc/google_analytics/tracking/events-ga4.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Author: Alin Marcu
4
+ * Author URI: https://deconf.com
5
+ * Copyright 2013 Alin Marcu
6
+ * License: GPLv2 or later
7
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
+ * Modified by Joomunited
9
+ */
10
+ /* Prohibit direct script loading */
11
+ defined('ABSPATH') || die('No direct script access allowed!');
12
+ $domaindata = WpmsGaTools::getRootDomain(esc_html(get_option('siteurl')));
13
+ // phpcs:disable Generic.WhiteSpace.ScopeIndent.Incorrect, WordPress.Security.EscapeOutput.OutputNotEscaped, Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis, PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket, Squiz.WhiteSpace.ScopeClosingBrace.Indent, Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen, PSR2.ControlStructures.ControlStructureSpacing.SpaceBeforeCloseBrace, PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace, Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace, Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore, Generic.WhiteSpace.ScopeIndent.IncorrectExact -- Render google analytics script structure on frontend
14
+ ?>
15
+ <script type="text/javascript">
16
+ (function ($) {
17
+ $(window).load(function () {
18
+ <?php if ($this->ga_tracking['wpmsga_event_tracking']) { ?>
19
+
20
+ //Track Downloads
21
+ $('a').filter(function () {
22
+ return this.href.match(/.*\.(<?php echo esc_js($this->ga_tracking['wpmsga_event_downloads']);?>)(\?.*)?$/);
23
+ }).on('click', function () {
24
+ gtag('event', 'file_download', {
25
+ link_url: this.href
26
+ <?php if (isset($this->ga_tracking['wpmsga_event_bouncerate']) && $this->ga_tracking['wpmsga_event_bouncerate']) {
27
+ echo ', non_interaction: true';
28
+ }?>
29
+ });
30
+ });
31
+
32
+ //Track Mailto
33
+ $('a[href^="mailto"]').on('click', function () {
34
+ gtag('event', 'email', {
35
+ link_url: this.href
36
+ <?php if (isset($this->ga_tracking['wpmsga_event_bouncerate']) && $this->ga_tracking['wpmsga_event_bouncerate']) {
37
+ echo ', non_interaction: true';
38
+ }?>
39
+ });
40
+ });
41
+
42
+ <?php if (isset ($domaindata ['domain']) && $domaindata ['domain']) { ?>
43
+
44
+ //Track Outbound Links
45
+ $('a[href^="http"]').filter(function () {
46
+ if (!this.href.match(/.*\.(<?php echo esc_js($this->ga_tracking['wpmsga_event_downloads']);?>)(\?.*)?$/)) {
47
+ if (this.href.indexOf('<?php echo esc_html($domaindata['domain']); ?>') === -1) return this.href;
48
+ }
49
+ }).on('click', function () {
50
+ gtag('event', 'click', {
51
+ link_url: this.href
52
+ <?php if (isset($this->ga_tracking['wpmsga_event_bouncerate']) && $this->ga_tracking['wpmsga_event_bouncerate']) {
53
+ echo ', non_interaction: true';
54
+ }?>
55
+ });
56
+ });
57
+ <?php } ?>
58
+
59
+ <?php } ?>
60
+ <?php if ($this->ga_tracking['wpmsga_event_affiliates'] && $this->ga_tracking['wpmsga_aff_tracking']){ ?>
61
+ //Track Affiliates
62
+ $('a').filter(function () {
63
+ if ('<?php echo esc_js($this->ga_tracking['wpmsga_event_affiliates']);?>' !== '') {
64
+ return this.href.match(/(<?php echo str_replace('/', '\/', (esc_js($this->ga_tracking['wpmsga_event_affiliates'])));?>)/);
65
+ }
66
+ }).on('click', function () {
67
+ gtag('event', 'affiliates', {
68
+ link_url: this.href
69
+ <?php if (isset($this->ga_tracking['wpmsga_event_bouncerate']) && $this->ga_tracking['wpmsga_event_bouncerate']) {
70
+ echo ', non_interaction: true';
71
+ }?>
72
+ });
73
+ });
74
+ <?php } ?>
75
+ <?php if (isset ($domaindata ['domain']) && $domaindata ['domain'] && $this->ga_tracking ['wpmsga_hash_tracking']) { ?>
76
+
77
+ //Track Hashmarks
78
+ $('a').filter(function () {
79
+ if (this.href.indexOf('<?php echo esc_html($domaindata['domain']); ?>') !== -1 || this.href.indexOf('://') === -1) return this.hash;
80
+ }).on('click', function () {
81
+ gtag('event', 'hashmark', {
82
+ link_url: this.href
83
+ <?php if (isset($this->ga_tracking['wpmsga_event_bouncerate']) && $this->ga_tracking['wpmsga_event_bouncerate']) {
84
+ echo ', non_interaction: true';
85
+ }?>
86
+ });
87
+ });
88
+
89
+ <?php } ?>
90
+ });
91
+ })(jQuery);
92
+ </script>
93
+ <?php // phpcs:enable ?>
inc/google_analytics/tracking/ga4_disconnect.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Prohibit direct script loading */
3
+ defined('ABSPATH') || die('No direct script access allowed!');
4
+
5
+ $measure_id = $this->gaDisconnect['wpms_gg_service_tracking_id'];
6
+ //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript -- add tracking script to header ?>
7
+ <script async src="https://www.googletagmanager.com/gtag/js?id=
8
+ <?php echo esc_html($measure_id, 'wp-meta-seo') ?>"></script>
9
+ <script>
10
+ window.dataLayer = window.dataLayer || [];
11
+ function gtag(){dataLayer.push(arguments);}
12
+ gtag('js', new Date());
13
+
14
+ gtag('config', '<?php echo esc_html($measure_id, 'wp-meta-seo') ?>');
15
+ </script>
16
+ <!--End WPMS Google Analytics 4 property tracking js code-->
inc/google_analytics/tracking/universal_disconnect.php CHANGED
@@ -2,6 +2,7 @@
2
  /* Prohibit direct script loading */
3
  defined('ABSPATH') || die('No direct script access allowed!');
4
  ?>
 
5
  <script>
6
  (function (i, s, o, g, r, a, m) {
7
  i['GoogleAnalyticsObject'] = r;
@@ -14,6 +15,7 @@ defined('ABSPATH') || die('No direct script access allowed!');
14
  a.src = g;
15
  m.parentNode.insertBefore(a, m)
16
  })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
17
- ga('create', '<?php echo esc_html($this->gaDisconnect['wpms_ga_uax_reference']); ?>', 'auto');
18
  ga('send', 'pageview');
19
  </script>
 
2
  /* Prohibit direct script loading */
3
  defined('ABSPATH') || die('No direct script access allowed!');
4
  ?>
5
+ <!--WPMS Google Analytics universal tracking js code - https://wordpress.org/plugins/wp-meta-seo/ -->
6
  <script>
7
  (function (i, s, o, g, r, a, m) {
8
  i['GoogleAnalyticsObject'] = r;
15
  a.src = g;
16
  m.parentNode.insertBefore(a, m)
17
  })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
18
+ ga('create', '<?php echo esc_html($this->gaDisconnect['wpms_gg_service_tracking_id']); ?>', 'auto');
19
  ga('send', 'pageview');
20
  </script>
21
+ <!--End WPMS Google Analytics universal tracking js code-->
inc/google_analytics/wpmsgapi.php CHANGED
@@ -27,6 +27,12 @@ if (!class_exists('WpmsGapiController')) {
27
  * @var Google_Service_Analytics
28
  */
29
  public $service;
 
 
 
 
 
 
30
  /**
31
  * Time shift
32
  *
@@ -53,7 +59,7 @@ if (!class_exists('WpmsGapiController')) {
53
  {
54
  parent::__construct();
55
  $google_alanytics = get_option('wpms_google_alanytics');
56
- $this->wpmsga = WPMSGA();
57
  include_once(WPMETASEO_PLUGIN_DIR . 'inc/lib/google-api/vendor/autoload.php');
58
  // $config = new Google_Config();
59
  // $config->setCacheClass('Google_Cache_Null');
@@ -74,14 +80,18 @@ if (!class_exists('WpmsGapiController')) {
74
  // }
75
 
76
  $this->client = new WPMSGoogle\Client();
77
- $this->client->setScopes(array('https://www.googleapis.com/auth/analytics.readonly'));
 
 
 
78
  $this->client->setAccessType('offline');
79
  $this->client->setApplicationName('WP Meta SEO');
80
  $this->client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
81
  $this->setErrorTimeout();
82
  $this->managequota = 'u' . get_current_user_id() . 's' . get_current_blog_id();
83
- $this->client = WpmsGaTools::setClient($this->client, $google_alanytics, $this->access);
84
- $this->service = new Google_Service_Analytics($this->client);
 
85
  if (!empty($google_alanytics['googleCredentials'])) {
86
  $token = $google_alanytics['googleCredentials'];
87
  if ($token) {
@@ -147,7 +157,7 @@ if (!class_exists('WpmsGapiController')) {
147
  return true;
148
  }
149
  }
150
- if ((int) $errors[0] === 400 || (int) $errors[0] === 401 || (int) $errors[0] === 403) {
151
  return true;
152
  }
153
  return false;
@@ -164,12 +174,12 @@ if (!class_exists('WpmsGapiController')) {
164
  {
165
  $local_time = time() + $this->timeshift;
166
  if ($daily) {
167
- $nextday = explode('-', date('n-j-Y', strtotime(' +1 day', $local_time)));
168
  $midnight = mktime(0, 0, 0, $nextday[0], $nextday[1], $nextday[2]);
169
  return $midnight - $local_time;
170
  } else {
171
  $nexthour = explode('-', date('H-n-j-Y', strtotime(' +1 hour', $local_time)));
172
- $newhour = mktime($nexthour[0], 0, 0, $nexthour[1], $nexthour[2], $nexthour[3]);
173
  return $newhour - $local_time;
174
  }
175
  }
@@ -204,12 +214,88 @@ if (!class_exists('WpmsGapiController')) {
204
  } else {
205
  $timeouts = 1;
206
  }
 
 
207
  $transient = WpmsGaTools::getCache($serial);
208
  if ($transient === false) {
209
  if ($this->gapiErrorsHandler()) {
210
- return - 23;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  }
212
- $data = $this->service->data_ga->get('ga:' . $projectId, $from, $to, $metrics, $options);
213
  WpmsGaTools::setCache($serial, $data, $this->getTimeouts($timeouts));
214
  } else {
215
  $data = $transient;
@@ -233,7 +319,7 @@ if (!class_exists('WpmsGapiController')) {
233
  if ($data->getRows() > 0) {
234
  return $data;
235
  } else {
236
- return - 21;
237
  }
238
  }
239
 
@@ -252,28 +338,41 @@ if (!class_exists('WpmsGapiController')) {
252
  /**
253
  * Analytics data for Area Charts (Admin Dashboard Widget report)
254
  *
255
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
256
- * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
257
- * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
258
- * @param string $query Query
259
- * @param string $filter Filter
 
260
  *
261
  * @return array|integer|string
262
  */
263
- private function getAreachartData($projectId, $from, $to, $query, $filter = '')
264
  {
265
  switch ($query) {
266
  case 'users':
267
- $title = esc_html__('Users', 'wp-meta-seo');
 
 
268
  break;
269
  case 'pageviews':
270
- $title = esc_html__('Page Views', 'wp-meta-seo');
 
 
271
  break;
272
  case 'visitBounceRate':
273
  $title = esc_html__('Bounce Rate', 'wp-meta-seo');
 
 
 
 
274
  break;
275
  case 'organicSearches':
276
  $title = esc_html__('Organic Searches', 'wp-meta-seo');
 
 
 
 
277
  break;
278
  case 'uniquePageviews':
279
  $title = esc_html__('Unique Page Views', 'wp-meta-seo');
@@ -281,54 +380,193 @@ if (!class_exists('WpmsGapiController')) {
281
  default:
282
  $title = esc_html__('Sessions', 'wp-meta-seo');
283
  }
284
- $metrics = 'ga:' . $query;
285
- if ($from === 'today' || $from === 'yesterday') {
286
- $dimensions = 'ga:hour';
287
- $dayorhour = esc_html__('Hour', 'wp-meta-seo');
288
- } elseif ($from === '365daysAgo' || $from === '1095daysAgo') {
289
- $dimensions = 'ga:yearMonth, ga:month';
290
- $dayorhour = esc_html__('Date', 'wp-meta-seo');
 
 
 
 
 
 
 
 
 
291
  } else {
292
- $dimensions = 'ga:date,ga:dayOfWeekName';
293
- $dayorhour = esc_html__('Date', 'wp-meta-seo');
294
- }
295
- $options = array('dimensions' => $dimensions, 'quotaUser' => $this->managequota . 'p' . $projectId);
296
- if ($filter) {
297
- $options['filters'] = 'ga:pagePath==' . $filter;
 
 
 
 
 
 
 
 
 
298
  }
 
299
  $serial = 'qr2_' . $this->getSerial($projectId . $from . $metrics . $filter);
300
- $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
301
  if (is_numeric($data)) {
302
  return $data;
303
  }
304
  $wpmsga_data = array(array($dayorhour, $title));
305
- if ($from === 'today' || $from === 'yesterday') {
306
- foreach ($data->getRows() as $row) {
307
- $wpmsga_data[] = array((int) $row[0] . ':00', round($row[1], 2));
308
- }
309
- } elseif ($from === '365daysAgo' || $from === '1095daysAgo') {
310
- foreach ($data->getRows() as $row) {
311
- /*
312
- * translators:
313
- * Example: 'F, Y' will become 'November, 2015'
314
- * For details see: http://php.net/manual/en/function.date.php#refsect1-function.date-parameters
315
- */
316
- $wpmsga_data[] = array(
317
- date_i18n(esc_html__('F, Y', 'wp-meta-seo'), strtotime($row[0] . '01')),
318
- round($row[2], 2)
319
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  }
321
  } else {
322
- foreach ($data->getRows() as $row) {
323
- /*
324
- * translators:
325
- * Example: 'l, F j, Y' will become 'Thusday, November 17, 2015'
326
- * For details see: http://php.net/manual/en/function.date.php#refsect1-function.date-parameters
327
- */
328
- $wpmsga_data[] = array(
329
- date_i18n(esc_html__('l, F j, Y', 'wp-meta-seo'), strtotime($row[0])),
330
- round($row[2], 2)
331
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  }
333
  }
334
 
@@ -338,43 +576,64 @@ if (!class_exists('WpmsGapiController')) {
338
  /**
339
  * Analytics data for Bottom Stats (bottom stats on main report)
340
  *
341
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
342
- * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
343
- * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
344
- * @param string $filter Filter
 
 
345
  *
346
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
347
  */
348
- private function getNottomstats($projectId, $from, $to, $filter = '')
349
  {
350
- $options = array('dimensions' => null, 'quotaUser' => $this->managequota . 'p' . $projectId);
351
- if ($filter) {
352
- $options['filters'] = 'ga:pagePath==' . $filter;
353
- $metrics = 'ga:uniquePageviews,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
 
 
 
 
354
  } else {
355
- $metrics = 'ga:sessions,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
 
356
  }
 
 
357
  $serial = 'qr3_' . $this->getSerial($projectId . $from . $filter);
358
- $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
359
  if (is_numeric($data)) {
360
- if ((int) $data === - 21) {
361
  return array_fill(0, 6, 0);
362
  } else {
363
  return $data;
364
  }
365
  }
366
  $wpmsga_data = array();
367
- foreach ($data->getRows() as $row) {
368
- $wpmsga_data = array_map('floatval', $row);
369
- }
370
 
371
  // i18n support
372
- $wpmsga_data[0] = number_format_i18n($wpmsga_data[0]);
373
- $wpmsga_data[1] = number_format_i18n($wpmsga_data[1]);
374
- $wpmsga_data[2] = number_format_i18n($wpmsga_data[2]);
375
- $wpmsga_data[3] = number_format_i18n($wpmsga_data[3], 2);
376
- $wpmsga_data[4] = number_format_i18n($wpmsga_data[4]);
377
- $wpmsga_data[5] = number_format_i18n($wpmsga_data[5], 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
 
379
  return $wpmsga_data;
380
  }
@@ -382,152 +641,227 @@ if (!class_exists('WpmsGapiController')) {
382
  /**
383
  * Analytics data for Org Charts & Table Charts (content pages)
384
  *
385
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
386
- * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
387
- * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
388
- * @param string $filter Filter
 
389
  *
390
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
391
  */
392
- private function getContentPages($projectId, $from, $to, $filter = '')
393
  {
394
- $metrics = 'ga:pageviews';
395
- $dimensions = 'ga:pageTitle';
396
- $options = array(
397
- 'dimensions' => $dimensions,
398
- 'sort' => '-ga:pageviews',
399
- 'quotaUser' => $this->managequota . 'p' . $projectId
400
- );
401
- if ($filter) {
402
- $options['filters'] = 'ga:pagePath==' . $filter;
 
 
 
 
 
 
 
 
 
403
  }
404
  $serial = 'qr4_' . $this->getSerial($projectId . $from . $filter);
405
- $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
406
  if (is_numeric($data)) {
407
  return $data;
408
  }
409
  $wpmsga_data = array(array(esc_html__('Pages', 'wp-meta-seo'), esc_html__('Views', 'wp-meta-seo')));
410
  foreach ($data->getRows() as $row) {
411
- $wpmsga_data[] = array(esc_html($row[0]), (int) $row[1]);
 
 
 
 
 
 
412
  }
 
413
  return $wpmsga_data;
414
  }
415
 
416
  /**
417
  * Analytics data for Org Charts & Table Charts (referrers)
418
  *
419
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
420
- * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
421
- * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
422
- * @param string $filter Filter
 
423
  *
424
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
425
  */
426
- private function getReferrers($projectId, $from, $to, $filter = '')
427
  {
428
- $metrics = 'ga:sessions';
429
- $dimensions = 'ga:source';
430
- $options = array(
431
- 'dimensions' => $dimensions,
432
- 'sort' => '-ga:sessions',
433
- 'quotaUser' => $this->managequota . 'p' . $projectId
434
- );
435
- if ($filter) {
436
- $options['filters'] = 'ga:medium==referral;ga:pagePath==' . $filter;
 
 
 
 
437
  } else {
438
- $options['filters'] = 'ga:medium==referral';
 
 
 
 
 
439
  }
440
  $serial = 'qr5_' . $this->getSerial($projectId . $from . $filter);
441
- $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
 
442
  if (is_numeric($data)) {
443
  return $data;
444
  }
445
  $wpmsga_data = array(array(esc_html__('Referrers', 'wp-meta-seo'), esc_html__('Sessions', 'wp-meta-seo')));
446
- foreach ($data->getRows() as $row) {
447
- $wpmsga_data[] = array(esc_html($row[0]), (int) $row[1]);
 
 
 
 
 
 
 
 
 
 
448
  }
 
449
  return $wpmsga_data;
450
  }
451
 
452
  /**
453
  * Analytics data for Org Charts & Table Charts (searches)
454
  *
455
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
456
- * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
457
- * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
458
- * @param string $filter Filter
 
459
  *
460
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
461
  */
462
- private function getSearches($projectId, $from, $to, $filter = '')
463
  {
464
- $metrics = 'ga:sessions';
465
- $dimensions = 'ga:keyword';
466
- $options = array(
467
- 'dimensions' => $dimensions,
468
- 'sort' => '-ga:sessions',
469
- 'quotaUser' => $this->managequota . 'p' . $projectId
470
- );
471
- if ($filter) {
472
- $options['filters'] = 'ga:keyword!=(not set);ga:pagePath==' . $filter;
 
 
 
 
473
  } else {
474
- $options['filters'] = 'ga:keyword!=(not set)';
 
 
 
 
 
475
  }
476
  $serial = 'qr6_' . $this->getSerial($projectId . $from . $filter);
477
- $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
478
  if (is_numeric($data)) {
479
  return $data;
480
  }
481
 
482
  $wpmsga_data = array(array(esc_html__('Searches', 'wp-meta-seo'), esc_html__('Sessions', 'wp-meta-seo')));
483
  foreach ($data->getRows() as $row) {
484
- $wpmsga_data[] = array(esc_html($row[0]), (int) $row[1]);
 
 
 
 
485
  }
 
486
  return $wpmsga_data;
487
  }
488
 
489
  /**
490
  * Analytics data for Org Charts & Table Charts (location reports)
491
  *
492
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
493
- * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
494
- * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
495
- * @param string $filter Filter
 
496
  *
497
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
498
  */
499
- private function getLocations($projectId, $from, $to, $filter = '')
500
  {
501
- $metrics = 'ga:sessions';
502
- $title = esc_html__('Countries', 'wp-meta-seo');
503
- $serial = 'qr7_' . $this->getSerial($projectId . $from . $filter);
504
- $dimensions = 'ga:country';
505
- $local_filter = '';
506
- $options = array(
507
- 'dimensions' => $dimensions,
508
- 'sort' => '-ga:sessions',
509
- 'quotaUser' => $this->managequota . 'p' . $projectId
510
- );
511
- if ($filter) {
512
- $options['filters'] = 'ga:pagePath==' . $filter;
513
- if ($local_filter) {
514
- $options['filters'] .= ';' . $local_filter;
 
 
 
 
 
 
515
  }
516
  } else {
517
- if ($local_filter) {
518
- $options['filters'] = $local_filter;
519
- }
 
 
 
 
520
  }
521
  $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
522
  if (is_numeric($data)) {
523
  return $data;
524
  }
525
  $wpmsga_data = array(array($title, esc_html__('Sessions', 'wp-meta-seo')));
526
- foreach ($data->getRows() as $row) {
527
- if (isset($row[2])) {
528
- $wpmsga_data[] = array(esc_html($row[0]) . ', ' . esc_html($row[1]), (int) $row[2]);
529
- } else {
530
- $wpmsga_data[] = array(esc_html($row[0]), (int) $row[1]);
 
 
 
 
 
 
 
 
 
 
531
  }
532
  }
533
  return $wpmsga_data;
@@ -536,48 +870,94 @@ if (!class_exists('WpmsGapiController')) {
536
  /**
537
  * Analytics data for Org Charts (traffic channels, device categories)
538
  *
539
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
540
- * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
541
- * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
542
- * @param string $query Query
543
- * @param string $filter Filter
 
544
  *
545
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
546
  */
547
- private function getOrgchartData($projectId, $from, $to, $query, $filter = '')
548
  {
549
- $metrics = 'ga:sessions';
550
- $dimensions = 'ga:' . $query;
551
- $options = array(
552
- 'dimensions' => $dimensions,
553
- 'sort' => '-ga:sessions',
554
- 'quotaUser' => $this->managequota . 'p' . $projectId
555
- );
556
- if ($filter) {
557
- $options['filters'] = 'ga:pagePath==' . $filter;
 
 
 
 
 
 
 
 
 
 
 
 
 
558
  }
559
  $serial = 'qr8_' . $this->getSerial($projectId . $from . $query . $filter);
560
- $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
561
  if (is_numeric($data)) {
562
  return $data;
563
  }
564
- $block = ($query === 'channelGrouping') ? esc_html__('Channels', 'wp-meta-seo') : esc_html__('Devices', 'wp-meta-seo');
565
- $wpmsga_data = array(
566
- array(
567
- '<div style="color:black; font-size:1.1em">' . $block . '</div>
568
- <div style="color:darkblue; font-size:1.2em">' . (int) $data['totalsForAllResults']['ga:sessions'] . '</div>',
569
- ''
570
- )
571
- );
572
- foreach ($data->getRows() as $row) {
573
- $shrink = explode(' ', $row[0]);
574
- $wpmsga_data[] = array(
575
- '<div style="color:black; font-size:1.1em">' . esc_html($shrink[0]) . '</div>
576
- <div style="color:darkblue; font-size:1.2em">' . (int) esc_html($row[1]) . '</div>',
577
- '<div style="color:black; font-size:1.1em">' . $block . '</div>
578
- <div style="color:darkblue; font-size:1.2em">' . (int) esc_html($data['totalsForAllResults']['ga:sessions']) . '</div>'
579
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
580
  }
 
581
  return $wpmsga_data;
582
  }
583
 
@@ -585,61 +965,110 @@ if (!class_exists('WpmsGapiController')) {
585
  * Analytics data for Pie Charts (traffic mediums,
586
  * serach engines, social networks, browsers, screen rsolutions, etc.)
587
  *
588
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
589
- * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
590
- * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
591
- * @param string $query Query
592
- * @param string $filter Filter
 
593
  *
594
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
595
  */
596
- private function getPiechartData($projectId, $from, $to, $query, $filter = '')
597
  {
598
- $metrics = 'ga:sessions';
599
- $dimensions = 'ga:' . $query;
 
600
 
601
- if ($query === 'source') {
602
- $options = array(
603
- 'dimensions' => $dimensions,
604
- 'sort' => '-ga:sessions',
605
- 'quotaUser' => $this->managequota . 'p' . $projectId
606
- );
607
- if ($filter) {
608
- $options['filters'] = 'ga:medium==organic;ga:keyword!=(not set);ga:pagePath==' . $filter;
 
 
 
609
  } else {
610
- $options['filters'] = 'ga:medium==organic;ga:keyword!=(not set)';
 
 
 
 
 
 
 
 
 
611
  }
612
  } else {
613
- $options = array(
614
- 'dimensions' => $dimensions,
615
- 'sort' => '-ga:sessions',
616
- 'quotaUser' => $this->managequota . 'p' . $projectId
617
- );
618
- if ($filter) {
619
- $options['filters'] = 'ga:' . $query . '!=(not set);ga:pagePath==' . $filter;
620
  } else {
621
- $options['filters'] = 'ga:' . $query . '!=(not set)';
622
  }
 
 
 
 
623
  }
624
  $serial = 'qr10_' . $this->getSerial($projectId . $from . $query . $filter);
625
- $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
626
  if (is_numeric($data)) {
627
  return $data;
628
  }
629
  $wpmsga_data = array(array(esc_html__('Type', 'wp-meta-seo'), esc_html__('Sessions', 'wp-meta-seo')));
630
- $i = 0;
631
- $included = 0;
632
- foreach ($data->getRows() as $row) {
633
- if ($i < 20) {
634
- $wpmsga_data[] = array(str_replace('(none)', 'direct', esc_html($row[0])), (int) $row[1]);
635
- $included += $row[1];
636
- $i ++;
637
- } else {
638
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
639
  }
640
  }
641
- $totals = $data->getTotalsForAllResults();
642
- $others = $totals['ga:sessions'] - $included;
643
  if ($others > 0) {
644
  $wpmsga_data[] = array(esc_html__('Other', 'wp-meta-seo'), $others);
645
  }
@@ -658,18 +1087,18 @@ if (!class_exists('WpmsGapiController')) {
658
  */
659
  public function frontendWidgetStats($projectId, $from, $anonim)
660
  {
661
- $content = '';
662
- $to = 'yesterday';
663
- $metrics = 'ga:sessions';
664
  $dimensions = 'ga:date,ga:dayOfWeekName';
665
- $options = array('dimensions' => $dimensions, 'quotaUser' => $this->managequota . 'p' . $projectId);
666
- $serial = 'qr2_' . $this->getSerial($projectId . $from . $metrics);
667
- $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
668
  if (is_numeric($data)) {
669
  return $data;
670
  }
671
  $wpmsga_data = array(array(esc_html__('Date', 'wp-meta-seo'), esc_html__('Sessions', 'wp-meta-seo')));
672
- $max = 1;
673
  if ($anonim) {
674
  $max_array = array();
675
  foreach ($data->getRows() as $item) {
@@ -680,7 +1109,7 @@ if (!class_exists('WpmsGapiController')) {
680
  foreach ($data->getRows() as $row) {
681
  $wpmsga_data[] = array(
682
  date_i18n(esc_html__('l, F j, Y', 'wp-meta-seo'), strtotime($row[0])),
683
- ($anonim ? round($row[2] * 100 / $max, 2) : (int) $row[2])
684
  );
685
  }
686
  $totals = $data->getTotalsForAllResults();
@@ -690,29 +1119,60 @@ if (!class_exists('WpmsGapiController')) {
690
  /**
691
  * Analytics data for Realtime component (the real-time report)
692
  *
693
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
 
694
  *
695
  * @return array|integer|mixed
696
  */
697
- private function getRealtime($projectId)
698
  {
699
- $metrics = 'rt:activeUsers';
700
- $dimensions = 'rt:pagePath,rt:source,rt:keyword,rt:trafficType,rt:visitorType,rt:pageTitle';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701
  try {
702
- $serial = 'qr_realtimecache_' . $this->getSerial($projectId);
703
  $transient = WpmsGaTools::getCache($serial);
704
  if ($transient === false) {
705
  if ($this->gapiErrorsHandler()) {
706
- return - 23;
 
 
 
 
 
 
 
 
 
 
 
 
 
707
  }
708
- $data = $this->service->data_realtime->get(
709
- 'ga:' . $projectId,
710
- $metrics,
711
- array(
712
- 'dimensions' => $dimensions,
713
- 'quotaUser' => $this->managequota . 'p' . $projectId
714
- )
715
- );
716
  WpmsGaTools::setCache($serial, $data, 55);
717
  } else {
718
  $data = $transient;
@@ -737,14 +1197,29 @@ if (!class_exists('WpmsGapiController')) {
737
  );
738
  return $e->getCode();
739
  }
740
- if ($data->getRows() < 1) {
741
- return - 21;
742
- }
743
- $i = 0;
744
- $wpmsga_data = $data;
745
- foreach ($data->getRows() as $row) {
746
- $wpmsga_data->rows[$i] = array_map('esc_html', $row);
747
- $i ++;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
748
  }
749
  return array($wpmsga_data);
750
  }
@@ -752,18 +1227,19 @@ if (!class_exists('WpmsGapiController')) {
752
  /**
753
  * Handles ajax requests and calls the needed methods
754
  *
755
- * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile)
756
- * @param string $query QueryID.
757
- * @param boolean|string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
758
- * @param boolean|string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
759
- * @param string $filter Filter
 
760
  *
761
  * @return array|boolean|Google_Service_Analytics_GaData|int|mixed
762
  */
763
- public function get($projectId, $query, $from = false, $to = false, $filter = '')
764
  {
765
  if (empty($projectId) || !is_numeric($projectId)) {
766
- wp_die(- 26);
767
  }
768
 
769
  $groups = array(
@@ -775,33 +1251,33 @@ if (!class_exists('WpmsGapiController')) {
775
  'uniquePageviews'
776
  );
777
  if (in_array($query, $groups)) {
778
- return $this->getAreachartData($projectId, $from, $to, $query, $filter);
779
  }
780
  if ($query === 'bottomstats') {
781
- return $this->getNottomstats($projectId, $from, $to, $filter);
782
  }
783
  if ($query === 'locations') {
784
- return $this->getLocations($projectId, $from, $to, $filter);
785
  }
786
  if ($query === 'referrers') {
787
- return $this->getReferrers($projectId, $from, $to, $filter);
788
  }
789
  if ($query === 'contentpages') {
790
- return $this->getContentPages($projectId, $from, $to, $filter);
791
  }
792
  if ($query === 'searches') {
793
- return $this->getSearches($projectId, $from, $to, $filter);
794
  }
795
  if ($query === 'realtime') {
796
- return $this->getRealtime($projectId);
797
  }
798
  if ($query === 'channelGrouping' || $query === 'deviceCategory') {
799
- return $this->getOrgchartData($projectId, $from, $to, $query, $filter);
800
  }
801
 
802
  $arrs = array(
803
  'medium',
804
- 'visitorType',
805
  'socialNetwork',
806
  'source',
807
  'browser',
@@ -810,9 +1286,9 @@ if (!class_exists('WpmsGapiController')) {
810
  'mobileDeviceBranding'
811
  );
812
  if (in_array($query, $arrs)) {
813
- return $this->getPiechartData($projectId, $from, $to, $query, $filter);
814
  }
815
- wp_die(- 27);
816
  }
817
  }
818
  }
27
  * @var Google_Service_Analytics
28
  */
29
  public $service;
30
+ /**
31
+ * Google analytics 4 service
32
+ *
33
+ * @var Google_Service_AnalyticsData
34
+ */
35
+ public $service_ga4;
36
  /**
37
  * Time shift
38
  *
59
  {
60
  parent::__construct();
61
  $google_alanytics = get_option('wpms_google_alanytics');
62
+ $this->wpmsga = WPMSGA();
63
  include_once(WPMETASEO_PLUGIN_DIR . 'inc/lib/google-api/vendor/autoload.php');
64
  // $config = new Google_Config();
65
  // $config->setCacheClass('Google_Cache_Null');
80
  // }
81
 
82
  $this->client = new WPMSGoogle\Client();
83
+ $this->client->setScopes(array(
84
+ 'https://www.googleapis.com/auth/tagmanager.edit.containers',
85
+ 'https://www.googleapis.com/auth/analytics.readonly'
86
+ ));
87
  $this->client->setAccessType('offline');
88
  $this->client->setApplicationName('WP Meta SEO');
89
  $this->client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
90
  $this->setErrorTimeout();
91
  $this->managequota = 'u' . get_current_user_id() . 's' . get_current_blog_id();
92
+ $this->client = WpmsGaTools::setClient($this->client, $google_alanytics, $this->access);
93
+ $this->service = new Google_Service_Analytics($this->client);
94
+ $this->service_ga4 = new Google_Service_AnalyticsData($this->client);
95
  if (!empty($google_alanytics['googleCredentials'])) {
96
  $token = $google_alanytics['googleCredentials'];
97
  if ($token) {
157
  return true;
158
  }
159
  }
160
+ if ((int)$errors[0] === 400 || (int)$errors[0] === 401 || (int)$errors[0] === 403) {
161
  return true;
162
  }
163
  return false;
174
  {
175
  $local_time = time() + $this->timeshift;
176
  if ($daily) {
177
+ $nextday = explode('-', date('n-j-Y', strtotime(' +1 day', $local_time)));
178
  $midnight = mktime(0, 0, 0, $nextday[0], $nextday[1], $nextday[2]);
179
  return $midnight - $local_time;
180
  } else {
181
  $nexthour = explode('-', date('H-n-j-Y', strtotime(' +1 hour', $local_time)));
182
+ $newhour = mktime($nexthour[0], 0, 0, $nexthour[1], $nexthour[2], $nexthour[3]);
183
  return $newhour - $local_time;
184
  }
185
  }
214
  } else {
215
  $timeouts = 1;
216
  }
217
+
218
+ // WpmsGaTools::deleteCache($serial);
219
  $transient = WpmsGaTools::getCache($serial);
220
  if ($transient === false) {
221
  if ($this->gapiErrorsHandler()) {
222
+ return -23;
223
+ }
224
+
225
+ $google_analytics = get_option('wpms_google_alanytics');
226
+ $profile_info = WpmsGaTools::getSelectedProfile($google_analytics['profile_list'], $projectId);
227
+ $property_type = $profile_info[4];
228
+
229
+ if ($property_type === 'UA') {
230
+ $data = $this->service->data_ga->get('ga:' . $projectId, $from, $to, $metrics, $options);
231
+ } else {
232
+ if ($metrics === 'bottomstats') {
233
+ $ga4_metrics_sessions = new Google_Service_AnalyticsData_Metric();
234
+ $ga4_metrics_sessions->setName('sessions');
235
+
236
+ $ga4_metrics_users = new Google_Service_AnalyticsData_Metric();
237
+ $ga4_metrics_users->setName('totalUsers');
238
+
239
+ $ga4_metrics_page_views = new Google_Service_AnalyticsData_Metric();
240
+ $ga4_metrics_page_views->setName('screenPageViews');
241
+
242
+ $ga4_metrics_engagement = new Google_Service_AnalyticsData_Metric();
243
+ $ga4_metrics_engagement->setName('engagementAVG');
244
+ $ga4_metrics_engagement->setExpression('userEngagementDuration/totalUsers');
245
+
246
+ $ga4_metrics_organic = new Google_Service_AnalyticsData_Metric();
247
+ $ga4_metrics_organic->setName('transactions');
248
+
249
+ $ga4_metrics_pageViewsPerSession = new Google_Service_AnalyticsData_Metric();
250
+ $ga4_metrics_pageViewsPerSession->setName('PageViewsPerSession');
251
+ $ga4_metrics_pageViewsPerSession->setExpression('screenPageViews/sessions');
252
+
253
+ $ga4_metrics = array($ga4_metrics_sessions, $ga4_metrics_users, $ga4_metrics_page_views, $ga4_metrics_engagement,
254
+ $ga4_metrics_organic, $ga4_metrics_pageViewsPerSession);
255
+ } elseif ($options['ga4_dimensions'] === 'visitorType') {
256
+ $ga4_metric_new_user = new Google_Service_AnalyticsData_Metric();
257
+ $ga4_metric_new_user->setName('newUsers');
258
+
259
+ $ga4_metric_total_users = new Google_Service_AnalyticsData_Metric();
260
+ $ga4_metric_total_users->setName('totalUsers');
261
+
262
+ $ga4_metrics = array($ga4_metric_new_user, $ga4_metric_total_users);
263
+ } elseif ($metrics === 'averageEngagementTime') {
264
+ $ga4_metrics = new Google_Service_AnalyticsData_Metric();
265
+ $ga4_metrics->setName('averageEngagementTime');
266
+ $ga4_metrics->setExpression('userEngagementDuration/totalUsers');
267
+ } else {
268
+ $ga4_metrics = new Google_Service_AnalyticsData_Metric();
269
+ $ga4_metrics->setName($metrics);
270
+ }
271
+
272
+ if ($options['ga4_dimensions'] === 'month_and_year') {
273
+ $dim_month = new Google_Service_AnalyticsData_Dimension();
274
+ $dim_month->setName('month');
275
+
276
+ $dim_year = new Google_Service_AnalyticsData_Dimension();
277
+ $dim_year->setName('year');
278
+
279
+ $ga4_dimensions = array($dim_month, $dim_year);
280
+ } else {
281
+ $dim = $options['ga4_dimensions'];
282
+ $ga4_dimensions = new Google_Service_AnalyticsData_Dimension();
283
+ $ga4_dimensions->setName($dim);
284
+ }
285
+
286
+ $date_range = new Google_Service_AnalyticsData_DateRange();
287
+ $date_range->setStartDate($from);
288
+ $date_range->setEndDate($to);
289
+
290
+ $request = new Google_Service_AnalyticsData_RunReportRequest();
291
+ $request->setMetrics(array($ga4_metrics));
292
+ $request->setDateRanges($date_range);
293
+ if ($metrics !== 'bottomstats' && $options['ga4_dimensions'] !== 'visitorType') {
294
+ $request->setDimensions($ga4_dimensions);
295
+ }
296
+
297
+ $data = $this->service_ga4->properties->runReport('properties/' . $projectId, $request);
298
  }
 
299
  WpmsGaTools::setCache($serial, $data, $this->getTimeouts($timeouts));
300
  } else {
301
  $data = $transient;
319
  if ($data->getRows() > 0) {
320
  return $data;
321
  } else {
322
+ return -21;
323
  }
324
  }
325
 
338
  /**
339
  * Analytics data for Area Charts (Admin Dashboard Widget report)
340
  *
341
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
342
+ * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
343
+ * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
344
+ * @param string $query Query
345
+ * @param string $filter Filter
346
+ * @param string $property_type Google analytic property type Universal|GA4
347
  *
348
  * @return array|integer|string
349
  */
350
+ private function getAreachartData($projectId, $from, $to, $query, $filter, $property_type)
351
  {
352
  switch ($query) {
353
  case 'users':
354
+ if ($property_type === 'GA4') {
355
+ $query = 'totalUsers'; // GA4 support
356
+ } $title = esc_html__('Users', 'wp-meta-seo');
357
  break;
358
  case 'pageviews':
359
+ if ($property_type === 'GA4') {
360
+ $query = 'screenPageViews'; // GA4 support
361
+ } $title = esc_html__('Page Views', 'wp-meta-seo');
362
  break;
363
  case 'visitBounceRate':
364
  $title = esc_html__('Bounce Rate', 'wp-meta-seo');
365
+ if ($property_type === 'GA4') {
366
+ $query = 'averageEngagementTime'; // GA4 support: average engagement time
367
+ $title = esc_html__('AVG Engagement Time', 'wp-meta-seo');
368
+ }
369
  break;
370
  case 'organicSearches':
371
  $title = esc_html__('Organic Searches', 'wp-meta-seo');
372
+ if ($property_type === 'GA4') {
373
+ $query = 'transactions'; // GA4 support
374
+ $title = esc_html__('Transactions', 'wp-meta-seo');
375
+ }
376
  break;
377
  case 'uniquePageviews':
378
  $title = esc_html__('Unique Page Views', 'wp-meta-seo');
380
  default:
381
  $title = esc_html__('Sessions', 'wp-meta-seo');
382
  }
383
+ if ($property_type === 'UA') {
384
+ $metrics = 'ga:' . $query;
385
+ if ($from === 'today' || $from === 'yesterday') {
386
+ $dimensions = 'ga:hour';
387
+ $dayorhour = esc_html__('Hour', 'wp-meta-seo');
388
+ } elseif ($from === '365daysAgo' || $from === '1095daysAgo') {
389
+ $dimensions = 'ga:yearMonth, ga:month';
390
+ $dayorhour = esc_html__('Date', 'wp-meta-seo');
391
+ } else {
392
+ $dimensions = 'ga:date,ga:dayOfWeekName';
393
+ $dayorhour = esc_html__('Date', 'wp-meta-seo');
394
+ }
395
+ $options = array('dimensions' => $dimensions, 'quotaUser' => $this->managequota . 'p' . $projectId);
396
+ if ($filter) {
397
+ $options['filters'] = 'ga:pagePath==' . $filter;
398
+ }
399
  } else {
400
+ $metrics = $query;
401
+ if ($from === 'today' || $from === 'yesterday') {
402
+ $dimensions = 'hour';
403
+ $dayorhour = esc_html__('Hour', 'wp-meta-seo');
404
+ } elseif ($from === '365daysAgo' || $from === '1095daysAgo') {
405
+ $dimensions = 'month_and_year';
406
+ $dayorhour = esc_html__('Date', 'wp-meta-seo');
407
+ } else {
408
+ $dimensions = 'date';
409
+ $dayorhour = esc_html__('Date', 'wp-meta-seo');
410
+ }
411
+ $options = array('ga4_dimensions' => $dimensions, 'quotaUser' => $this->managequota . 'p' . $projectId);
412
+ if ($filter) {
413
+ $options['filters'] = 'pagePathPlusQueryString==' . $filter;
414
+ }
415
  }
416
+
417
  $serial = 'qr2_' . $this->getSerial($projectId . $from . $metrics . $filter);
418
+ $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
419
  if (is_numeric($data)) {
420
  return $data;
421
  }
422
  $wpmsga_data = array(array($dayorhour, $title));
423
+ if ($property_type === 'UA') {
424
+ if ($from === 'today' || $from === 'yesterday') {
425
+ foreach ($data->getRows() as $row) {
426
+ $wpmsga_data[] = array((int)$row[0] . ':00', round($row[1], 2));
427
+ }
428
+ } elseif ($from === '365daysAgo' || $from === '1095daysAgo') {
429
+ foreach ($data->getRows() as $row) {
430
+ /*
431
+ * translators:
432
+ * Example: 'F, Y' will become 'November, 2015'
433
+ * For details see: http://php.net/manual/en/function.date.php#refsect1-function.date-parameters
434
+ */
435
+ $wpmsga_data[] = array(
436
+ date_i18n(esc_html__('F, Y', 'wp-meta-seo'), strtotime($row[0] . '01')),
437
+ round($row[2], 2)
438
+ );
439
+ }
440
+ } else {
441
+ foreach ($data->getRows() as $row) {
442
+ /*
443
+ * translators:
444
+ * Example: 'l, F j, Y' will become 'Thusday, November 17, 2015'
445
+ * For details see: http://php.net/manual/en/function.date.php#refsect1-function.date-parameters
446
+ */
447
+ $wpmsga_data[] = array(
448
+ date_i18n(esc_html__('l, F j, Y', 'wp-meta-seo'), strtotime($row[0])),
449
+ round($row[2], 2)
450
+ );
451
+ }
452
  }
453
  } else {
454
+ if ($from === 'today' || $from === 'yesterday') {
455
+ for ($i = 1; $i <= 24; $i++) {
456
+ $wpmsga_data[] = array($i - 1 . ':00', round(0, 2));
457
+ }
458
+
459
+ if (!is_numeric($data->rowCount)) {
460
+ return $wpmsga_data;
461
+ }
462
+ foreach ($data->getRows() as $row) {
463
+ $dim = $row->getDimensionValues();
464
+ $dimensionValues = $dim[0]->getValue();
465
+ $metr = $row->getMetricValues();
466
+ $metricValues = $metr[0]->getValue();
467
+ $wpmsga_data[$dimensionValues + 1] = array((int)$dimensionValues . ':00', round($metricValues, 2));
468
+ }
469
+ } elseif ($from === '365daysAgo' || $from === '1095daysAgo') {
470
+ $start_month = 0;
471
+ if ($from === '365daysAgo') {
472
+ $end_month = 12;
473
+ } else {
474
+ $end_month = 36;
475
+ }
476
+ $now_month = date('m');
477
+ $now_year = date('Y');
478
+
479
+ $month_index = $now_month;
480
+ $year_index = $now_year;
481
+ while ($start_month <= $end_month) {
482
+ $wpmsga_data_tmp[$year_index . str_pad($month_index, 2, '0', STR_PAD_LEFT)] = array(
483
+ date_i18n(esc_html__('F, Y', 'wp-meta-seo'), strtotime($year_index . str_pad($month_index, 2, '0', STR_PAD_LEFT) . '01')),
484
+ round(0, 2));
485
+ $month_index--;
486
+ if ($month_index === 0) {
487
+ $month_index = 12;
488
+ $year_index--;
489
+ }
490
+ /*$wpmsga_data_tmp[strtotime($now_month . '-' . $start_month . 'month')] = array(
491
+ date_i18n(esc_html__('F, Y', 'wp-meta-seo'), strtotime($now_month . '-' . $start_month . 'day')),
492
+ round(0, 2)
493
+ );*/
494
+ $start_month++;
495
+ }
496
+ $wpmsga_data_tmp = array_reverse($wpmsga_data_tmp, true);
497
+ foreach ($data->getRows() as $row) {
498
+ /*
499
+ * translators:
500
+ * Example: 'F, Y' will become 'November, 2015'
501
+ * For details see: http://php.net/manual/en/function.date.php#refsect1-function.date-parameters
502
+ */
503
+ $dim_y = $row->getDimensionValues();
504
+ $year_dim = $dim_y[1]->getValue();
505
+ $dim_m = $row->getDimensionValues();
506
+ $month_dim = $dim_m[0]->getValue();
507
+
508
+ $month_and_year = date_i18n(esc_html__('F, Y', 'wp-meta-seo'), strtotime($year_dim . $month_dim . '01'));
509
+ $metr = $row->getMetricValues();
510
+ $metric_values = $metr[0]->getValue();
511
+ if (isset($wpmsga_data_tmp[$year_dim . $month_dim])) {
512
+ $wpmsga_data_tmp[$year_dim . $month_dim] = array(
513
+ $month_and_year,
514
+ round($metric_values, 2)
515
+ );
516
+ }
517
+ }
518
+
519
+ foreach ($wpmsga_data_tmp as $tmp) {
520
+ $wpmsga_data[] = $tmp;
521
+ }
522
+ } else {
523
+ $end_date_index = 1;
524
+ switch ($from) {
525
+ case '7daysAgo':
526
+ $start_date_index = 7;
527
+ break;
528
+ case '14daysAgo':
529
+ $start_date_index = 14;
530
+ break;
531
+ case '30daysAgo':
532
+ $start_date_index = 30;
533
+ break;
534
+ case '90daysAgo':
535
+ $start_date_index = 90;
536
+ break;
537
+ default:
538
+ $start_date_index = 7;
539
+ }
540
+
541
+ $now_date = date('Ymd');
542
+
543
+ while ($start_date_index >= $end_date_index) {
544
+ $wpmsga_data_tmp[strtotime($now_date . '-' . $start_date_index . 'day')] = array(
545
+ date_i18n(esc_html__('l, F j, Y', 'wp-meta-seo'), strtotime($now_date . '-' . $start_date_index . 'day')),
546
+ round(0, 2)
547
+ );
548
+ $start_date_index--;
549
+ }
550
+ foreach ($data->getRows() as $row) {
551
+ /*
552
+ * translators:
553
+ * Example: 'l, F j, Y' will become 'Thusday, November 17, 2015'
554
+ * For details see: http://php.net/manual/en/function.date.php#refsect1-function.date-parameters
555
+ */
556
+ $dim = $row->getDimensionValues();
557
+ $dateValues = date_i18n(esc_html__('l, F j, Y', 'wp-meta-seo'), strtotime($dim[0]->getValue()));
558
+ $metr = $row->getMetricValues();
559
+ $metricValues = $metr[0]->getValue();
560
+ if (isset($wpmsga_data_tmp[strtotime($dim[0]->getValue())])) {
561
+ $wpmsga_data_tmp[strtotime($dim[0]->getValue())] = array(
562
+ $dateValues,
563
+ round($metricValues, 2)
564
+ );
565
+ }
566
+ }
567
+ foreach ($wpmsga_data_tmp as $tmp) {
568
+ $wpmsga_data[] = $tmp;
569
+ }
570
  }
571
  }
572
 
576
  /**
577
  * Analytics data for Bottom Stats (bottom stats on main report)
578
  *
579
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
580
+ * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
581
+ * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
582
+ * @param string $query Query
583
+ * @param string $filter Filter
584
+ * @param string $property_type Google analytic property type
585
  *
586
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
587
  */
588
+ private function getNottomstats($projectId, $from, $to, $query, $filter = '', $property_type = 'UA')
589
  {
590
+ if ($property_type === 'UA') {
591
+ $options = array('dimensions' => null, 'quotaUser' => $this->managequota . 'p' . $projectId);
592
+ if ($filter) {
593
+ $options['filters'] = 'ga:pagePath==' . $filter;
594
+ $metrics = 'ga:uniquePageviews,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
595
+ } else {
596
+ $metrics = 'ga:sessions,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
597
+ }
598
  } else {
599
+ $options = array('quotaUser' => $this->managequota . 'p' . $projectId);
600
+ $metrics = $query;
601
  }
602
+
603
+
604
  $serial = 'qr3_' . $this->getSerial($projectId . $from . $filter);
605
+ $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
606
  if (is_numeric($data)) {
607
+ if ((int)$data === -21) {
608
  return array_fill(0, 6, 0);
609
  } else {
610
  return $data;
611
  }
612
  }
613
  $wpmsga_data = array();
 
 
 
614
 
615
  // i18n support
616
+ if ($property_type === 'UA') {
617
+ foreach ($data->getRows() as $row) {
618
+ $wpmsga_data = array_map('floatval', $row);
619
+ }
620
+ } else {
621
+ if (!is_numeric($data->rowCount)) {
622
+ $wpmsga_data = array('0', '0', '0', '0', '0', '0');
623
+ } else {
624
+ $get_row = $data->getRows();
625
+ $metric_data = $get_row[0];
626
+ foreach ($metric_data->getMetricValues() as $getMetricValue) {
627
+ $wpmsga_data[] = (int)$getMetricValue->getValue();
628
+ }
629
+ }
630
+ }
631
+ $wpmsga_data[0] = number_format_i18n($wpmsga_data[0]); // sessions
632
+ $wpmsga_data[1] = number_format_i18n($wpmsga_data[1]); // users
633
+ $wpmsga_data[2] = number_format_i18n($wpmsga_data[2]); // page views
634
+ $wpmsga_data[3] = number_format_i18n($wpmsga_data[3], 2); // bounce rate | engagement time
635
+ $wpmsga_data[4] = number_format_i18n($wpmsga_data[4]); // organic search | transactions
636
+ $wpmsga_data[5] = number_format_i18n($wpmsga_data[5], 2); // page/session
637
 
638
  return $wpmsga_data;
639
  }
641
  /**
642
  * Analytics data for Org Charts & Table Charts (content pages)
643
  *
644
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
645
+ * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
646
+ * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
647
+ * @param string $filter Filter
648
+ * @param string $property_type Google analytic property type
649
  *
650
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
651
  */
652
+ private function getContentPages($projectId, $from, $to, $filter = '', $property_type = 'UA')
653
  {
654
+ if ($property_type === 'GA4') {
655
+ $metrics = 'screenPageViews';
656
+ $dimensions = 'pageTitle';
657
+ $options = array(
658
+ 'ga4_dimensions' => $dimensions,
659
+ 'quotaUser' => $this->managequota . 'p' . $projectId
660
+ );
661
+ } else {
662
+ $metrics = 'ga:pageviews';
663
+ $dimensions = 'ga:pageTitle';
664
+ $options = array(
665
+ 'dimensions' => $dimensions,
666
+ 'sort' => '-ga:pageviews',
667
+ 'quotaUser' => $this->managequota . 'p' . $projectId
668
+ );
669
+ if ($filter) {
670
+ $options['filters'] = 'ga:pagePath==' . $filter;
671
+ }
672
  }
673
  $serial = 'qr4_' . $this->getSerial($projectId . $from . $filter);
674
+ $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
675
  if (is_numeric($data)) {
676
  return $data;
677
  }
678
  $wpmsga_data = array(array(esc_html__('Pages', 'wp-meta-seo'), esc_html__('Views', 'wp-meta-seo')));
679
  foreach ($data->getRows() as $row) {
680
+ if ($property_type === 'GA4') {
681
+ $dim = $row->getDimensionValues();
682
+ $metr = $row->getMetricValues();
683
+ $wpmsga_data[] = array(esc_html($dim[0]->getValue()), (int)$metr[0]->getValue());
684
+ } else {
685
+ $wpmsga_data[] = array(esc_html($row[0]), (int)$row[1]);
686
+ }
687
  }
688
+
689
  return $wpmsga_data;
690
  }
691
 
692
  /**
693
  * Analytics data for Org Charts & Table Charts (referrers)
694
  *
695
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
696
+ * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
697
+ * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
698
+ * @param string $filter Filter
699
+ * @param string $property_type Google analytic property
700
  *
701
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
702
  */
703
+ private function getReferrers($projectId, $from, $to, $filter = '', $property_type = 'UA')
704
  {
705
+ if ($property_type === 'UA') {
706
+ $metrics = 'ga:sessions';
707
+ $dimensions = 'ga:source';
708
+ $options = array(
709
+ 'dimensions' => $dimensions,
710
+ 'sort' => '-ga:sessions',
711
+ 'quotaUser' => $this->managequota . 'p' . $projectId
712
+ );
713
+ if ($filter) {
714
+ $options['filters'] = 'ga:medium==referral;ga:pagePath==' . $filter;
715
+ } else {
716
+ $options['filters'] = 'ga:medium==referral';
717
+ }
718
  } else {
719
+ $metrics = 'sessions';
720
+ $dimensions = 'source';
721
+ $options = array(
722
+ 'ga4_dimensions' => $dimensions,
723
+ 'quotaUser' => $this->managequota . 'p' . $projectId
724
+ );
725
  }
726
  $serial = 'qr5_' . $this->getSerial($projectId . $from . $filter);
727
+ $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
728
+
729
  if (is_numeric($data)) {
730
  return $data;
731
  }
732
  $wpmsga_data = array(array(esc_html__('Referrers', 'wp-meta-seo'), esc_html__('Sessions', 'wp-meta-seo')));
733
+ if ($property_type === 'UA') {
734
+ foreach ($data->getRows() as $row) {
735
+ $wpmsga_data[] = array(esc_html($row[0]), (int)$row[1]);
736
+ }
737
+ } else {
738
+ foreach ($data->getRows() as $row) {
739
+ $metr = $row->getMetricValues();
740
+ $metric_value = $metr[0]->getValue();
741
+ $dim = $row->getDimensionValues();
742
+ $dimension_value = $dim[0]->getValue();
743
+ $wpmsga_data[] = array(esc_html($dimension_value), (int)$metric_value);
744
+ }
745
  }
746
+
747
  return $wpmsga_data;
748
  }
749
 
750
  /**
751
  * Analytics data for Org Charts & Table Charts (searches)
752
  *
753
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
754
+ * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
755
+ * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
756
+ * @param string $filter Filter
757
+ * @param string $property_type Google analytic property
758
  *
759
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
760
  */
761
+ private function getSearches($projectId, $from, $to, $filter = '', $property_type = 'UA')
762
  {
763
+ if ($property_type === 'UA') {
764
+ $metrics = 'ga:sessions';
765
+ $dimensions = 'ga:keyword';
766
+ $options = array(
767
+ 'dimensions' => $dimensions,
768
+ 'sort' => '-ga:sessions',
769
+ 'quotaUser' => $this->managequota . 'p' . $projectId
770
+ );
771
+ if ($filter) {
772
+ $options['filters'] = 'ga:keyword!=(not set);ga:pagePath==' . $filter;
773
+ } else {
774
+ $options['filters'] = 'ga:keyword!=(not set)';
775
+ }
776
  } else {
777
+ $metrics = 'sessions';
778
+ $dimensions = 'sessionGoogleAdsKeyword';
779
+ $options = array(
780
+ 'ga4_dimensions' => $dimensions,
781
+ 'quotaUser' => $this->managequota . 'p' . $projectId
782
+ );
783
  }
784
  $serial = 'qr6_' . $this->getSerial($projectId . $from . $filter);
785
+ $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
786
  if (is_numeric($data)) {
787
  return $data;
788
  }
789
 
790
  $wpmsga_data = array(array(esc_html__('Searches', 'wp-meta-seo'), esc_html__('Sessions', 'wp-meta-seo')));
791
  foreach ($data->getRows() as $row) {
792
+ $metr = $row->getMetricValues();
793
+ $metric_value = $metr[0]->getValue();
794
+ $dim = $row->getDimensionValues();
795
+ $dimension_value = $dim[0]->getValue();
796
+ $wpmsga_data[] = array(esc_html($dimension_value), (int)$metric_value);
797
  }
798
+
799
  return $wpmsga_data;
800
  }
801
 
802
  /**
803
  * Analytics data for Org Charts & Table Charts (location reports)
804
  *
805
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
806
+ * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
807
+ * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
808
+ * @param string $filter Filter
809
+ * @param string $property_type Google analytic property
810
  *
811
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
812
  */
813
+ private function getLocations($projectId, $from, $to, $filter = '', $property_type = 'UA')
814
  {
815
+ $title = esc_html__('Countries', 'wp-meta-seo');
816
+ $serial = 'qr7_' . $this->getSerial($projectId . $from . $filter);
817
+ if ($property_type === 'UA') {
818
+ $metrics = 'ga:sessions';
819
+ $dimensions = 'ga:country';
820
+ $local_filter = '';
821
+ $options = array(
822
+ 'dimensions' => $dimensions,
823
+ 'sort' => '-ga:sessions',
824
+ 'quotaUser' => $this->managequota . 'p' . $projectId
825
+ );
826
+ if ($filter) {
827
+ $options['filters'] = 'ga:pagePath==' . $filter;
828
+ if ($local_filter) {
829
+ $options['filters'] .= ';' . $local_filter;
830
+ }
831
+ } else {
832
+ if ($local_filter) {
833
+ $options['filters'] = $local_filter;
834
+ }
835
  }
836
  } else {
837
+ $metrics = 'sessions';
838
+ $dimensions = 'country';
839
+ $options = array(
840
+ 'ga4_dimensions' => $dimensions,
841
+ 'sort' => '-ga:sessions',
842
+ 'quotaUser' => $this->managequota . 'p' . $projectId
843
+ );
844
  }
845
  $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
846
  if (is_numeric($data)) {
847
  return $data;
848
  }
849
  $wpmsga_data = array(array($title, esc_html__('Sessions', 'wp-meta-seo')));
850
+ if ($property_type === 'UA') {
851
+ foreach ($data->getRows() as $row) {
852
+ if (isset($row[2])) {
853
+ $wpmsga_data[] = array(esc_html($row[0]) . ', ' . esc_html($row[1]), (int)$row[2]);
854
+ } else {
855
+ $wpmsga_data[] = array(esc_html($row[0]), (int)$row[1]);
856
+ }
857
+ }
858
+ } else {
859
+ foreach ($data->getRows() as $row) {
860
+ $dim = $row->getDimensionValues();
861
+ $dimensionValues = $dim[0]->getValue();
862
+ $metr = $row->getMetricValues();
863
+ $metricValues = $metr[0]->getValue();
864
+ $wpmsga_data[] = array(esc_html($dimensionValues), (int)$metricValues);
865
  }
866
  }
867
  return $wpmsga_data;
870
  /**
871
  * Analytics data for Org Charts (traffic channels, device categories)
872
  *
873
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
874
+ * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
875
+ * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
876
+ * @param string $query Query
877
+ * @param string $filter Filter
878
+ * @param string $property_type Google analytic property
879
  *
880
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
881
  */
882
+ private function getOrgchartData($projectId, $from, $to, $query, $filter = '', $property_type = 'UA')
883
  {
884
+ if ($property_type === 'UA') {
885
+ $metrics = 'ga:sessions';
886
+ $dimensions = 'ga:' . $query;
887
+ $options = array(
888
+ 'dimensions' => $dimensions,
889
+ 'sort' => '-ga:sessions',
890
+ 'quotaUser' => $this->managequota . 'p' . $projectId
891
+ );
892
+ if ($filter) {
893
+ $options['filters'] = 'ga:pagePath==' . $filter;
894
+ }
895
+ } else {
896
+ if ($query === 'channelGrouping') {
897
+ $query = 'sessionDefaultChannelGrouping'; // support GA4
898
+ }
899
+
900
+ $metrics = 'sessions';
901
+ $dimensions = $query;
902
+ $options = array(
903
+ 'ga4_dimensions' => $dimensions,
904
+ 'quotaUser' => $this->managequota . 'p' . $projectId
905
+ );
906
  }
907
  $serial = 'qr8_' . $this->getSerial($projectId . $from . $query . $filter);
908
+ $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
909
  if (is_numeric($data)) {
910
  return $data;
911
  }
912
+
913
+ if ($property_type === 'UA') {
914
+ $block = ($query === 'channelGrouping') ? esc_html__('Channels', 'wp-meta-seo') : esc_html__('Devices', 'wp-meta-seo');
915
+ $wpmsga_data = array(
916
+ array(
917
+ '<div style="color:black; font-size:1.1em">' . $block . '</div>
918
+ <div style="color:darkblue; font-size:1.2em">' . (int)$data['totalsForAllResults']['ga:sessions'] . '</div>',
919
+ ''
920
+ )
 
 
 
 
 
 
921
  );
922
+ foreach ($data->getRows() as $row) {
923
+ $shrink = explode(' ', $row[0]);
924
+ $wpmsga_data[] = array(
925
+ '<div style="color:black; font-size:1.1em">' . esc_html($shrink[0]) . '</div>
926
+ <div style="color:darkblue; font-size:1.2em">' . (int)esc_html($row[1]) . '</div>',
927
+ '<div style="color:black; font-size:1.1em">' . $block . '</div>
928
+ <div style="color:darkblue; font-size:1.2em">' . (int)esc_html($data['totalsForAllResults']['ga:sessions']) . '</div>'
929
+ );
930
+ }
931
+ } else {
932
+ $block = ($query === 'sessionDefaultChannelGrouping') ? esc_html__('Channels', 'wp-meta-seo') : esc_html__('Devices', 'wp-meta-seo');
933
+ $totalsForAllResults = 0;
934
+ foreach ($data->getRows() as $row) {
935
+ $metr = $row->getMetricValues();
936
+ $totalsForAllResults += $metr[0]->getValue();
937
+ }
938
+
939
+ $wpmsga_data = array(
940
+ array(
941
+ '<div style="color:black; font-size:1.1em">' . $block . '</div>
942
+ <div style="color:darkblue; font-size:1.2em">' . (int)$totalsForAllResults . '</div>',
943
+ ''
944
+ )
945
+ );
946
+ foreach ($data->getRows() as $row) {
947
+ $dim = $row->getDimensionValues();
948
+ $dimension_value = $dim[0]->getValue();
949
+ $metr = $row->getMetricValues();
950
+ $metric_value = $metr[0]->getValue();
951
+ $shrink = explode(' ', $dimension_value);
952
+ $wpmsga_data[] = array(
953
+ '<div style="color:black; font-size:1.1em">' . esc_html($shrink[0]) . '</div>
954
+ <div style="color:darkblue; font-size:1.2em">' . (int)esc_html($metric_value) . '</div>',
955
+ '<div style="color:black; font-size:1.1em">' . $block . '</div>
956
+ <div style="color:darkblue; font-size:1.2em">' . (int)esc_html($totalsForAllResults) . '</div>'
957
+ );
958
+ }
959
  }
960
+
961
  return $wpmsga_data;
962
  }
963
 
965
  * Analytics data for Pie Charts (traffic mediums,
966
  * serach engines, social networks, browsers, screen rsolutions, etc.)
967
  *
968
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
969
+ * @param string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
970
+ * @param string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
971
+ * @param string $query Query
972
+ * @param string $filter Filter
973
+ * @param string $property_type Google analytic property
974
  *
975
  * @return array|boolean|Google_Service_Analytics_GaData|integer|mixed
976
  */
977
+ private function getPiechartData($projectId, $from, $to, $query, $filter = '', $property_type = 'UA')
978
  {
979
+ if ($property_type === 'UA') {
980
+ $metrics = 'ga:sessions';
981
+ $dimensions = 'ga:' . $query;
982
 
983
+ if ($query === 'source') {
984
+ $options = array(
985
+ 'dimensions' => $dimensions,
986
+ 'sort' => '-ga:sessions',
987
+ 'quotaUser' => $this->managequota . 'p' . $projectId
988
+ );
989
+ if ($filter) {
990
+ $options['filters'] = 'ga:medium==organic;ga:keyword!=(not set);ga:pagePath==' . $filter;
991
+ } else {
992
+ $options['filters'] = 'ga:medium==organic;ga:keyword!=(not set)';
993
+ }
994
  } else {
995
+ $options = array(
996
+ 'dimensions' => $dimensions,
997
+ 'sort' => '-ga:sessions',
998
+ 'quotaUser' => $this->managequota . 'p' . $projectId
999
+ );
1000
+ if ($filter) {
1001
+ $options['filters'] = 'ga:' . $query . '!=(not set);ga:pagePath==' . $filter;
1002
+ } else {
1003
+ $options['filters'] = 'ga:' . $query . '!=(not set)';
1004
+ }
1005
  }
1006
  } else {
1007
+ $metrics = 'sessions';
1008
+ if ($query === 'socialNetwork') {
1009
+ $dimensions = 'adSourceName';
 
 
 
 
1010
  } else {
1011
+ $dimensions = $query;
1012
  }
1013
+ $options = array(
1014
+ 'ga4_dimensions' => $dimensions,
1015
+ 'quotaUser' => $this->managequota . 'p' . $projectId
1016
+ );
1017
  }
1018
  $serial = 'qr10_' . $this->getSerial($projectId . $from . $query . $filter);
1019
+ $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
1020
  if (is_numeric($data)) {
1021
  return $data;
1022
  }
1023
  $wpmsga_data = array(array(esc_html__('Type', 'wp-meta-seo'), esc_html__('Sessions', 'wp-meta-seo')));
1024
+ $i = 0;
1025
+ $included = 0;
1026
+ $others = 0;
1027
+ if ($property_type === 'UA') {
1028
+ foreach ($data->getRows() as $row) {
1029
+ if ($i < 20) {
1030
+ $wpmsga_data[] = array(str_replace('(none)', 'direct', esc_html($row[0])), (int)$row[1]);
1031
+ $included += $row[1];
1032
+ $i++;
1033
+ } else {
1034
+ break;
1035
+ }
1036
+ }
1037
+ $totals = $data->getTotalsForAllResults();
1038
+ $others = $totals['ga:sessions'] - $included;
1039
+ } else {
1040
+ foreach ($data->getRows() as $row) {
1041
+ if ($query === 'visitorType') {
1042
+ $metr = $row->getMetricValues();
1043
+ $newUsers = (int)$metr[0]->getValue();
1044
+ if ($newUsers > 0) {
1045
+ $wpmsga_data[] = array(esc_html__('New users', 'wp-meta-seo'), $newUsers);
1046
+ }
1047
+
1048
+ $totalUsers = (int)$metr[1]->getValue();
1049
+ if ($totalUsers > $newUsers) {
1050
+ $wpmsga_data[] = array(esc_html__('Returning users', 'wp-meta-seo'), $totalUsers - $newUsers);
1051
+ }
1052
+
1053
+ break;
1054
+ }
1055
+ $dimV = $row->getDimensionValues();
1056
+ $dimension_value = $dimV[0]->getValue();
1057
+ $metrV = $row->getMetricValues();
1058
+ $metric_value = $metrV[0]->getValue();
1059
+ if ($i < 20) {
1060
+ $wpmsga_data[] = array(str_replace('(none)', 'direct', $dimension_value), (int)$metric_value);
1061
+ $included += $metric_value;
1062
+ $i++;
1063
+ } elseif ($i >= 20 && $i < 30) {
1064
+ $others += $metric_value;
1065
+ $i++;
1066
+ } else {
1067
+ break;
1068
+ }
1069
  }
1070
  }
1071
+
 
1072
  if ($others > 0) {
1073
  $wpmsga_data[] = array(esc_html__('Other', 'wp-meta-seo'), $others);
1074
  }
1087
  */
1088
  public function frontendWidgetStats($projectId, $from, $anonim)
1089
  {
1090
+ $content = '';
1091
+ $to = 'yesterday';
1092
+ $metrics = 'ga:sessions';
1093
  $dimensions = 'ga:date,ga:dayOfWeekName';
1094
+ $options = array('dimensions' => $dimensions, 'quotaUser' => $this->managequota . 'p' . $projectId);
1095
+ $serial = 'qr2_' . $this->getSerial($projectId . $from . $metrics);
1096
+ $data = $this->handleCorereports($projectId, $from, $to, $metrics, $options, $serial);
1097
  if (is_numeric($data)) {
1098
  return $data;
1099
  }
1100
  $wpmsga_data = array(array(esc_html__('Date', 'wp-meta-seo'), esc_html__('Sessions', 'wp-meta-seo')));
1101
+ $max = 1;
1102
  if ($anonim) {
1103
  $max_array = array();
1104
  foreach ($data->getRows() as $item) {
1109
  foreach ($data->getRows() as $row) {
1110
  $wpmsga_data[] = array(
1111
  date_i18n(esc_html__('l, F j, Y', 'wp-meta-seo'), strtotime($row[0])),
1112
+ ($anonim ? round($row[2] * 100 / $max, 2) : (int)$row[2])
1113
  );
1114
  }
1115
  $totals = $data->getTotalsForAllResults();
1119
  /**
1120
  * Analytics data for Realtime component (the real-time report)
1121
  *
1122
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
1123
+ * @param string $property_type Google analytic property
1124
  *
1125
  * @return array|integer|mixed
1126
  */
1127
+ private function getRealtime($projectId, $property_type)
1128
  {
1129
+ if ($property_type === 'GA4') {
1130
+ // Create the Metrics object.
1131
+ $metric_active_users = new Google_Service_AnalyticsData_Metric();
1132
+ $metric_active_users->setName('activeUsers');
1133
+
1134
+ $metric_count_page_view = new Google_Service_AnalyticsData_Metric();
1135
+ $metric_count_page_view->setName('screenPageViews');
1136
+
1137
+ // Create the Dimension object
1138
+ $dimension_all_active_users = new Google_Service_AnalyticsData_Dimension();
1139
+ $dimension_all_active_users->setName('audienceName');
1140
+
1141
+ $dimension_page_title = new Google_Service_AnalyticsData_Dimension();
1142
+ $dimension_page_title->setName('unifiedScreenName');
1143
+
1144
+ // Create the Request object
1145
+ $request_all_active_users = new Google_Service_AnalyticsData_RunRealtimeReportRequest();
1146
+ $request_all_active_users->setMetrics($metric_active_users);
1147
+ $request_all_active_users->setDimensions($dimension_all_active_users);
1148
+
1149
+ $request_all_page_title = new Google_Service_AnalyticsData_RunRealtimeReportRequest();
1150
+ $request_all_page_title->setMetrics($metric_count_page_view);
1151
+ $request_all_page_title->setDimensions($dimension_page_title);
1152
+ } else {
1153
+ $metrics = 'rt:activeUsers';
1154
+ $dimensions = 'rt:pagePath,rt:source,rt:keyword,rt:trafficType,rt:visitorType,rt:pageTitle';
1155
+ }
1156
  try {
1157
+ $serial = 'qr_realtimecache_' . $this->getSerial($projectId);
1158
  $transient = WpmsGaTools::getCache($serial);
1159
  if ($transient === false) {
1160
  if ($this->gapiErrorsHandler()) {
1161
+ return -23;
1162
+ }
1163
+ if ($property_type === 'GA4') {
1164
+ $data_1 = $this->service_ga4->properties->runRealtimeReport('properties/' . $projectId, $request_all_active_users);
1165
+ $data_2 = $this->service_ga4->properties->runRealtimeReport('properties/' . $projectId, $request_all_page_title);
1166
+ } else {
1167
+ $data = $this->service->data_realtime->get(
1168
+ 'ga:' . $projectId,
1169
+ $metrics,
1170
+ array(
1171
+ 'dimensions' => $dimensions,
1172
+ 'quotaUser' => $this->managequota . 'p' . $projectId
1173
+ )
1174
+ );
1175
  }
 
 
 
 
 
 
 
 
1176
  WpmsGaTools::setCache($serial, $data, 55);
1177
  } else {
1178
  $data = $transient;
1197
  );
1198
  return $e->getCode();
1199
  }
1200
+
1201
+ if ($property_type === 'GA4') {
1202
+ foreach ($data_1->getRows() as $row) {
1203
+ $data_active_users[] = $row;
1204
+ }
1205
+
1206
+ foreach ($data_2->getRows() as $row) {
1207
+ $data_page_title[] = $row;
1208
+ }
1209
+ $wpmsga_data = array_merge($data_active_users, $data_page_title);
1210
+ if (empty($wpmsga_data[0])) {
1211
+ return -21;
1212
+ }
1213
+ } else {
1214
+ if ($data->getRows() < 1) {
1215
+ return -21;
1216
+ }
1217
+ $i = 0;
1218
+ $wpmsga_data = $data;
1219
+ foreach ($data->getRows() as $row) {
1220
+ $wpmsga_data->rows[$i] = array_map('esc_html', $row);
1221
+ $i++;
1222
+ }
1223
  }
1224
  return array($wpmsga_data);
1225
  }
1227
  /**
1228
  * Handles ajax requests and calls the needed methods
1229
  *
1230
+ * @param string $projectId Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile)
1231
+ * @param string $query QueryID.
1232
+ * @param boolean|string $from Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date
1233
+ * @param boolean|string $to End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date
1234
+ * @param string $filter Filter
1235
+ * @param string $property_type Google analytic property
1236
  *
1237
  * @return array|boolean|Google_Service_Analytics_GaData|int|mixed
1238
  */
1239
+ public function get($projectId, $query, $from = false, $to = false, $filter = '', $property_type = 'UA')
1240
  {
1241
  if (empty($projectId) || !is_numeric($projectId)) {
1242
+ wp_die(-26);
1243
  }
1244
 
1245
  $groups = array(
1251
  'uniquePageviews'
1252
  );
1253
  if (in_array($query, $groups)) {
1254
+ return $this->getAreachartData($projectId, $from, $to, $query, $filter, $property_type);
1255
  }
1256
  if ($query === 'bottomstats') {
1257
+ return $this->getNottomstats($projectId, $from, $to, $query, $filter, $property_type);
1258
  }
1259
  if ($query === 'locations') {
1260
+ return $this->getLocations($projectId, $from, $to, $filter, $property_type);
1261
  }
1262
  if ($query === 'referrers') {
1263
+ return $this->getReferrers($projectId, $from, $to, $filter, $property_type);
1264
  }
1265
  if ($query === 'contentpages') {
1266
+ return $this->getContentPages($projectId, $from, $to, $filter, $property_type);
1267
  }
1268
  if ($query === 'searches') {
1269
+ return $this->getSearches($projectId, $from, $to, $filter, $property_type);
1270
  }
1271
  if ($query === 'realtime') {
1272
+ return $this->getRealtime($projectId, $property_type);
1273
  }
1274
  if ($query === 'channelGrouping' || $query === 'deviceCategory') {
1275
+ return $this->getOrgchartData($projectId, $from, $to, $query, $filter, $property_type);
1276
  }
1277
 
1278
  $arrs = array(
1279
  'medium',
1280
+ 'visitorType', // new uers or returning user
1281
  'socialNetwork',
1282
  'source',
1283
  'browser',
1286
  'mobileDeviceBranding'
1287
  );
1288
  if (in_array($query, $arrs)) {
1289
+ return $this->getPiechartData($projectId, $from, $to, $query, $filter, $property_type);
1290
  }
1291
+ wp_die(-27);
1292
  }
1293
  }
1294
  }
inc/install-wizard/content/viewGoogleAnalytics.php CHANGED
@@ -11,7 +11,10 @@ require_once WPMETASEO_PLUGIN_DIR . 'inc/google_analytics/wpmsgapi.php';
11
  require_once WPMETASEO_PLUGIN_DIR . 'inc/lib/google-api/vendor/autoload.php';
12
 
13
  $client = new WPMSGoogle\Client();
14
- $client->setScopes('https://www.googleapis.com/auth/analytics.readonly');
 
 
 
15
  $client->setAccessType('offline');
16
  $client->setApplicationName('WP Meta SEO');
17
  $client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
11
  require_once WPMETASEO_PLUGIN_DIR . 'inc/lib/google-api/vendor/autoload.php';
12
 
13
  $client = new WPMSGoogle\Client();
14
+ $client->setScopes(array(
15
+ 'https://www.googleapis.com/auth/tagmanager.edit.containers',
16
+ 'https://www.googleapis.com/auth/analytics.readonly'
17
+ ));
18
  $client->setAccessType('offline');
19
  $client->setApplicationName('WP Meta SEO');
20
  $client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
inc/install-wizard/handler-wizard.php CHANGED
@@ -110,7 +110,10 @@ class WpmsHandlerWizard
110
  require_once WPMETASEO_PLUGIN_DIR . 'inc/lib/google-api/vendor/autoload.php';
111
 
112
  $client = new WPMSGoogle\Client();
113
- $client->setScopes('https://www.googleapis.com/auth/analytics.readonly');
 
 
 
114
  $client->setAccessType('offline');
115
  $client->setApplicationName('WP Meta SEO');
116
  $client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
110
  require_once WPMETASEO_PLUGIN_DIR . 'inc/lib/google-api/vendor/autoload.php';
111
 
112
  $client = new WPMSGoogle\Client();
113
+ $client->setScopes(array(
114
+ 'https://www.googleapis.com/auth/tagmanager.edit.containers',
115
+ 'https://www.googleapis.com/auth/analytics.readonly'
116
+ ));
117
  $client->setAccessType('offline');
118
  $client->setApplicationName('WP Meta SEO');
119
  $client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
inc/lib/google-api/vendor/composer/ClassLoader.php CHANGED
@@ -13,7 +13,7 @@
13
  namespace Composer\Autoload;
14
 
15
  /**
16
- * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
  *
18
  * $loader = new \Composer\Autoload\ClassLoader();
19
  *
@@ -40,7 +40,7 @@ namespace Composer\Autoload;
40
  * @see https://www.php-fig.org/psr/psr-0/
41
  * @see https://www.php-fig.org/psr/psr-4/
42
  */
43
- class ClassLoader
44
  {
45
  private $vendorDir;
46
 
@@ -343,7 +343,7 @@ class ClassLoader
343
  public function loadClass($class)
344
  {
345
  if ($file = $this->findFile($class)) {
346
- includeFile($file);
347
 
348
  return true;
349
  }
@@ -468,12 +468,14 @@ class ClassLoader
468
  }
469
  }
470
 
471
- /**
472
- * Scope isolated include.
473
- *
474
- * Prevents access to $this/self from included files.
475
- */
476
- function includeFile($file)
477
- {
478
- include $file;
 
 
479
  }
13
  namespace Composer\Autoload;
14
 
15
  /**
16
+ * WpmsClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
  *
18
  * $loader = new \Composer\Autoload\ClassLoader();
19
  *
40
  * @see https://www.php-fig.org/psr/psr-0/
41
  * @see https://www.php-fig.org/psr/psr-4/
42
  */
43
+ class WpmsClassLoader
44
  {
45
  private $vendorDir;
46
 
343
  public function loadClass($class)
344
  {
345
  if ($file = $this->findFile($class)) {
346
+ wpmsIncludeFile($file);
347
 
348
  return true;
349
  }
468
  }
469
  }
470
 
471
+ if (!function_exists('wpmsIncludeFile') ) {
472
+ /**
473
+ * Scope isolated include.
474
+ *
475
+ * Prevents access to $this/self from included files.
476
+ */
477
+ function wpmsIncludeFile($file)
478
+ {
479
+ include $file;
480
+ }
481
  }
inc/lib/google-api/vendor/composer/autoload_real.php CHANGED
@@ -8,13 +8,13 @@ class ComposerAutoloaderInite32d44369114c2552a34a407755811ab
8
 
9
  public static function loadClassLoader($class)
10
  {
11
- if ('Composer\Autoload\ClassLoader' === $class) {
12
  require __DIR__ . '/ClassLoader.php';
13
  }
14
  }
15
 
16
  /**
17
- * @return \Composer\Autoload\ClassLoader
18
  */
19
  public static function getLoader()
20
  {
@@ -25,7 +25,7 @@ class ComposerAutoloaderInite32d44369114c2552a34a407755811ab
25
  require __DIR__ . '/platform_check.php';
26
 
27
  spl_autoload_register(array('ComposerAutoloaderInite32d44369114c2552a34a407755811ab', 'loadClassLoader'), true, true);
28
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
  spl_autoload_unregister(array('ComposerAutoloaderInite32d44369114c2552a34a407755811ab', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
8
 
9
  public static function loadClassLoader($class)
10
  {
11
+ if ('Composer\Autoload\WpmsClassLoader' === $class) {
12
  require __DIR__ . '/ClassLoader.php';
13
  }
14
  }
15
 
16
  /**
17
+ * @return \Composer\Autoload\WpmsClassLoader
18
  */
19
  public static function getLoader()
20
  {
25
  require __DIR__ . '/platform_check.php';
26
 
27
  spl_autoload_register(array('ComposerAutoloaderInite32d44369114c2552a34a407755811ab', 'loadClassLoader'), true, true);
28
+ self::$loader = $loader = new \Composer\Autoload\WpmsClassLoader(\dirname(\dirname(__FILE__)));
29
  spl_autoload_unregister(array('ComposerAutoloaderInite32d44369114c2552a34a407755811ab', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
inc/lib/google-api/vendor/composer/autoload_static.php CHANGED
@@ -1039,7 +1039,7 @@ class ComposerStaticInite32d44369114c2552a34a407755811ab
1039
  'Zend_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php',
1040
  );
1041
 
1042
- public static function getInitializer(ClassLoader $loader)
1043
  {
1044
  return \Closure::bind(function () use ($loader) {
1045
  $loader->prefixLengthsPsr4 = ComposerStaticInite32d44369114c2552a34a407755811ab::$prefixLengthsPsr4;
@@ -1047,6 +1047,6 @@ class ComposerStaticInite32d44369114c2552a34a407755811ab
1047
  $loader->prefixesPsr0 = ComposerStaticInite32d44369114c2552a34a407755811ab::$prefixesPsr0;
1048
  $loader->classMap = ComposerStaticInite32d44369114c2552a34a407755811ab::$classMap;
1049
 
1050
- }, null, ClassLoader::class);
1051
  }
1052
  }
1039
  'Zend_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php',
1040
  );
1041
 
1042
+ public static function getInitializer(WpmsClassLoader $loader)
1043
  {
1044
  return \Closure::bind(function () use ($loader) {
1045
  $loader->prefixLengthsPsr4 = ComposerStaticInite32d44369114c2552a34a407755811ab::$prefixLengthsPsr4;
1047
  $loader->prefixesPsr0 = ComposerStaticInite32d44369114c2552a34a407755811ab::$prefixesPsr0;
1048
  $loader->classMap = ComposerStaticInite32d44369114c2552a34a407755811ab::$classMap;
1049
 
1050
+ }, null, WpmsClassLoader::class);
1051
  }
1052
  }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager.php ADDED
@@ -0,0 +1,1190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * Service definition for TagManager (v2).
20
+ *
21
+ * <p>
22
+ * This API allows clients to access and modify container and tag configuration.</p>
23
+ *
24
+ * <p>
25
+ * For more information about this service, see the API
26
+ * <a href="https://developers.google.com/tag-manager" target="_blank">Documentation</a>
27
+ * </p>
28
+ *
29
+ * @author Google, Inc.
30
+ */
31
+ class Google_Service_TagManager extends Google_Service
32
+ {
33
+ /** Delete your Google Tag Manager containers. */
34
+ const TAGMANAGER_DELETE_CONTAINERS =
35
+ "https://www.googleapis.com/auth/tagmanager.delete.containers";
36
+ /** Manage your Google Tag Manager container and its subcomponents, excluding versioning and publishing. */
37
+ const TAGMANAGER_EDIT_CONTAINERS =
38
+ "https://www.googleapis.com/auth/tagmanager.edit.containers";
39
+ /** Manage your Google Tag Manager container versions. */
40
+ const TAGMANAGER_EDIT_CONTAINERVERSIONS =
41
+ "https://www.googleapis.com/auth/tagmanager.edit.containerversions";
42
+ /** View and manage your Google Tag Manager accounts. */
43
+ const TAGMANAGER_MANAGE_ACCOUNTS =
44
+ "https://www.googleapis.com/auth/tagmanager.manage.accounts";
45
+ /** Manage user permissions of your Google Tag Manager account and container. */
46
+ const TAGMANAGER_MANAGE_USERS =
47
+ "https://www.googleapis.com/auth/tagmanager.manage.users";
48
+ /** Publish your Google Tag Manager container versions. */
49
+ const TAGMANAGER_PUBLISH =
50
+ "https://www.googleapis.com/auth/tagmanager.publish";
51
+ /** View your Google Tag Manager container and its subcomponents. */
52
+ const TAGMANAGER_READONLY =
53
+ "https://www.googleapis.com/auth/tagmanager.readonly";
54
+
55
+ public $accounts;
56
+ public $accounts_containers;
57
+ public $accounts_containers_environments;
58
+ public $accounts_containers_version_headers;
59
+ public $accounts_containers_versions;
60
+ public $accounts_containers_workspaces;
61
+ public $accounts_containers_workspaces_built_in_variables;
62
+ public $accounts_containers_workspaces_folders;
63
+ public $accounts_containers_workspaces_tags;
64
+ public $accounts_containers_workspaces_templates;
65
+ public $accounts_containers_workspaces_triggers;
66
+ public $accounts_containers_workspaces_variables;
67
+ public $accounts_containers_workspaces_zones;
68
+ public $accounts_user_permissions;
69
+
70
+ /**
71
+ * Constructs the internal representation of the TagManager service.
72
+ *
73
+ * @param Google_Client $client The client used to deliver requests.
74
+ * @param string $rootUrl The root URL used for requests to the service.
75
+ */
76
+ public function __construct(Google_Client $client, $rootUrl = null)
77
+ {
78
+ parent::__construct($client);
79
+ $this->rootUrl = $rootUrl ?: 'https://tagmanager.googleapis.com/';
80
+ $this->servicePath = '';
81
+ $this->batchPath = 'batch';
82
+ $this->version = 'v2';
83
+ $this->serviceName = 'tagmanager';
84
+
85
+ $this->accounts = new Google_Service_TagManager_Resource_Accounts(
86
+ $this,
87
+ $this->serviceName,
88
+ 'accounts',
89
+ array(
90
+ 'methods' => array(
91
+ 'get' => array(
92
+ 'path' => 'tagmanager/v2/{+path}',
93
+ 'httpMethod' => 'GET',
94
+ 'parameters' => array(
95
+ 'path' => array(
96
+ 'location' => 'path',
97
+ 'type' => 'string',
98
+ 'required' => true,
99
+ ),
100
+ ),
101
+ ),'list' => array(
102
+ 'path' => 'tagmanager/v2/accounts',
103
+ 'httpMethod' => 'GET',
104
+ 'parameters' => array(
105
+ 'pageToken' => array(
106
+ 'location' => 'query',
107
+ 'type' => 'string',
108
+ ),
109
+ ),
110
+ ),'update' => array(
111
+ 'path' => 'tagmanager/v2/{+path}',
112
+ 'httpMethod' => 'PUT',
113
+ 'parameters' => array(
114
+ 'path' => array(
115
+ 'location' => 'path',
116
+ 'type' => 'string',
117
+ 'required' => true,
118
+ ),
119
+ 'fingerprint' => array(
120
+ 'location' => 'query',
121
+ 'type' => 'string',
122
+ ),
123
+ ),
124
+ ),
125
+ )
126
+ )
127
+ );
128
+ $this->accounts_containers = new Google_Service_TagManager_Resource_AccountsContainers(
129
+ $this,
130
+ $this->serviceName,
131
+ 'containers',
132
+ array(
133
+ 'methods' => array(
134
+ 'create' => array(
135
+ 'path' => 'tagmanager/v2/{+parent}/containers',
136
+ 'httpMethod' => 'POST',
137
+ 'parameters' => array(
138
+ 'parent' => array(
139
+ 'location' => 'path',
140
+ 'type' => 'string',
141
+ 'required' => true,
142
+ ),
143
+ ),
144
+ ),'delete' => array(
145
+ 'path' => 'tagmanager/v2/{+path}',
146
+ 'httpMethod' => 'DELETE',
147
+ 'parameters' => array(
148
+ 'path' => array(
149
+ 'location' => 'path',
150
+ 'type' => 'string',
151
+ 'required' => true,
152
+ ),
153
+ ),
154
+ ),'get' => array(
155
+ 'path' => 'tagmanager/v2/{+path}',
156
+ 'httpMethod' => 'GET',
157
+ 'parameters' => array(
158
+ 'path' => array(
159
+ 'location' => 'path',
160
+ 'type' => 'string',
161
+ 'required' => true,
162
+ ),
163
+ ),
164
+ ),'list' => array(
165
+ 'path' => 'tagmanager/v2/{+parent}/containers',
166
+ 'httpMethod' => 'GET',
167
+ 'parameters' => array(
168
+ 'parent' => array(
169
+ 'location' => 'path',
170
+ 'type' => 'string',
171
+ 'required' => true,
172
+ ),
173
+ 'pageToken' => array(
174
+ 'location' => 'query',
175
+ 'type' => 'string',
176
+ ),
177
+ ),
178
+ ),'update' => array(
179
+ 'path' => 'tagmanager/v2/{+path}',
180
+ 'httpMethod' => 'PUT',
181
+ 'parameters' => array(
182
+ 'path' => array(
183
+ 'location' => 'path',
184
+ 'type' => 'string',
185
+ 'required' => true,
186
+ ),
187
+ 'fingerprint' => array(
188
+ 'location' => 'query',
189
+ 'type' => 'string',
190
+ ),
191
+ ),
192
+ ),
193
+ )
194
+ )
195
+ );
196
+ $this->accounts_containers_environments = new Google_Service_TagManager_Resource_AccountsContainersEnvironments(
197
+ $this,
198
+ $this->serviceName,
199
+ 'environments',
200
+ array(
201
+ 'methods' => array(
202
+ 'create' => array(
203
+ 'path' => 'tagmanager/v2/{+parent}/environments',
204
+ 'httpMethod' => 'POST',
205
+ 'parameters' => array(
206
+ 'parent' => array(
207
+ 'location' => 'path',
208
+ 'type' => 'string',
209
+ 'required' => true,
210
+ ),
211
+ ),
212
+ ),'delete' => array(
213
+ 'path' => 'tagmanager/v2/{+path}',
214
+ 'httpMethod' => 'DELETE',
215
+ 'parameters' => array(
216
+ 'path' => array(
217
+ 'location' => 'path',
218
+ 'type' => 'string',
219
+ 'required' => true,
220
+ ),
221
+ ),
222
+ ),'get' => array(
223
+ 'path' => 'tagmanager/v2/{+path}',
224
+ 'httpMethod' => 'GET',
225
+ 'parameters' => array(
226
+ 'path' => array(
227
+ 'location' => 'path',
228
+ 'type' => 'string',
229
+ 'required' => true,
230
+ ),
231
+ ),
232
+ ),'list' => array(
233
+ 'path' => 'tagmanager/v2/{+parent}/environments',
234
+ 'httpMethod' => 'GET',
235
+ 'parameters' => array(
236
+ 'parent' => array(
237
+ 'location' => 'path',
238
+ 'type' => 'string',
239
+ 'required' => true,
240
+ ),
241
+ 'pageToken' => array(
242
+ 'location' => 'query',
243
+ 'type' => 'string',
244
+ ),
245
+ ),
246
+ ),'reauthorize' => array(
247
+ 'path' => 'tagmanager/v2/{+path}:reauthorize',
248
+ 'httpMethod' => 'POST',
249
+ 'parameters' => array(
250
+ 'path' => array(
251
+ 'location' => 'path',
252
+ 'type' => 'string',
253
+ 'required' => true,
254
+ ),
255
+ ),
256
+ ),'update' => array(
257
+ 'path' => 'tagmanager/v2/{+path}',
258
+ 'httpMethod' => 'PUT',
259
+ 'parameters' => array(
260
+ 'path' => array(
261
+ 'location' => 'path',
262
+ 'type' => 'string',
263
+ 'required' => true,
264
+ ),
265
+ 'fingerprint' => array(
266
+ 'location' => 'query',
267
+ 'type' => 'string',
268
+ ),
269
+ ),
270
+ ),
271
+ )
272
+ )
273
+ );
274
+ $this->accounts_containers_version_headers = new Google_Service_TagManager_Resource_AccountsContainersVersionHeaders(
275
+ $this,
276
+ $this->serviceName,
277
+ 'version_headers',
278
+ array(
279
+ 'methods' => array(
280
+ 'latest' => array(
281
+ 'path' => 'tagmanager/v2/{+parent}/version_headers:latest',
282
+ 'httpMethod' => 'GET',
283
+ 'parameters' => array(
284
+ 'parent' => array(
285
+ 'location' => 'path',
286
+ 'type' => 'string',
287
+ 'required' => true,
288
+ ),
289
+ ),
290
+ ),'list' => array(
291
+ 'path' => 'tagmanager/v2/{+parent}/version_headers',
292
+ 'httpMethod' => 'GET',
293
+ 'parameters' => array(
294
+ 'parent' => array(
295
+ 'location' => 'path',
296
+ 'type' => 'string',
297
+ 'required' => true,
298
+ ),
299
+ 'includeDeleted' => array(
300
+ 'location' => 'query',
301
+ 'type' => 'boolean',
302
+ ),
303
+ 'pageToken' => array(
304
+ 'location' => 'query',
305
+ 'type' => 'string',
306
+ ),
307
+ ),
308
+ ),
309
+ )
310
+ )
311
+ );
312
+ $this->accounts_containers_versions = new Google_Service_TagManager_Resource_AccountsContainersVersions(
313
+ $this,
314
+ $this->serviceName,
315
+ 'versions',
316
+ array(
317
+ 'methods' => array(
318
+ 'delete' => array(
319
+ 'path' => 'tagmanager/v2/{+path}',
320
+ 'httpMethod' => 'DELETE',
321
+ 'parameters' => array(
322
+ 'path' => array(
323
+ 'location' => 'path',
324
+ 'type' => 'string',
325
+ 'required' => true,
326
+ ),
327
+ ),
328
+ ),'get' => array(
329
+ 'path' => 'tagmanager/v2/{+path}',
330
+ 'httpMethod' => 'GET',
331
+ 'parameters' => array(
332
+ 'path' => array(
333
+ 'location' => 'path',
334
+ 'type' => 'string',
335
+ 'required' => true,
336
+ ),
337
+ 'containerVersionId' => array(
338
+ 'location' => 'query',
339
+ 'type' => 'string',
340
+ ),
341
+ ),
342
+ ),'live' => array(
343
+ 'path' => 'tagmanager/v2/{+parent}/versions:live',
344
+ 'httpMethod' => 'GET',
345
+ 'parameters' => array(
346
+ 'parent' => array(
347
+ 'location' => 'path',
348
+ 'type' => 'string',
349
+ 'required' => true,
350
+ ),
351
+ ),
352
+ ),'publish' => array(
353
+ 'path' => 'tagmanager/v2/{+path}:publish',
354
+ 'httpMethod' => 'POST',
355
+ 'parameters' => array(
356
+ 'path' => array(
357
+ 'location' => 'path',
358
+ 'type' => 'string',
359
+ 'required' => true,
360
+ ),
361
+ 'fingerprint' => array(
362
+ 'location' => 'query',
363
+ 'type' => 'string',
364
+ ),
365
+ ),
366
+ ),'set_latest' => array(
367
+ 'path' => 'tagmanager/v2/{+path}:set_latest',
368
+ 'httpMethod' => 'POST',
369
+ 'parameters' => array(
370
+ 'path' => array(
371
+ 'location' => 'path',
372
+ 'type' => 'string',
373
+ 'required' => true,
374
+ ),
375
+ ),
376
+ ),'undelete' => array(
377
+ 'path' => 'tagmanager/v2/{+path}:undelete',
378
+ 'httpMethod' => 'POST',
379
+ 'parameters' => array(
380
+ 'path' => array(
381
+ 'location' => 'path',
382
+ 'type' => 'string',
383
+ 'required' => true,
384
+ ),
385
+ ),
386
+ ),'update' => array(
387
+ 'path' => 'tagmanager/v2/{+path}',
388
+ 'httpMethod' => 'PUT',
389
+ 'parameters' => array(
390
+ 'path' => array(
391
+ 'location' => 'path',
392
+ 'type' => 'string',
393
+ 'required' => true,
394
+ ),
395
+ 'fingerprint' => array(
396
+ 'location' => 'query',
397
+ 'type' => 'string',
398
+ ),
399
+ ),
400
+ ),
401
+ )
402
+ )
403
+ );
404
+ $this->accounts_containers_workspaces = new Google_Service_TagManager_Resource_AccountsContainersWorkspaces(
405
+ $this,
406
+ $this->serviceName,
407
+ 'workspaces',
408
+ array(
409
+ 'methods' => array(
410
+ 'create' => array(
411
+ 'path' => 'tagmanager/v2/{+parent}/workspaces',
412
+ 'httpMethod' => 'POST',
413
+ 'parameters' => array(
414
+ 'parent' => array(
415
+ 'location' => 'path',
416
+ 'type' => 'string',
417
+ 'required' => true,
418
+ ),
419
+ ),
420
+ ),'create_version' => array(
421
+ 'path' => 'tagmanager/v2/{+path}:create_version',
422
+ 'httpMethod' => 'POST',
423
+ 'parameters' => array(
424
+ 'path' => array(
425
+ 'location' => 'path',
426
+ 'type' => 'string',
427
+ 'required' => true,
428
+ ),
429
+ ),
430
+ ),'delete' => array(
431
+ 'path' => 'tagmanager/v2/{+path}',
432
+ 'httpMethod' => 'DELETE',
433
+ 'parameters' => array(
434
+ 'path' => array(
435
+ 'location' => 'path',
436
+ 'type' => 'string',
437
+ 'required' => true,
438
+ ),
439
+ ),
440
+ ),'get' => array(
441
+ 'path' => 'tagmanager/v2/{+path}',
442
+ 'httpMethod' => 'GET',
443
+ 'parameters' => array(
444
+ 'path' => array(
445
+ 'location' => 'path',
446
+ 'type' => 'string',
447
+ 'required' => true,
448
+ ),
449
+ ),
450
+ ),'getStatus' => array(
451
+ 'path' => 'tagmanager/v2/{+path}/status',
452
+ 'httpMethod' => 'GET',
453
+ 'parameters' => array(
454
+ 'path' => array(
455
+ 'location' => 'path',
456
+ 'type' => 'string',
457
+ 'required' => true,
458
+ ),
459
+ ),
460
+ ),'list' => array(
461
+ 'path' => 'tagmanager/v2/{+parent}/workspaces',
462
+ 'httpMethod' => 'GET',
463
+ 'parameters' => array(
464
+ 'parent' => array(
465
+ 'location' => 'path',
466
+ 'type' => 'string',
467
+ 'required' => true,
468
+ ),
469
+ 'pageToken' => array(
470
+ 'location' => 'query',
471
+ 'type' => 'string',
472
+ ),
473
+ ),
474
+ ),'quick_preview' => array(
475
+ 'path' => 'tagmanager/v2/{+path}:quick_preview',
476
+ 'httpMethod' => 'POST',
477
+ 'parameters' => array(
478
+ 'path' => array(
479
+ 'location' => 'path',
480
+ 'type' => 'string',
481
+ 'required' => true,
482
+ ),
483
+ ),
484
+ ),'resolve_conflict' => array(
485
+ 'path' => 'tagmanager/v2/{+path}:resolve_conflict',
486
+ 'httpMethod' => 'POST',
487
+ 'parameters' => array(
488
+ 'path' => array(
489
+ 'location' => 'path',
490
+ 'type' => 'string',
491
+ 'required' => true,
492
+ ),
493
+ 'fingerprint' => array(
494
+ 'location' => 'query',
495
+ 'type' => 'string',
496
+ ),
497
+ ),
498
+ ),'sync' => array(
499
+ 'path' => 'tagmanager/v2/{+path}:sync',
500
+ 'httpMethod' => 'POST',
501
+ 'parameters' => array(
502
+ 'path' => array(
503
+ 'location' => 'path',
504
+ 'type' => 'string',
505
+ 'required' => true,
506
+ ),
507
+ ),
508
+ ),'update' => array(
509
+ 'path' => 'tagmanager/v2/{+path}',
510
+ 'httpMethod' => 'PUT',
511
+ 'parameters' => array(
512
+ 'path' => array(
513
+ 'location' => 'path',
514
+ 'type' => 'string',
515
+ 'required' => true,
516
+ ),
517
+ 'fingerprint' => array(
518
+ 'location' => 'query',
519
+ 'type' => 'string',
520
+ ),
521
+ ),
522
+ ),
523
+ )
524
+ )
525
+ );
526
+ $this->accounts_containers_workspaces_built_in_variables = new Google_Service_TagManager_Resource_AccountsContainersWorkspacesBuiltInVariables(
527
+ $this,
528
+ $this->serviceName,
529
+ 'built_in_variables',
530
+ array(
531
+ 'methods' => array(
532
+ 'create' => array(
533
+ 'path' => 'tagmanager/v2/{+parent}/built_in_variables',
534
+ 'httpMethod' => 'POST',
535
+ 'parameters' => array(
536
+ 'parent' => array(
537
+ 'location' => 'path',
538
+ 'type' => 'string',
539
+ 'required' => true,
540
+ ),
541
+ 'type' => array(
542
+ 'location' => 'query',
543
+ 'type' => 'string',
544
+ 'repeated' => true,
545
+ ),
546
+ ),
547
+ ),'delete' => array(
548
+ 'path' => 'tagmanager/v2/{+path}',
549
+ 'httpMethod' => 'DELETE',
550
+ 'parameters' => array(
551
+ 'path' => array(
552
+ 'location' => 'path',
553
+ 'type' => 'string',
554
+ 'required' => true,
555
+ ),
556
+ 'type' => array(
557
+ 'location' => 'query',
558
+ 'type' => 'string',
559
+ 'repeated' => true,
560
+ ),
561
+ ),
562
+ ),'list' => array(
563
+ 'path' => 'tagmanager/v2/{+parent}/built_in_variables',
564
+ 'httpMethod' => 'GET',
565
+ 'parameters' => array(
566
+ 'parent' => array(
567
+ 'location' => 'path',
568
+ 'type' => 'string',
569
+ 'required' => true,
570
+ ),
571
+ 'pageToken' => array(
572
+ 'location' => 'query',
573
+ 'type' => 'string',
574
+ ),
575
+ ),
576
+ ),'revert' => array(
577
+ 'path' => 'tagmanager/v2/{+path}/built_in_variables:revert',
578
+ 'httpMethod' => 'POST',
579
+ 'parameters' => array(
580
+ 'path' => array(
581
+ 'location' => 'path',
582
+ 'type' => 'string',
583
+ 'required' => true,
584
+ ),
585
+ 'type' => array(
586
+ 'location' => 'query',
587
+ 'type' => 'string',
588
+ ),
589
+ ),
590
+ ),
591
+ )
592
+ )
593
+ );
594
+ $this->accounts_containers_workspaces_folders = new Google_Service_TagManager_Resource_AccountsContainersWorkspacesFolders(
595
+ $this,
596
+ $this->serviceName,
597
+ 'folders',
598
+ array(
599
+ 'methods' => array(
600
+ 'create' => array(
601
+ 'path' => 'tagmanager/v2/{+parent}/folders',
602
+ 'httpMethod' => 'POST',
603
+ 'parameters' => array(
604
+ 'parent' => array(
605
+ 'location' => 'path',
606
+ 'type' => 'string',
607
+ 'required' => true,
608
+ ),
609
+ ),
610
+ ),'delete' => array(
611
+ 'path' => 'tagmanager/v2/{+path}',
612
+ 'httpMethod' => 'DELETE',
613
+ 'parameters' => array(
614
+ 'path' => array(
615
+ 'location' => 'path',
616
+ 'type' => 'string',
617
+ 'required' => true,
618
+ ),
619
+ ),
620
+ ),'entities' => array(
621
+ 'path' => 'tagmanager/v2/{+path}:entities',
622
+ 'httpMethod' => 'POST',
623
+ 'parameters' => array(
624
+ 'path' => array(
625
+ 'location' => 'path',
626
+ 'type' => 'string',
627
+ 'required' => true,
628
+ ),
629
+ 'pageToken' => array(
630
+ 'location' => 'query',
631
+ 'type' => 'string',
632
+ ),
633
+ ),
634
+ ),'get' => array(
635
+ 'path' => 'tagmanager/v2/{+path}',
636
+ 'httpMethod' => 'GET',
637
+ 'parameters' => array(
638
+ 'path' => array(
639
+ 'location' => 'path',
640
+ 'type' => 'string',
641
+ 'required' => true,
642
+ ),
643
+ ),
644
+ ),'list' => array(
645
+ 'path' => 'tagmanager/v2/{+parent}/folders',
646
+ 'httpMethod' => 'GET',
647
+ 'parameters' => array(
648
+ 'parent' => array(
649
+ 'location' => 'path',
650
+ 'type' => 'string',
651
+ 'required' => true,
652
+ ),
653
+ 'pageToken' => array(
654
+ 'location' => 'query',
655
+ 'type' => 'string',
656
+ ),
657
+ ),
658
+ ),'move_entities_to_folder' => array(
659
+ 'path' => 'tagmanager/v2/{+path}:move_entities_to_folder',
660
+ 'httpMethod' => 'POST',
661
+ 'parameters' => array(
662
+ 'path' => array(
663
+ 'location' => 'path',
664
+ 'type' => 'string',
665
+ 'required' => true,
666
+ ),
667
+ 'tagId' => array(
668
+ 'location' => 'query',
669
+ 'type' => 'string',
670
+ 'repeated' => true,
671
+ ),
672
+ 'triggerId' => array(
673
+ 'location' => 'query',
674
+ 'type' => 'string',
675
+ 'repeated' => true,
676
+ ),
677
+ 'variableId' => array(
678
+ 'location' => 'query',
679
+ 'type' => 'string',
680
+ 'repeated' => true,
681
+ ),
682
+ ),
683
+ ),'revert' => array(
684
+ 'path' => 'tagmanager/v2/{+path}:revert',
685
+ 'httpMethod' => 'POST',
686
+ 'parameters' => array(
687
+ 'path' => array(
688
+ 'location' => 'path',
689
+ 'type' => 'string',
690
+ 'required' => true,
691
+ ),
692
+ 'fingerprint' => array(
693
+ 'location' => 'query',
694
+ 'type' => 'string',
695
+ ),
696
+ ),
697
+ ),'update' => array(
698
+ 'path' => 'tagmanager/v2/{+path}',
699
+ 'httpMethod' => 'PUT',
700
+ 'parameters' => array(
701
+ 'path' => array(
702
+ 'location' => 'path',
703
+ 'type' => 'string',
704
+ 'required' => true,
705
+ ),
706
+ 'fingerprint' => array(
707
+ 'location' => 'query',
708
+ 'type' => 'string',
709
+ ),
710
+ ),
711
+ ),
712
+ )
713
+ )
714
+ );
715
+ $this->accounts_containers_workspaces_tags = new Google_Service_TagManager_Resource_AccountsContainersWorkspacesTags(
716
+ $this,
717
+ $this->serviceName,
718
+ 'tags',
719
+ array(
720
+ 'methods' => array(
721
+ 'create' => array(
722
+ 'path' => 'tagmanager/v2/{+parent}/tags',
723
+ 'httpMethod' => 'POST',
724
+ 'parameters' => array(
725
+ 'parent' => array(
726
+ 'location' => 'path',
727
+ 'type' => 'string',
728
+ 'required' => true,
729
+ ),
730
+ ),
731
+ ),'delete' => array(
732
+ 'path' => 'tagmanager/v2/{+path}',
733
+ 'httpMethod' => 'DELETE',
734
+ 'parameters' => array(
735
+ 'path' => array(
736
+ 'location' => 'path',
737
+ 'type' => 'string',
738
+ 'required' => true,
739
+ ),
740
+ ),
741
+ ),'get' => array(
742
+ 'path' => 'tagmanager/v2/{+path}',
743
+ 'httpMethod' => 'GET',
744
+ 'parameters' => array(
745
+ 'path' => array(
746
+ 'location' => 'path',
747
+ 'type' => 'string',
748
+ 'required' => true,
749
+ ),
750
+ ),
751
+ ),'list' => array(
752
+ 'path' => 'tagmanager/v2/{+parent}/tags',
753
+ 'httpMethod' => 'GET',
754
+ 'parameters' => array(
755
+ 'parent' => array(
756
+ 'location' => 'path',
757
+ 'type' => 'string',
758
+ 'required' => true,
759
+ ),
760
+ 'pageToken' => array(
761
+ 'location' => 'query',
762
+ 'type' => 'string',
763
+ ),
764
+ ),
765
+ ),'revert' => array(
766
+ 'path' => 'tagmanager/v2/{+path}:revert',
767
+ 'httpMethod' => 'POST',
768
+ 'parameters' => array(
769
+ 'path' => array(
770
+ 'location' => 'path',
771
+ 'type' => 'string',
772
+ 'required' => true,
773
+ ),
774
+ 'fingerprint' => array(
775
+ 'location' => 'query',
776
+ 'type' => 'string',
777
+ ),
778
+ ),
779
+ ),'update' => array(
780
+ 'path' => 'tagmanager/v2/{+path}',
781
+ 'httpMethod' => 'PUT',
782
+ 'parameters' => array(
783
+ 'path' => array(
784
+ 'location' => 'path',
785
+ 'type' => 'string',
786
+ 'required' => true,
787
+ ),
788
+ 'fingerprint' => array(
789
+ 'location' => 'query',
790
+ 'type' => 'string',
791
+ ),
792
+ ),
793
+ ),
794
+ )
795
+ )
796
+ );
797
+ $this->accounts_containers_workspaces_templates = new Google_Service_TagManager_Resource_AccountsContainersWorkspacesTemplates(
798
+ $this,
799
+ $this->serviceName,
800
+ 'templates',
801
+ array(
802
+ 'methods' => array(
803
+ 'create' => array(
804
+ 'path' => 'tagmanager/v2/{+parent}/templates',
805
+ 'httpMethod' => 'POST',
806
+ 'parameters' => array(
807
+ 'parent' => array(
808
+ 'location' => 'path',
809
+ 'type' => 'string',
810
+ 'required' => true,
811
+ ),
812
+ ),
813
+ ),'delete' => array(
814
+ 'path' => 'tagmanager/v2/{+path}',
815
+ 'httpMethod' => 'DELETE',
816
+ 'parameters' => array(
817
+ 'path' => array(
818
+ 'location' => 'path',
819
+ 'type' => 'string',
820
+ 'required' => true,
821
+ ),
822
+ ),
823
+ ),'get' => array(
824
+ 'path' => 'tagmanager/v2/{+path}',
825
+ 'httpMethod' => 'GET',
826
+ 'parameters' => array(
827
+ 'path' => array(
828
+ 'location' => 'path',
829
+ 'type' => 'string',
830
+ 'required' => true,
831
+ ),
832
+ ),
833
+ ),'list' => array(
834
+ 'path' => 'tagmanager/v2/{+parent}/templates',
835
+ 'httpMethod' => 'GET',
836
+ 'parameters' => array(
837
+ 'parent' => array(
838
+ 'location' => 'path',
839
+ 'type' => 'string',
840
+ 'required' => true,
841
+ ),
842
+ 'pageToken' => array(
843
+ 'location' => 'query',
844
+ 'type' => 'string',
845
+ ),
846
+ ),
847
+ ),'revert' => array(
848
+ 'path' => 'tagmanager/v2/{+path}:revert',
849
+ 'httpMethod' => 'POST',
850
+ 'parameters' => array(
851
+ 'path' => array(
852
+ 'location' => 'path',
853
+ 'type' => 'string',
854
+ 'required' => true,
855
+ ),
856
+ 'fingerprint' => array(
857
+ 'location' => 'query',
858
+ 'type' => 'string',
859
+ ),
860
+ ),
861
+ ),'update' => array(
862
+ 'path' => 'tagmanager/v2/{+path}',
863
+ 'httpMethod' => 'PUT',
864
+ 'parameters' => array(
865
+ 'path' => array(
866
+ 'location' => 'path',
867
+ 'type' => 'string',
868
+ 'required' => true,
869
+ ),
870
+ 'fingerprint' => array(
871
+ 'location' => 'query',
872
+ 'type' => 'string',
873
+ ),
874
+ ),
875
+ ),
876
+ )
877
+ )
878
+ );
879
+ $this->accounts_containers_workspaces_triggers = new Google_Service_TagManager_Resource_AccountsContainersWorkspacesTriggers(
880
+ $this,
881
+ $this->serviceName,
882
+ 'triggers',
883
+ array(
884
+ 'methods' => array(
885
+ 'create' => array(
886
+ 'path' => 'tagmanager/v2/{+parent}/triggers',
887
+ 'httpMethod' => 'POST',
888
+ 'parameters' => array(
889
+ 'parent' => array(
890
+ 'location' => 'path',
891
+ 'type' => 'string',
892
+ 'required' => true,
893
+ ),
894
+ ),
895
+ ),'delete' => array(
896
+ 'path' => 'tagmanager/v2/{+path}',
897
+ 'httpMethod' => 'DELETE',
898
+ 'parameters' => array(
899
+ 'path' => array(
900
+ 'location' => 'path',
901
+ 'type' => 'string',
902
+ 'required' => true,
903
+ ),
904
+ ),
905
+ ),'get' => array(
906
+ 'path' => 'tagmanager/v2/{+path}',
907
+ 'httpMethod' => 'GET',
908
+ 'parameters' => array(
909
+ 'path' => array(
910
+ 'location' => 'path',
911
+ 'type' => 'string',
912
+ 'required' => true,
913
+ ),
914
+ ),
915
+ ),'list' => array(
916
+ 'path' => 'tagmanager/v2/{+parent}/triggers',
917
+ 'httpMethod' => 'GET',
918
+ 'parameters' => array(
919
+ 'parent' => array(
920
+ 'location' => 'path',
921
+ 'type' => 'string',
922
+ 'required' => true,
923
+ ),
924
+ 'pageToken' => array(
925
+ 'location' => 'query',
926
+ 'type' => 'string',
927
+ ),
928
+ ),
929
+ ),'revert' => array(
930
+ 'path' => 'tagmanager/v2/{+path}:revert',
931
+ 'httpMethod' => 'POST',
932
+ 'parameters' => array(
933
+ 'path' => array(
934
+ 'location' => 'path',
935
+ 'type' => 'string',
936
+ 'required' => true,
937
+ ),
938
+ 'fingerprint' => array(
939
+ 'location' => 'query',
940
+ 'type' => 'string',
941
+ ),
942
+ ),
943
+ ),'update' => array(
944
+ 'path' => 'tagmanager/v2/{+path}',
945
+ 'httpMethod' => 'PUT',
946
+ 'parameters' => array(
947
+ 'path' => array(
948
+ 'location' => 'path',
949
+ 'type' => 'string',
950
+ 'required' => true,
951
+ ),
952
+ 'fingerprint' => array(
953
+ 'location' => 'query',
954
+ 'type' => 'string',
955
+ ),
956
+ ),
957
+ ),
958
+ )
959
+ )
960
+ );
961
+ $this->accounts_containers_workspaces_variables = new Google_Service_TagManager_Resource_AccountsContainersWorkspacesVariables(
962
+ $this,
963
+ $this->serviceName,
964
+ 'variables',
965
+ array(
966
+ 'methods' => array(
967
+ 'create' => array(
968
+ 'path' => 'tagmanager/v2/{+parent}/variables',
969
+ 'httpMethod' => 'POST',
970
+ 'parameters' => array(
971
+ 'parent' => array(
972
+ 'location' => 'path',
973
+ 'type' => 'string',
974
+ 'required' => true,
975
+ ),
976
+ ),
977
+ ),'delete' => array(
978
+ 'path' => 'tagmanager/v2/{+path}',
979
+ 'httpMethod' => 'DELETE',
980
+ 'parameters' => array(
981
+ 'path' => array(
982
+ 'location' => 'path',
983
+ 'type' => 'string',
984
+ 'required' => true,
985
+ ),
986
+ ),
987
+ ),'get' => array(
988
+ 'path' => 'tagmanager/v2/{+path}',
989
+ 'httpMethod' => 'GET',
990
+ 'parameters' => array(
991
+ 'path' => array(
992
+ 'location' => 'path',
993
+ 'type' => 'string',
994
+ 'required' => true,
995
+ ),
996
+ ),
997
+ ),'list' => array(
998
+ 'path' => 'tagmanager/v2/{+parent}/variables',
999
+ 'httpMethod' => 'GET',
1000
+ 'parameters' => array(
1001
+ 'parent' => array(
1002
+ 'location' => 'path',
1003
+ 'type' => 'string',
1004
+ 'required' => true,
1005
+ ),
1006
+ 'pageToken' => array(
1007
+ 'location' => 'query',
1008
+ 'type' => 'string',
1009
+ ),
1010
+ ),
1011
+ ),'revert' => array(
1012
+ 'path' => 'tagmanager/v2/{+path}:revert',
1013
+ 'httpMethod' => 'POST',
1014
+ 'parameters' => array(
1015
+ 'path' => array(
1016
+ 'location' => 'path',
1017
+ 'type' => 'string',
1018
+ 'required' => true,
1019
+ ),
1020
+ 'fingerprint' => array(
1021
+ 'location' => 'query',
1022
+ 'type' => 'string',
1023
+ ),
1024
+ ),
1025
+ ),'update' => array(
1026
+ 'path' => 'tagmanager/v2/{+path}',
1027
+ 'httpMethod' => 'PUT',
1028
+ 'parameters' => array(
1029
+ 'path' => array(
1030
+ 'location' => 'path',
1031
+ 'type' => 'string',
1032
+ 'required' => true,
1033
+ ),
1034
+ 'fingerprint' => array(
1035
+ 'location' => 'query',
1036
+ 'type' => 'string',
1037
+ ),
1038
+ ),
1039
+ ),
1040
+ )
1041
+ )
1042
+ );
1043
+ $this->accounts_containers_workspaces_zones = new Google_Service_TagManager_Resource_AccountsContainersWorkspacesZones(
1044
+ $this,
1045
+ $this->serviceName,
1046
+ 'zones',
1047
+ array(
1048
+ 'methods' => array(
1049
+ 'create' => array(
1050
+ 'path' => 'tagmanager/v2/{+parent}/zones',
1051
+ 'httpMethod' => 'POST',
1052
+ 'parameters' => array(
1053
+ 'parent' => array(
1054
+ 'location' => 'path',
1055
+ 'type' => 'string',
1056
+ 'required' => true,
1057
+ ),
1058
+ ),
1059
+ ),'delete' => array(
1060
+ 'path' => 'tagmanager/v2/{+path}',
1061
+ 'httpMethod' => 'DELETE',
1062
+ 'parameters' => array(
1063
+ 'path' => array(
1064
+ 'location' => 'path',
1065
+ 'type' => 'string',
1066
+ 'required' => true,
1067
+ ),
1068
+ ),
1069
+ ),'get' => array(
1070
+ 'path' => 'tagmanager/v2/{+path}',
1071
+ 'httpMethod' => 'GET',
1072
+ 'parameters' => array(
1073
+ 'path' => array(
1074
+ 'location' => 'path',
1075
+ 'type' => 'string',
1076
+ 'required' => true,
1077
+ ),
1078
+ ),
1079
+ ),'list' => array(
1080
+ 'path' => 'tagmanager/v2/{+parent}/zones',
1081
+ 'httpMethod' => 'GET',
1082
+ 'parameters' => array(
1083
+ 'parent' => array(
1084
+ 'location' => 'path',
1085
+ 'type' => 'string',
1086
+ 'required' => true,
1087
+ ),
1088
+ 'pageToken' => array(
1089
+ 'location' => 'query',
1090
+ 'type' => 'string',
1091
+ ),
1092
+ ),
1093
+ ),'revert' => array(
1094
+ 'path' => 'tagmanager/v2/{+path}:revert',
1095
+ 'httpMethod' => 'POST',
1096
+ 'parameters' => array(
1097
+ 'path' => array(
1098
+ 'location' => 'path',
1099
+ 'type' => 'string',
1100
+ 'required' => true,
1101
+ ),
1102
+ 'fingerprint' => array(
1103
+ 'location' => 'query',
1104
+ 'type' => 'string',
1105
+ ),
1106
+ ),
1107
+ ),'update' => array(
1108
+ 'path' => 'tagmanager/v2/{+path}',
1109
+ 'httpMethod' => 'PUT',
1110
+ 'parameters' => array(
1111
+ 'path' => array(
1112
+ 'location' => 'path',
1113
+ 'type' => 'string',
1114
+ 'required' => true,
1115
+ ),
1116
+ 'fingerprint' => array(
1117
+ 'location' => 'query',
1118
+ 'type' => 'string',
1119
+ ),
1120
+ ),
1121
+ ),
1122
+ )
1123
+ )
1124
+ );
1125
+ $this->accounts_user_permissions = new Google_Service_TagManager_Resource_AccountsUserPermissions(
1126
+ $this,
1127
+ $this->serviceName,
1128
+ 'user_permissions',
1129
+ array(
1130
+ 'methods' => array(
1131
+ 'create' => array(
1132
+ 'path' => 'tagmanager/v2/{+parent}/user_permissions',
1133
+ 'httpMethod' => 'POST',
1134
+ 'parameters' => array(
1135
+ 'parent' => array(
1136
+ 'location' => 'path',
1137
+ 'type' => 'string',
1138
+ 'required' => true,
1139
+ ),
1140
+ ),
1141
+ ),'delete' => array(
1142
+ 'path' => 'tagmanager/v2/{+path}',
1143
+ 'httpMethod' => 'DELETE',
1144
+ 'parameters' => array(
1145
+ 'path' => array(
1146
+ 'location' => 'path',
1147
+ 'type' => 'string',
1148
+ 'required' => true,
1149
+ ),
1150
+ ),
1151
+ ),'get' => array(
1152
+ 'path' => 'tagmanager/v2/{+path}',
1153
+ 'httpMethod' => 'GET',
1154
+ 'parameters' => array(
1155
+ 'path' => array(
1156
+ 'location' => 'path',
1157
+ 'type' => 'string',
1158
+ 'required' => true,
1159
+ ),
1160
+ ),
1161
+ ),'list' => array(
1162
+ 'path' => 'tagmanager/v2/{+parent}/user_permissions',
1163
+ 'httpMethod' => 'GET',
1164
+ 'parameters' => array(
1165
+ 'parent' => array(
1166
+ 'location' => 'path',
1167
+ 'type' => 'string',
1168
+ 'required' => true,
1169
+ ),
1170
+ 'pageToken' => array(
1171
+ 'location' => 'query',
1172
+ 'type' => 'string',
1173
+ ),
1174
+ ),
1175
+ ),'update' => array(
1176
+ 'path' => 'tagmanager/v2/{+path}',
1177
+ 'httpMethod' => 'PUT',
1178
+ 'parameters' => array(
1179
+ 'path' => array(
1180
+ 'location' => 'path',
1181
+ 'type' => 'string',
1182
+ 'required' => true,
1183
+ ),
1184
+ ),
1185
+ ),
1186
+ )
1187
+ )
1188
+ );
1189
+ }
1190
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Account.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Account extends Google_Model
19
+ {
20
+ public $accountId;
21
+ public $fingerprint;
22
+ public $name;
23
+ public $path;
24
+ public $shareData;
25
+ public $tagManagerUrl;
26
+
27
+ public function setAccountId($accountId)
28
+ {
29
+ $this->accountId = $accountId;
30
+ }
31
+ public function getAccountId()
32
+ {
33
+ return $this->accountId;
34
+ }
35
+ public function setFingerprint($fingerprint)
36
+ {
37
+ $this->fingerprint = $fingerprint;
38
+ }
39
+ public function getFingerprint()
40
+ {
41
+ return $this->fingerprint;
42
+ }
43
+ public function setName($name)
44
+ {
45
+ $this->name = $name;
46
+ }
47
+ public function getName()
48
+ {
49
+ return $this->name;
50
+ }
51
+ public function setPath($path)
52
+ {
53
+ $this->path = $path;
54
+ }
55
+ public function getPath()
56
+ {
57
+ return $this->path;
58
+ }
59
+ public function setShareData($shareData)
60
+ {
61
+ $this->shareData = $shareData;
62
+ }
63
+ public function getShareData()
64
+ {
65
+ return $this->shareData;
66
+ }
67
+ public function setTagManagerUrl($tagManagerUrl)
68
+ {
69
+ $this->tagManagerUrl = $tagManagerUrl;
70
+ }
71
+ public function getTagManagerUrl()
72
+ {
73
+ return $this->tagManagerUrl;
74
+ }
75
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/AccountAccess.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_AccountAccess extends Google_Model
19
+ {
20
+ public $permission;
21
+
22
+ public function setPermission($permission)
23
+ {
24
+ $this->permission = $permission;
25
+ }
26
+ public function getPermission()
27
+ {
28
+ return $this->permission;
29
+ }
30
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/BuiltInVariable.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_BuiltInVariable extends Google_Model
19
+ {
20
+ public $accountId;
21
+ public $containerId;
22
+ public $name;
23
+ public $path;
24
+ public $type;
25
+ public $workspaceId;
26
+
27
+ public function setAccountId($accountId)
28
+ {
29
+ $this->accountId = $accountId;
30
+ }
31
+ public function getAccountId()
32
+ {
33
+ return $this->accountId;
34
+ }
35
+ public function setContainerId($containerId)
36
+ {
37
+ $this->containerId = $containerId;
38
+ }
39
+ public function getContainerId()
40
+ {
41
+ return $this->containerId;
42
+ }
43
+ public function setName($name)
44
+ {
45
+ $this->name = $name;
46
+ }
47
+ public function getName()
48
+ {
49
+ return $this->name;
50
+ }
51
+ public function setPath($path)
52
+ {
53
+ $this->path = $path;
54
+ }
55
+ public function getPath()
56
+ {
57
+ return $this->path;
58
+ }
59
+ public function setType($type)
60
+ {
61
+ $this->type = $type;
62
+ }
63
+ public function getType()
64
+ {
65
+ return $this->type;
66
+ }
67
+ public function setWorkspaceId($workspaceId)
68
+ {
69
+ $this->workspaceId = $workspaceId;
70
+ }
71
+ public function getWorkspaceId()
72
+ {
73
+ return $this->workspaceId;
74
+ }
75
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Client.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Client extends Google_Collection
19
+ {
20
+ protected $collection_key = 'parameter';
21
+ public $accountId;
22
+ public $clientId;
23
+ public $containerId;
24
+ public $fingerprint;
25
+ public $name;
26
+ public $notes;
27
+ protected $parameterType = 'Google_Service_TagManager_Parameter';
28
+ protected $parameterDataType = 'array';
29
+ public $parentFolderId;
30
+ public $path;
31
+ public $priority;
32
+ public $tagManagerUrl;
33
+ public $type;
34
+ public $workspaceId;
35
+
36
+ public function setAccountId($accountId)
37
+ {
38
+ $this->accountId = $accountId;
39
+ }
40
+ public function getAccountId()
41
+ {
42
+ return $this->accountId;
43
+ }
44
+ public function setClientId($clientId)
45
+ {
46
+ $this->clientId = $clientId;
47
+ }
48
+ public function getClientId()
49
+ {
50
+ return $this->clientId;
51
+ }
52
+ public function setContainerId($containerId)
53
+ {
54
+ $this->containerId = $containerId;
55
+ }
56
+ public function getContainerId()
57
+ {
58
+ return $this->containerId;
59
+ }
60
+ public function setFingerprint($fingerprint)
61
+ {
62
+ $this->fingerprint = $fingerprint;
63
+ }
64
+ public function getFingerprint()
65
+ {
66
+ return $this->fingerprint;
67
+ }
68
+ public function setName($name)
69
+ {
70
+ $this->name = $name;
71
+ }
72
+ public function getName()
73
+ {
74
+ return $this->name;
75
+ }
76
+ public function setNotes($notes)
77
+ {
78
+ $this->notes = $notes;
79
+ }
80
+ public function getNotes()
81
+ {
82
+ return $this->notes;
83
+ }
84
+ /**
85
+ * @param Google_Service_TagManager_Parameter[]
86
+ */
87
+ public function setParameter($parameter)
88
+ {
89
+ $this->parameter = $parameter;
90
+ }
91
+ /**
92
+ * @return Google_Service_TagManager_Parameter[]
93
+ */
94
+ public function getParameter()
95
+ {
96
+ return $this->parameter;
97
+ }
98
+ public function setParentFolderId($parentFolderId)
99
+ {
100
+ $this->parentFolderId = $parentFolderId;
101
+ }
102
+ public function getParentFolderId()
103
+ {
104
+ return $this->parentFolderId;
105
+ }
106
+ public function setPath($path)
107
+ {
108
+ $this->path = $path;
109
+ }
110
+ public function getPath()
111
+ {
112
+ return $this->path;
113
+ }
114
+ public function setPriority($priority)
115
+ {
116
+ $this->priority = $priority;
117
+ }
118
+ public function getPriority()
119
+ {
120
+ return $this->priority;
121
+ }
122
+ public function setTagManagerUrl($tagManagerUrl)
123
+ {
124
+ $this->tagManagerUrl = $tagManagerUrl;
125
+ }
126
+ public function getTagManagerUrl()
127
+ {
128
+ return $this->tagManagerUrl;
129
+ }
130
+ public function setType($type)
131
+ {
132
+ $this->type = $type;
133
+ }
134
+ public function getType()
135
+ {
136
+ return $this->type;
137
+ }
138
+ public function setWorkspaceId($workspaceId)
139
+ {
140
+ $this->workspaceId = $workspaceId;
141
+ }
142
+ public function getWorkspaceId()
143
+ {
144
+ return $this->workspaceId;
145
+ }
146
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Condition.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Condition extends Google_Collection
19
+ {
20
+ protected $collection_key = 'parameter';
21
+ protected $parameterType = 'Google_Service_TagManager_Parameter';
22
+ protected $parameterDataType = 'array';
23
+ public $type;
24
+
25
+ /**
26
+ * @param Google_Service_TagManager_Parameter[]
27
+ */
28
+ public function setParameter($parameter)
29
+ {
30
+ $this->parameter = $parameter;
31
+ }
32
+ /**
33
+ * @return Google_Service_TagManager_Parameter[]
34
+ */
35
+ public function getParameter()
36
+ {
37
+ return $this->parameter;
38
+ }
39
+ public function setType($type)
40
+ {
41
+ $this->type = $type;
42
+ }
43
+ public function getType()
44
+ {
45
+ return $this->type;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Container.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Container extends Google_Collection
19
+ {
20
+ protected $collection_key = 'usageContext';
21
+ public $accountId;
22
+ public $containerId;
23
+ public $domainName;
24
+ public $fingerprint;
25
+ public $name;
26
+ public $notes;
27
+ public $path;
28
+ public $publicId;
29
+ public $tagManagerUrl;
30
+ public $usageContext;
31
+
32
+ public function setAccountId($accountId)
33
+ {
34
+ $this->accountId = $accountId;
35
+ }
36
+ public function getAccountId()
37
+ {
38
+ return $this->accountId;
39
+ }
40
+ public function setContainerId($containerId)
41
+ {
42
+ $this->containerId = $containerId;
43
+ }
44
+ public function getContainerId()
45
+ {
46
+ return $this->containerId;
47
+ }
48
+ public function setDomainName($domainName)
49
+ {
50
+ $this->domainName = $domainName;
51
+ }
52
+ public function getDomainName()
53
+ {
54
+ return $this->domainName;
55
+ }
56
+ public function setFingerprint($fingerprint)
57
+ {
58
+ $this->fingerprint = $fingerprint;
59
+ }
60
+ public function getFingerprint()
61
+ {
62
+ return $this->fingerprint;
63
+ }
64
+ public function setName($name)
65
+ {
66
+ $this->name = $name;
67
+ }
68
+ public function getName()
69
+ {
70
+ return $this->name;
71
+ }
72
+ public function setNotes($notes)
73
+ {
74
+ $this->notes = $notes;
75
+ }
76
+ public function getNotes()
77
+ {
78
+ return $this->notes;
79
+ }
80
+ public function setPath($path)
81
+ {
82
+ $this->path = $path;
83
+ }
84
+ public function getPath()
85
+ {
86
+ return $this->path;
87
+ }
88
+ public function setPublicId($publicId)
89
+ {
90
+ $this->publicId = $publicId;
91
+ }
92
+ public function getPublicId()
93
+ {
94
+ return $this->publicId;
95
+ }
96
+ public function setTagManagerUrl($tagManagerUrl)
97
+ {
98
+ $this->tagManagerUrl = $tagManagerUrl;
99
+ }
100
+ public function getTagManagerUrl()
101
+ {
102
+ return $this->tagManagerUrl;
103
+ }
104
+ public function setUsageContext($usageContext)
105
+ {
106
+ $this->usageContext = $usageContext;
107
+ }
108
+ public function getUsageContext()
109
+ {
110
+ return $this->usageContext;
111
+ }
112
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ContainerAccess.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ContainerAccess extends Google_Model
19
+ {
20
+ public $containerId;
21
+ public $permission;
22
+
23
+ public function setContainerId($containerId)
24
+ {
25
+ $this->containerId = $containerId;
26
+ }
27
+ public function getContainerId()
28
+ {
29
+ return $this->containerId;
30
+ }
31
+ public function setPermission($permission)
32
+ {
33
+ $this->permission = $permission;
34
+ }
35
+ public function getPermission()
36
+ {
37
+ return $this->permission;
38
+ }
39
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ContainerVersion.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ContainerVersion extends Google_Collection
19
+ {
20
+ protected $collection_key = 'zone';
21
+ public $accountId;
22
+ protected $builtInVariableType = 'Google_Service_TagManager_BuiltInVariable';
23
+ protected $builtInVariableDataType = 'array';
24
+ protected $clientType = 'Google_Service_TagManager_Client';
25
+ protected $clientDataType = 'array';
26
+ protected $containerType = 'Google_Service_TagManager_Container';
27
+ protected $containerDataType = '';
28
+ public $containerId;
29
+ public $containerVersionId;
30
+ protected $customTemplateType = 'Google_Service_TagManager_CustomTemplate';
31
+ protected $customTemplateDataType = 'array';
32
+ public $deleted;
33
+ public $description;
34
+ public $fingerprint;
35
+ protected $folderType = 'Google_Service_TagManager_Folder';
36
+ protected $folderDataType = 'array';
37
+ public $name;
38
+ public $path;
39
+ protected $tagType = 'Google_Service_TagManager_Tag';
40
+ protected $tagDataType = 'array';
41
+ public $tagManagerUrl;
42
+ protected $triggerType = 'Google_Service_TagManager_Trigger';
43
+ protected $triggerDataType = 'array';
44
+ protected $variableType = 'Google_Service_TagManager_Variable';
45
+ protected $variableDataType = 'array';
46
+ protected $zoneType = 'Google_Service_TagManager_Zone';
47
+ protected $zoneDataType = 'array';
48
+
49
+ public function setAccountId($accountId)
50
+ {
51
+ $this->accountId = $accountId;
52
+ }
53
+ public function getAccountId()
54
+ {
55
+ return $this->accountId;
56
+ }
57
+ /**
58
+ * @param Google_Service_TagManager_BuiltInVariable[]
59
+ */
60
+ public function setBuiltInVariable($builtInVariable)
61
+ {
62
+ $this->builtInVariable = $builtInVariable;
63
+ }
64
+ /**
65
+ * @return Google_Service_TagManager_BuiltInVariable[]
66
+ */
67
+ public function getBuiltInVariable()
68
+ {
69
+ return $this->builtInVariable;
70
+ }
71
+ /**
72
+ * @param Google_Service_TagManager_Client[]
73
+ */
74
+ public function setClient($client)
75
+ {
76
+ $this->client = $client;
77
+ }
78
+ /**
79
+ * @return Google_Service_TagManager_Client[]
80
+ */
81
+ public function getClient()
82
+ {
83
+ return $this->client;
84
+ }
85
+ /**
86
+ * @param Google_Service_TagManager_Container
87
+ */
88
+ public function setContainer(Google_Service_TagManager_Container $container)
89
+ {
90
+ $this->container = $container;
91
+ }
92
+ /**
93
+ * @return Google_Service_TagManager_Container
94
+ */
95
+ public function getContainer()
96
+ {
97
+ return $this->container;
98
+ }
99
+ public function setContainerId($containerId)
100
+ {
101
+ $this->containerId = $containerId;
102
+ }
103
+ public function getContainerId()
104
+ {
105
+ return $this->containerId;
106
+ }
107
+ public function setContainerVersionId($containerVersionId)
108
+ {
109
+ $this->containerVersionId = $containerVersionId;
110
+ }
111
+ public function getContainerVersionId()
112
+ {
113
+ return $this->containerVersionId;
114
+ }
115
+ /**
116
+ * @param Google_Service_TagManager_CustomTemplate[]
117
+ */
118
+ public function setCustomTemplate($customTemplate)
119
+ {
120
+ $this->customTemplate = $customTemplate;
121
+ }
122
+ /**
123
+ * @return Google_Service_TagManager_CustomTemplate[]
124
+ */
125
+ public function getCustomTemplate()
126
+ {
127
+ return $this->customTemplate;
128
+ }
129
+ public function setDeleted($deleted)
130
+ {
131
+ $this->deleted = $deleted;
132
+ }
133
+ public function getDeleted()
134
+ {
135
+ return $this->deleted;
136
+ }
137
+ public function setDescription($description)
138
+ {
139
+ $this->description = $description;
140
+ }
141
+ public function getDescription()
142
+ {
143
+ return $this->description;
144
+ }
145
+ public function setFingerprint($fingerprint)
146
+ {
147
+ $this->fingerprint = $fingerprint;
148
+ }
149
+ public function getFingerprint()
150
+ {
151
+ return $this->fingerprint;
152
+ }
153
+ /**
154
+ * @param Google_Service_TagManager_Folder[]
155
+ */
156
+ public function setFolder($folder)
157
+ {
158
+ $this->folder = $folder;
159
+ }
160
+ /**
161
+ * @return Google_Service_TagManager_Folder[]
162
+ */
163
+ public function getFolder()
164
+ {
165
+ return $this->folder;
166
+ }
167
+ public function setName($name)
168
+ {
169
+ $this->name = $name;
170
+ }
171
+ public function getName()
172
+ {
173
+ return $this->name;
174
+ }
175
+ public function setPath($path)
176
+ {
177
+ $this->path = $path;
178
+ }
179
+ public function getPath()
180
+ {
181
+ return $this->path;
182
+ }
183
+ /**
184
+ * @param Google_Service_TagManager_Tag[]
185
+ */
186
+ public function setTag($tag)
187
+ {
188
+ $this->tag = $tag;
189
+ }
190
+ /**
191
+ * @return Google_Service_TagManager_Tag[]
192
+ */
193
+ public function getTag()
194
+ {
195
+ return $this->tag;
196
+ }
197
+ public function setTagManagerUrl($tagManagerUrl)
198
+ {
199
+ $this->tagManagerUrl = $tagManagerUrl;
200
+ }
201
+ public function getTagManagerUrl()
202
+ {
203
+ return $this->tagManagerUrl;
204
+ }
205
+ /**
206
+ * @param Google_Service_TagManager_Trigger[]
207
+ */
208
+ public function setTrigger($trigger)
209
+ {
210
+ $this->trigger = $trigger;
211
+ }
212
+ /**
213
+ * @return Google_Service_TagManager_Trigger[]
214
+ */
215
+ public function getTrigger()
216
+ {
217
+ return $this->trigger;
218
+ }
219
+ /**
220
+ * @param Google_Service_TagManager_Variable[]
221
+ */
222
+ public function setVariable($variable)
223
+ {
224
+ $this->variable = $variable;
225
+ }
226
+ /**
227
+ * @return Google_Service_TagManager_Variable[]
228
+ */
229
+ public function getVariable()
230
+ {
231
+ return $this->variable;
232
+ }
233
+ /**
234
+ * @param Google_Service_TagManager_Zone[]
235
+ */
236
+ public function setZone($zone)
237
+ {
238
+ $this->zone = $zone;
239
+ }
240
+ /**
241
+ * @return Google_Service_TagManager_Zone[]
242
+ */
243
+ public function getZone()
244
+ {
245
+ return $this->zone;
246
+ }
247
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ContainerVersionHeader.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ContainerVersionHeader extends Google_Model
19
+ {
20
+ public $accountId;
21
+ public $containerId;
22
+ public $containerVersionId;
23
+ public $deleted;
24
+ public $name;
25
+ public $numClients;
26
+ public $numCustomTemplates;
27
+ public $numMacros;
28
+ public $numRules;
29
+ public $numTags;
30
+ public $numTriggers;
31
+ public $numVariables;
32
+ public $numZones;
33
+ public $path;
34
+
35
+ public function setAccountId($accountId)
36
+ {
37
+ $this->accountId = $accountId;
38
+ }
39
+ public function getAccountId()
40
+ {
41
+ return $this->accountId;
42
+ }
43
+ public function setContainerId($containerId)
44
+ {
45
+ $this->containerId = $containerId;
46
+ }
47
+ public function getContainerId()
48
+ {
49
+ return $this->containerId;
50
+ }
51
+ public function setContainerVersionId($containerVersionId)
52
+ {
53
+ $this->containerVersionId = $containerVersionId;
54
+ }
55
+ public function getContainerVersionId()
56
+ {
57
+ return $this->containerVersionId;
58
+ }
59
+ public function setDeleted($deleted)
60
+ {
61
+ $this->deleted = $deleted;
62
+ }
63
+ public function getDeleted()
64
+ {
65
+ return $this->deleted;
66
+ }
67
+ public function setName($name)
68
+ {
69
+ $this->name = $name;
70
+ }
71
+ public function getName()
72
+ {
73
+ return $this->name;
74
+ }
75
+ public function setNumClients($numClients)
76
+ {
77
+ $this->numClients = $numClients;
78
+ }
79
+ public function getNumClients()
80
+ {
81
+ return $this->numClients;
82
+ }
83
+ public function setNumCustomTemplates($numCustomTemplates)
84
+ {
85
+ $this->numCustomTemplates = $numCustomTemplates;
86
+ }
87
+ public function getNumCustomTemplates()
88
+ {
89
+ return $this->numCustomTemplates;
90
+ }
91
+ public function setNumMacros($numMacros)
92
+ {
93
+ $this->numMacros = $numMacros;
94
+ }
95
+ public function getNumMacros()
96
+ {
97
+ return $this->numMacros;
98
+ }
99
+ public function setNumRules($numRules)
100
+ {
101
+ $this->numRules = $numRules;
102
+ }
103
+ public function getNumRules()
104
+ {
105
+ return $this->numRules;
106
+ }
107
+ public function setNumTags($numTags)
108
+ {
109
+ $this->numTags = $numTags;
110
+ }
111
+ public function getNumTags()
112
+ {
113
+ return $this->numTags;
114
+ }
115
+ public function setNumTriggers($numTriggers)
116
+ {
117
+ $this->numTriggers = $numTriggers;
118
+ }
119
+ public function getNumTriggers()
120
+ {
121
+ return $this->numTriggers;
122
+ }
123
+ public function setNumVariables($numVariables)
124
+ {
125
+ $this->numVariables = $numVariables;
126
+ }
127
+ public function getNumVariables()
128
+ {
129
+ return $this->numVariables;
130
+ }
131
+ public function setNumZones($numZones)
132
+ {
133
+ $this->numZones = $numZones;
134
+ }
135
+ public function getNumZones()
136
+ {
137
+ return $this->numZones;
138
+ }
139
+ public function setPath($path)
140
+ {
141
+ $this->path = $path;
142
+ }
143
+ public function getPath()
144
+ {
145
+ return $this->path;
146
+ }
147
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/CreateBuiltInVariableResponse.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_CreateBuiltInVariableResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'builtInVariable';
21
+ protected $builtInVariableType = 'Google_Service_TagManager_BuiltInVariable';
22
+ protected $builtInVariableDataType = 'array';
23
+
24
+ /**
25
+ * @param Google_Service_TagManager_BuiltInVariable[]
26
+ */
27
+ public function setBuiltInVariable($builtInVariable)
28
+ {
29
+ $this->builtInVariable = $builtInVariable;
30
+ }
31
+ /**
32
+ * @return Google_Service_TagManager_BuiltInVariable[]
33
+ */
34
+ public function getBuiltInVariable()
35
+ {
36
+ return $this->builtInVariable;
37
+ }
38
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/CreateContainerVersionRequestVersionOptions.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_CreateContainerVersionRequestVersionOptions extends Google_Model
19
+ {
20
+ public $name;
21
+ public $notes;
22
+
23
+ public function setName($name)
24
+ {
25
+ $this->name = $name;
26
+ }
27
+ public function getName()
28
+ {
29
+ return $this->name;
30
+ }
31
+ public function setNotes($notes)
32
+ {
33
+ $this->notes = $notes;
34
+ }
35
+ public function getNotes()
36
+ {
37
+ return $this->notes;
38
+ }
39
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/CreateContainerVersionResponse.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_CreateContainerVersionResponse extends Google_Model
19
+ {
20
+ public $compilerError;
21
+ protected $containerVersionType = 'Google_Service_TagManager_ContainerVersion';
22
+ protected $containerVersionDataType = '';
23
+ public $newWorkspacePath;
24
+ protected $syncStatusType = 'Google_Service_TagManager_SyncStatus';
25
+ protected $syncStatusDataType = '';
26
+
27
+ public function setCompilerError($compilerError)
28
+ {
29
+ $this->compilerError = $compilerError;
30
+ }
31
+ public function getCompilerError()
32
+ {
33
+ return $this->compilerError;
34
+ }
35
+ /**
36
+ * @param Google_Service_TagManager_ContainerVersion
37
+ */
38
+ public function setContainerVersion(Google_Service_TagManager_ContainerVersion $containerVersion)
39
+ {
40
+ $this->containerVersion = $containerVersion;
41
+ }
42
+ /**
43
+ * @return Google_Service_TagManager_ContainerVersion
44
+ */
45
+ public function getContainerVersion()
46
+ {
47
+ return $this->containerVersion;
48
+ }
49
+ public function setNewWorkspacePath($newWorkspacePath)
50
+ {
51
+ $this->newWorkspacePath = $newWorkspacePath;
52
+ }
53
+ public function getNewWorkspacePath()
54
+ {
55
+ return $this->newWorkspacePath;
56
+ }
57
+ /**
58
+ * @param Google_Service_TagManager_SyncStatus
59
+ */
60
+ public function setSyncStatus(Google_Service_TagManager_SyncStatus $syncStatus)
61
+ {
62
+ $this->syncStatus = $syncStatus;
63
+ }
64
+ /**
65
+ * @return Google_Service_TagManager_SyncStatus
66
+ */
67
+ public function getSyncStatus()
68
+ {
69
+ return $this->syncStatus;
70
+ }
71
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/CustomTemplate.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_CustomTemplate extends Google_Model
19
+ {
20
+ public $accountId;
21
+ public $containerId;
22
+ public $fingerprint;
23
+ protected $galleryReferenceType = 'Google_Service_TagManager_GalleryReference';
24
+ protected $galleryReferenceDataType = '';
25
+ public $name;
26
+ public $path;
27
+ public $tagManagerUrl;
28
+ public $templateData;
29
+ public $templateId;
30
+ public $workspaceId;
31
+
32
+ public function setAccountId($accountId)
33
+ {
34
+ $this->accountId = $accountId;
35
+ }
36
+ public function getAccountId()
37
+ {
38
+ return $this->accountId;
39
+ }
40
+ public function setContainerId($containerId)
41
+ {
42
+ $this->containerId = $containerId;
43
+ }
44
+ public function getContainerId()
45
+ {
46
+ return $this->containerId;
47
+ }
48
+ public function setFingerprint($fingerprint)
49
+ {
50
+ $this->fingerprint = $fingerprint;
51
+ }
52
+ public function getFingerprint()
53
+ {
54
+ return $this->fingerprint;
55
+ }
56
+ /**
57
+ * @param Google_Service_TagManager_GalleryReference
58
+ */
59
+ public function setGalleryReference(Google_Service_TagManager_GalleryReference $galleryReference)
60
+ {
61
+ $this->galleryReference = $galleryReference;
62
+ }
63
+ /**
64
+ * @return Google_Service_TagManager_GalleryReference
65
+ */
66
+ public function getGalleryReference()
67
+ {
68
+ return $this->galleryReference;
69
+ }
70
+ public function setName($name)
71
+ {
72
+ $this->name = $name;
73
+ }
74
+ public function getName()
75
+ {
76
+ return $this->name;
77
+ }
78
+ public function setPath($path)
79
+ {
80
+ $this->path = $path;
81
+ }
82
+ public function getPath()
83
+ {
84
+ return $this->path;
85
+ }
86
+ public function setTagManagerUrl($tagManagerUrl)
87
+ {
88
+ $this->tagManagerUrl = $tagManagerUrl;
89
+ }
90
+ public function getTagManagerUrl()
91
+ {
92
+ return $this->tagManagerUrl;
93
+ }
94
+ public function setTemplateData($templateData)
95
+ {
96
+ $this->templateData = $templateData;
97
+ }
98
+ public function getTemplateData()
99
+ {
100
+ return $this->templateData;
101
+ }
102
+ public function setTemplateId($templateId)
103
+ {
104
+ $this->templateId = $templateId;
105
+ }
106
+ public function getTemplateId()
107
+ {
108
+ return $this->templateId;
109
+ }
110
+ public function setWorkspaceId($workspaceId)
111
+ {
112
+ $this->workspaceId = $workspaceId;
113
+ }
114
+ public function getWorkspaceId()
115
+ {
116
+ return $this->workspaceId;
117
+ }
118
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Entity.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Entity extends Google_Model
19
+ {
20
+ public $changeStatus;
21
+ protected $clientType = 'Google_Service_TagManager_Client';
22
+ protected $clientDataType = '';
23
+ protected $folderType = 'Google_Service_TagManager_Folder';
24
+ protected $folderDataType = '';
25
+ protected $tagType = 'Google_Service_TagManager_Tag';
26
+ protected $tagDataType = '';
27
+ protected $triggerType = 'Google_Service_TagManager_Trigger';
28
+ protected $triggerDataType = '';
29
+ protected $variableType = 'Google_Service_TagManager_Variable';
30
+ protected $variableDataType = '';
31
+
32
+ public function setChangeStatus($changeStatus)
33
+ {
34
+ $this->changeStatus = $changeStatus;
35
+ }
36
+ public function getChangeStatus()
37
+ {
38
+ return $this->changeStatus;
39
+ }
40
+ /**
41
+ * @param Google_Service_TagManager_Client
42
+ */
43
+ public function setClient(Google_Service_TagManager_Client $client)
44
+ {
45
+ $this->client = $client;
46
+ }
47
+ /**
48
+ * @return Google_Service_TagManager_Client
49
+ */
50
+ public function getClient()
51
+ {
52
+ return $this->client;
53
+ }
54
+ /**
55
+ * @param Google_Service_TagManager_Folder
56
+ */
57
+ public function setFolder(Google_Service_TagManager_Folder $folder)
58
+ {
59
+ $this->folder = $folder;
60
+ }
61
+ /**
62
+ * @return Google_Service_TagManager_Folder
63
+ */
64
+ public function getFolder()
65
+ {
66
+ return $this->folder;
67
+ }
68
+ /**
69
+ * @param Google_Service_TagManager_Tag
70
+ */
71
+ public function setTag(Google_Service_TagManager_Tag $tag)
72
+ {
73
+ $this->tag = $tag;
74
+ }
75
+ /**
76
+ * @return Google_Service_TagManager_Tag
77
+ */
78
+ public function getTag()
79
+ {
80
+ return $this->tag;
81
+ }
82
+ /**
83
+ * @param Google_Service_TagManager_Trigger
84
+ */
85
+ public function setTrigger(Google_Service_TagManager_Trigger $trigger)
86
+ {
87
+ $this->trigger = $trigger;
88
+ }
89
+ /**
90
+ * @return Google_Service_TagManager_Trigger
91
+ */
92
+ public function getTrigger()
93
+ {
94
+ return $this->trigger;
95
+ }
96
+ /**
97
+ * @param Google_Service_TagManager_Variable
98
+ */
99
+ public function setVariable(Google_Service_TagManager_Variable $variable)
100
+ {
101
+ $this->variable = $variable;
102
+ }
103
+ /**
104
+ * @return Google_Service_TagManager_Variable
105
+ */
106
+ public function getVariable()
107
+ {
108
+ return $this->variable;
109
+ }
110
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Environment.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Environment extends Google_Model
19
+ {
20
+ public $accountId;
21
+ public $authorizationCode;
22
+ public $authorizationTimestamp;
23
+ public $containerId;
24
+ public $containerVersionId;
25
+ public $description;
26
+ public $enableDebug;
27
+ public $environmentId;
28
+ public $fingerprint;
29
+ public $name;
30
+ public $path;
31
+ public $tagManagerUrl;
32
+ public $type;
33
+ public $url;
34
+ public $workspaceId;
35
+
36
+ public function setAccountId($accountId)
37
+ {
38
+ $this->accountId = $accountId;
39
+ }
40
+ public function getAccountId()
41
+ {
42
+ return $this->accountId;
43
+ }
44
+ public function setAuthorizationCode($authorizationCode)
45
+ {
46
+ $this->authorizationCode = $authorizationCode;
47
+ }
48
+ public function getAuthorizationCode()
49
+ {
50
+ return $this->authorizationCode;
51
+ }
52
+ public function setAuthorizationTimestamp($authorizationTimestamp)
53
+ {
54
+ $this->authorizationTimestamp = $authorizationTimestamp;
55
+ }
56
+ public function getAuthorizationTimestamp()
57
+ {
58
+ return $this->authorizationTimestamp;
59
+ }
60
+ public function setContainerId($containerId)
61
+ {
62
+ $this->containerId = $containerId;
63
+ }
64
+ public function getContainerId()
65
+ {
66
+ return $this->containerId;
67
+ }
68
+ public function setContainerVersionId($containerVersionId)
69
+ {
70
+ $this->containerVersionId = $containerVersionId;
71
+ }
72
+ public function getContainerVersionId()
73
+ {
74
+ return $this->containerVersionId;
75
+ }
76
+ public function setDescription($description)
77
+ {
78
+ $this->description = $description;
79
+ }
80
+ public function getDescription()
81
+ {
82
+ return $this->description;
83
+ }
84
+ public function setEnableDebug($enableDebug)
85
+ {
86
+ $this->enableDebug = $enableDebug;
87
+ }
88
+ public function getEnableDebug()
89
+ {
90
+ return $this->enableDebug;
91
+ }
92
+ public function setEnvironmentId($environmentId)
93
+ {
94
+ $this->environmentId = $environmentId;
95
+ }
96
+ public function getEnvironmentId()
97
+ {
98
+ return $this->environmentId;
99
+ }
100
+ public function setFingerprint($fingerprint)
101
+ {
102
+ $this->fingerprint = $fingerprint;
103
+ }
104
+ public function getFingerprint()
105
+ {
106
+ return $this->fingerprint;
107
+ }
108
+ public function setName($name)
109
+ {
110
+ $this->name = $name;
111
+ }
112
+ public function getName()
113
+ {
114
+ return $this->name;
115
+ }
116
+ public function setPath($path)
117
+ {
118
+ $this->path = $path;
119
+ }
120
+ public function getPath()
121
+ {
122
+ return $this->path;
123
+ }
124
+ public function setTagManagerUrl($tagManagerUrl)
125
+ {
126
+ $this->tagManagerUrl = $tagManagerUrl;
127
+ }
128
+ public function getTagManagerUrl()
129
+ {
130
+ return $this->tagManagerUrl;
131
+ }
132
+ public function setType($type)
133
+ {
134
+ $this->type = $type;
135
+ }
136
+ public function getType()
137
+ {
138
+ return $this->type;
139
+ }
140
+ public function setUrl($url)
141
+ {
142
+ $this->url = $url;
143
+ }
144
+ public function getUrl()
145
+ {
146
+ return $this->url;
147
+ }
148
+ public function setWorkspaceId($workspaceId)
149
+ {
150
+ $this->workspaceId = $workspaceId;
151
+ }
152
+ public function getWorkspaceId()
153
+ {
154
+ return $this->workspaceId;
155
+ }
156
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Folder.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Folder extends Google_Model
19
+ {
20
+ public $accountId;
21
+ public $containerId;
22
+ public $fingerprint;
23
+ public $folderId;
24
+ public $name;
25
+ public $notes;
26
+ public $path;
27
+ public $tagManagerUrl;
28
+ public $workspaceId;
29
+
30
+ public function setAccountId($accountId)
31
+ {
32
+ $this->accountId = $accountId;
33
+ }
34
+ public function getAccountId()
35
+ {
36
+ return $this->accountId;
37
+ }
38
+ public function setContainerId($containerId)
39
+ {
40
+ $this->containerId = $containerId;
41
+ }
42
+ public function getContainerId()
43
+ {
44
+ return $this->containerId;
45
+ }
46
+ public function setFingerprint($fingerprint)
47
+ {
48
+ $this->fingerprint = $fingerprint;
49
+ }
50
+ public function getFingerprint()
51
+ {
52
+ return $this->fingerprint;
53
+ }
54
+ public function setFolderId($folderId)
55
+ {
56
+ $this->folderId = $folderId;
57
+ }
58
+ public function getFolderId()
59
+ {
60
+ return $this->folderId;
61
+ }
62
+ public function setName($name)
63
+ {
64
+ $this->name = $name;
65
+ }
66
+ public function getName()
67
+ {
68
+ return $this->name;
69
+ }
70
+ public function setNotes($notes)
71
+ {
72
+ $this->notes = $notes;
73
+ }
74
+ public function getNotes()
75
+ {
76
+ return $this->notes;
77
+ }
78
+ public function setPath($path)
79
+ {
80
+ $this->path = $path;
81
+ }
82
+ public function getPath()
83
+ {
84
+ return $this->path;
85
+ }
86
+ public function setTagManagerUrl($tagManagerUrl)
87
+ {
88
+ $this->tagManagerUrl = $tagManagerUrl;
89
+ }
90
+ public function getTagManagerUrl()
91
+ {
92
+ return $this->tagManagerUrl;
93
+ }
94
+ public function setWorkspaceId($workspaceId)
95
+ {
96
+ $this->workspaceId = $workspaceId;
97
+ }
98
+ public function getWorkspaceId()
99
+ {
100
+ return $this->workspaceId;
101
+ }
102
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/FolderEntities.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_FolderEntities extends Google_Collection
19
+ {
20
+ protected $collection_key = 'variable';
21
+ public $nextPageToken;
22
+ protected $tagType = 'Google_Service_TagManager_Tag';
23
+ protected $tagDataType = 'array';
24
+ protected $triggerType = 'Google_Service_TagManager_Trigger';
25
+ protected $triggerDataType = 'array';
26
+ protected $variableType = 'Google_Service_TagManager_Variable';
27
+ protected $variableDataType = 'array';
28
+
29
+ public function setNextPageToken($nextPageToken)
30
+ {
31
+ $this->nextPageToken = $nextPageToken;
32
+ }
33
+ public function getNextPageToken()
34
+ {
35
+ return $this->nextPageToken;
36
+ }
37
+ /**
38
+ * @param Google_Service_TagManager_Tag[]
39
+ */
40
+ public function setTag($tag)
41
+ {
42
+ $this->tag = $tag;
43
+ }
44
+ /**
45
+ * @return Google_Service_TagManager_Tag[]
46
+ */
47
+ public function getTag()
48
+ {
49
+ return $this->tag;
50
+ }
51
+ /**
52
+ * @param Google_Service_TagManager_Trigger[]
53
+ */
54
+ public function setTrigger($trigger)
55
+ {
56
+ $this->trigger = $trigger;
57
+ }
58
+ /**
59
+ * @return Google_Service_TagManager_Trigger[]
60
+ */
61
+ public function getTrigger()
62
+ {
63
+ return $this->trigger;
64
+ }
65
+ /**
66
+ * @param Google_Service_TagManager_Variable[]
67
+ */
68
+ public function setVariable($variable)
69
+ {
70
+ $this->variable = $variable;
71
+ }
72
+ /**
73
+ * @return Google_Service_TagManager_Variable[]
74
+ */
75
+ public function getVariable()
76
+ {
77
+ return $this->variable;
78
+ }
79
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/GalleryReference.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_GalleryReference extends Google_Model
19
+ {
20
+ public $host;
21
+ public $isModified;
22
+ public $owner;
23
+ public $repository;
24
+ public $signature;
25
+ public $version;
26
+
27
+ public function setHost($host)
28
+ {
29
+ $this->host = $host;
30
+ }
31
+ public function getHost()
32
+ {
33
+ return $this->host;
34
+ }
35
+ public function setIsModified($isModified)
36
+ {
37
+ $this->isModified = $isModified;
38
+ }
39
+ public function getIsModified()
40
+ {
41
+ return $this->isModified;
42
+ }
43
+ public function setOwner($owner)
44
+ {
45
+ $this->owner = $owner;
46
+ }
47
+ public function getOwner()
48
+ {
49
+ return $this->owner;
50
+ }
51
+ public function setRepository($repository)
52
+ {
53
+ $this->repository = $repository;
54
+ }
55
+ public function getRepository()
56
+ {
57
+ return $this->repository;
58
+ }
59
+ public function setSignature($signature)
60
+ {
61
+ $this->signature = $signature;
62
+ }
63
+ public function getSignature()
64
+ {
65
+ return $this->signature;
66
+ }
67
+ public function setVersion($version)
68
+ {
69
+ $this->version = $version;
70
+ }
71
+ public function getVersion()
72
+ {
73
+ return $this->version;
74
+ }
75
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/GetWorkspaceStatusResponse.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_GetWorkspaceStatusResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'workspaceChange';
21
+ protected $mergeConflictType = 'Google_Service_TagManager_MergeConflict';
22
+ protected $mergeConflictDataType = 'array';
23
+ protected $workspaceChangeType = 'Google_Service_TagManager_Entity';
24
+ protected $workspaceChangeDataType = 'array';
25
+
26
+ /**
27
+ * @param Google_Service_TagManager_MergeConflict[]
28
+ */
29
+ public function setMergeConflict($mergeConflict)
30
+ {
31
+ $this->mergeConflict = $mergeConflict;
32
+ }
33
+ /**
34
+ * @return Google_Service_TagManager_MergeConflict[]
35
+ */
36
+ public function getMergeConflict()
37
+ {
38
+ return $this->mergeConflict;
39
+ }
40
+ /**
41
+ * @param Google_Service_TagManager_Entity[]
42
+ */
43
+ public function setWorkspaceChange($workspaceChange)
44
+ {
45
+ $this->workspaceChange = $workspaceChange;
46
+ }
47
+ /**
48
+ * @return Google_Service_TagManager_Entity[]
49
+ */
50
+ public function getWorkspaceChange()
51
+ {
52
+ return $this->workspaceChange;
53
+ }
54
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListAccountsResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListAccountsResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'account';
21
+ protected $accountType = 'Google_Service_TagManager_Account';
22
+ protected $accountDataType = 'array';
23
+ public $nextPageToken;
24
+
25
+ /**
26
+ * @param Google_Service_TagManager_Account[]
27
+ */
28
+ public function setAccount($account)
29
+ {
30
+ $this->account = $account;
31
+ }
32
+ /**
33
+ * @return Google_Service_TagManager_Account[]
34
+ */
35
+ public function getAccount()
36
+ {
37
+ return $this->account;
38
+ }
39
+ public function setNextPageToken($nextPageToken)
40
+ {
41
+ $this->nextPageToken = $nextPageToken;
42
+ }
43
+ public function getNextPageToken()
44
+ {
45
+ return $this->nextPageToken;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListContainerVersionsResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListContainerVersionsResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'containerVersionHeader';
21
+ protected $containerVersionHeaderType = 'Google_Service_TagManager_ContainerVersionHeader';
22
+ protected $containerVersionHeaderDataType = 'array';
23
+ public $nextPageToken;
24
+
25
+ /**
26
+ * @param Google_Service_TagManager_ContainerVersionHeader[]
27
+ */
28
+ public function setContainerVersionHeader($containerVersionHeader)
29
+ {
30
+ $this->containerVersionHeader = $containerVersionHeader;
31
+ }
32
+ /**
33
+ * @return Google_Service_TagManager_ContainerVersionHeader[]
34
+ */
35
+ public function getContainerVersionHeader()
36
+ {
37
+ return $this->containerVersionHeader;
38
+ }
39
+ public function setNextPageToken($nextPageToken)
40
+ {
41
+ $this->nextPageToken = $nextPageToken;
42
+ }
43
+ public function getNextPageToken()
44
+ {
45
+ return $this->nextPageToken;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListContainersResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListContainersResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'container';
21
+ protected $containerType = 'Google_Service_TagManager_Container';
22
+ protected $containerDataType = 'array';
23
+ public $nextPageToken;
24
+
25
+ /**
26
+ * @param Google_Service_TagManager_Container[]
27
+ */
28
+ public function setContainer($container)
29
+ {
30
+ $this->container = $container;
31
+ }
32
+ /**
33
+ * @return Google_Service_TagManager_Container[]
34
+ */
35
+ public function getContainer()
36
+ {
37
+ return $this->container;
38
+ }
39
+ public function setNextPageToken($nextPageToken)
40
+ {
41
+ $this->nextPageToken = $nextPageToken;
42
+ }
43
+ public function getNextPageToken()
44
+ {
45
+ return $this->nextPageToken;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListEnabledBuiltInVariablesResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListEnabledBuiltInVariablesResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'builtInVariable';
21
+ protected $builtInVariableType = 'Google_Service_TagManager_BuiltInVariable';
22
+ protected $builtInVariableDataType = 'array';
23
+ public $nextPageToken;
24
+
25
+ /**
26
+ * @param Google_Service_TagManager_BuiltInVariable[]
27
+ */
28
+ public function setBuiltInVariable($builtInVariable)
29
+ {
30
+ $this->builtInVariable = $builtInVariable;
31
+ }
32
+ /**
33
+ * @return Google_Service_TagManager_BuiltInVariable[]
34
+ */
35
+ public function getBuiltInVariable()
36
+ {
37
+ return $this->builtInVariable;
38
+ }
39
+ public function setNextPageToken($nextPageToken)
40
+ {
41
+ $this->nextPageToken = $nextPageToken;
42
+ }
43
+ public function getNextPageToken()
44
+ {
45
+ return $this->nextPageToken;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListEnvironmentsResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListEnvironmentsResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'environment';
21
+ protected $environmentType = 'Google_Service_TagManager_Environment';
22
+ protected $environmentDataType = 'array';
23
+ public $nextPageToken;
24
+
25
+ /**
26
+ * @param Google_Service_TagManager_Environment[]
27
+ */
28
+ public function setEnvironment($environment)
29
+ {
30
+ $this->environment = $environment;
31
+ }
32
+ /**
33
+ * @return Google_Service_TagManager_Environment[]
34
+ */
35
+ public function getEnvironment()
36
+ {
37
+ return $this->environment;
38
+ }
39
+ public function setNextPageToken($nextPageToken)
40
+ {
41
+ $this->nextPageToken = $nextPageToken;
42
+ }
43
+ public function getNextPageToken()
44
+ {
45
+ return $this->nextPageToken;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListFoldersResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListFoldersResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'folder';
21
+ protected $folderType = 'Google_Service_TagManager_Folder';
22
+ protected $folderDataType = 'array';
23
+ public $nextPageToken;
24
+
25
+ /**
26
+ * @param Google_Service_TagManager_Folder[]
27
+ */
28
+ public function setFolder($folder)
29
+ {
30
+ $this->folder = $folder;
31
+ }
32
+ /**
33
+ * @return Google_Service_TagManager_Folder[]
34
+ */
35
+ public function getFolder()
36
+ {
37
+ return $this->folder;
38
+ }
39
+ public function setNextPageToken($nextPageToken)
40
+ {
41
+ $this->nextPageToken = $nextPageToken;
42
+ }
43
+ public function getNextPageToken()
44
+ {
45
+ return $this->nextPageToken;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListTagsResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListTagsResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'tag';
21
+ public $nextPageToken;
22
+ protected $tagType = 'Google_Service_TagManager_Tag';
23
+ protected $tagDataType = 'array';
24
+
25
+ public function setNextPageToken($nextPageToken)
26
+ {
27
+ $this->nextPageToken = $nextPageToken;
28
+ }
29
+ public function getNextPageToken()
30
+ {
31
+ return $this->nextPageToken;
32
+ }
33
+ /**
34
+ * @param Google_Service_TagManager_Tag[]
35
+ */
36
+ public function setTag($tag)
37
+ {
38
+ $this->tag = $tag;
39
+ }
40
+ /**
41
+ * @return Google_Service_TagManager_Tag[]
42
+ */
43
+ public function getTag()
44
+ {
45
+ return $this->tag;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListTemplatesResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListTemplatesResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'template';
21
+ public $nextPageToken;
22
+ protected $templateType = 'Google_Service_TagManager_CustomTemplate';
23
+ protected $templateDataType = 'array';
24
+
25
+ public function setNextPageToken($nextPageToken)
26
+ {
27
+ $this->nextPageToken = $nextPageToken;
28
+ }
29
+ public function getNextPageToken()
30
+ {
31
+ return $this->nextPageToken;
32
+ }
33
+ /**
34
+ * @param Google_Service_TagManager_CustomTemplate[]
35
+ */
36
+ public function setTemplate($template)
37
+ {
38
+ $this->template = $template;
39
+ }
40
+ /**
41
+ * @return Google_Service_TagManager_CustomTemplate[]
42
+ */
43
+ public function getTemplate()
44
+ {
45
+ return $this->template;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListTriggersResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListTriggersResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'trigger';
21
+ public $nextPageToken;
22
+ protected $triggerType = 'Google_Service_TagManager_Trigger';
23
+ protected $triggerDataType = 'array';
24
+
25
+ public function setNextPageToken($nextPageToken)
26
+ {
27
+ $this->nextPageToken = $nextPageToken;
28
+ }
29
+ public function getNextPageToken()
30
+ {
31
+ return $this->nextPageToken;
32
+ }
33
+ /**
34
+ * @param Google_Service_TagManager_Trigger[]
35
+ */
36
+ public function setTrigger($trigger)
37
+ {
38
+ $this->trigger = $trigger;
39
+ }
40
+ /**
41
+ * @return Google_Service_TagManager_Trigger[]
42
+ */
43
+ public function getTrigger()
44
+ {
45
+ return $this->trigger;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListUserPermissionsResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListUserPermissionsResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'userPermission';
21
+ public $nextPageToken;
22
+ protected $userPermissionType = 'Google_Service_TagManager_UserPermission';
23
+ protected $userPermissionDataType = 'array';
24
+
25
+ public function setNextPageToken($nextPageToken)
26
+ {
27
+ $this->nextPageToken = $nextPageToken;
28
+ }
29
+ public function getNextPageToken()
30
+ {
31
+ return $this->nextPageToken;
32
+ }
33
+ /**
34
+ * @param Google_Service_TagManager_UserPermission[]
35
+ */
36
+ public function setUserPermission($userPermission)
37
+ {
38
+ $this->userPermission = $userPermission;
39
+ }
40
+ /**
41
+ * @return Google_Service_TagManager_UserPermission[]
42
+ */
43
+ public function getUserPermission()
44
+ {
45
+ return $this->userPermission;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListVariablesResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListVariablesResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'variable';
21
+ public $nextPageToken;
22
+ protected $variableType = 'Google_Service_TagManager_Variable';
23
+ protected $variableDataType = 'array';
24
+
25
+ public function setNextPageToken($nextPageToken)
26
+ {
27
+ $this->nextPageToken = $nextPageToken;
28
+ }
29
+ public function getNextPageToken()
30
+ {
31
+ return $this->nextPageToken;
32
+ }
33
+ /**
34
+ * @param Google_Service_TagManager_Variable[]
35
+ */
36
+ public function setVariable($variable)
37
+ {
38
+ $this->variable = $variable;
39
+ }
40
+ /**
41
+ * @return Google_Service_TagManager_Variable[]
42
+ */
43
+ public function getVariable()
44
+ {
45
+ return $this->variable;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListWorkspacesResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListWorkspacesResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'workspace';
21
+ public $nextPageToken;
22
+ protected $workspaceType = 'Google_Service_TagManager_Workspace';
23
+ protected $workspaceDataType = 'array';
24
+
25
+ public function setNextPageToken($nextPageToken)
26
+ {
27
+ $this->nextPageToken = $nextPageToken;
28
+ }
29
+ public function getNextPageToken()
30
+ {
31
+ return $this->nextPageToken;
32
+ }
33
+ /**
34
+ * @param Google_Service_TagManager_Workspace[]
35
+ */
36
+ public function setWorkspace($workspace)
37
+ {
38
+ $this->workspace = $workspace;
39
+ }
40
+ /**
41
+ * @return Google_Service_TagManager_Workspace[]
42
+ */
43
+ public function getWorkspace()
44
+ {
45
+ return $this->workspace;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ListZonesResponse.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ListZonesResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'zone';
21
+ public $nextPageToken;
22
+ protected $zoneType = 'Google_Service_TagManager_Zone';
23
+ protected $zoneDataType = 'array';
24
+
25
+ public function setNextPageToken($nextPageToken)
26
+ {
27
+ $this->nextPageToken = $nextPageToken;
28
+ }
29
+ public function getNextPageToken()
30
+ {
31
+ return $this->nextPageToken;
32
+ }
33
+ /**
34
+ * @param Google_Service_TagManager_Zone[]
35
+ */
36
+ public function setZone($zone)
37
+ {
38
+ $this->zone = $zone;
39
+ }
40
+ /**
41
+ * @return Google_Service_TagManager_Zone[]
42
+ */
43
+ public function getZone()
44
+ {
45
+ return $this->zone;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/MergeConflict.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_MergeConflict extends Google_Model
19
+ {
20
+ protected $entityInBaseVersionType = 'Google_Service_TagManager_Entity';
21
+ protected $entityInBaseVersionDataType = '';
22
+ protected $entityInWorkspaceType = 'Google_Service_TagManager_Entity';
23
+ protected $entityInWorkspaceDataType = '';
24
+
25
+ /**
26
+ * @param Google_Service_TagManager_Entity
27
+ */
28
+ public function setEntityInBaseVersion(Google_Service_TagManager_Entity $entityInBaseVersion)
29
+ {
30
+ $this->entityInBaseVersion = $entityInBaseVersion;
31
+ }
32
+ /**
33
+ * @return Google_Service_TagManager_Entity
34
+ */
35
+ public function getEntityInBaseVersion()
36
+ {
37
+ return $this->entityInBaseVersion;
38
+ }
39
+ /**
40
+ * @param Google_Service_TagManager_Entity
41
+ */
42
+ public function setEntityInWorkspace(Google_Service_TagManager_Entity $entityInWorkspace)
43
+ {
44
+ $this->entityInWorkspace = $entityInWorkspace;
45
+ }
46
+ /**
47
+ * @return Google_Service_TagManager_Entity
48
+ */
49
+ public function getEntityInWorkspace()
50
+ {
51
+ return $this->entityInWorkspace;
52
+ }
53
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Parameter.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Parameter extends Google_Collection
19
+ {
20
+ protected $collection_key = 'map';
21
+ public $key;
22
+ protected $listType = 'Google_Service_TagManager_Parameter';
23
+ protected $listDataType = 'array';
24
+ protected $mapType = 'Google_Service_TagManager_Parameter';
25
+ protected $mapDataType = 'array';
26
+ public $type;
27
+ public $value;
28
+
29
+ public function setKey($key)
30
+ {
31
+ $this->key = $key;
32
+ }
33
+ public function getKey()
34
+ {
35
+ return $this->key;
36
+ }
37
+ /**
38
+ * @param Google_Service_TagManager_Parameter[]
39
+ */
40
+ public function setList($list)
41
+ {
42
+ $this->list = $list;
43
+ }
44
+ /**
45
+ * @return Google_Service_TagManager_Parameter[]
46
+ */
47
+ public function getList()
48
+ {
49
+ return $this->list;
50
+ }
51
+ /**
52
+ * @param Google_Service_TagManager_Parameter[]
53
+ */
54
+ public function setMap($map)
55
+ {
56
+ $this->map = $map;
57
+ }
58
+ /**
59
+ * @return Google_Service_TagManager_Parameter[]
60
+ */
61
+ public function getMap()
62
+ {
63
+ return $this->map;
64
+ }
65
+ public function setType($type)
66
+ {
67
+ $this->type = $type;
68
+ }
69
+ public function getType()
70
+ {
71
+ return $this->type;
72
+ }
73
+ public function setValue($value)
74
+ {
75
+ $this->value = $value;
76
+ }
77
+ public function getValue()
78
+ {
79
+ return $this->value;
80
+ }
81
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/PublishContainerVersionResponse.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_PublishContainerVersionResponse extends Google_Model
19
+ {
20
+ public $compilerError;
21
+ protected $containerVersionType = 'Google_Service_TagManager_ContainerVersion';
22
+ protected $containerVersionDataType = '';
23
+
24
+ public function setCompilerError($compilerError)
25
+ {
26
+ $this->compilerError = $compilerError;
27
+ }
28
+ public function getCompilerError()
29
+ {
30
+ return $this->compilerError;
31
+ }
32
+ /**
33
+ * @param Google_Service_TagManager_ContainerVersion
34
+ */
35
+ public function setContainerVersion(Google_Service_TagManager_ContainerVersion $containerVersion)
36
+ {
37
+ $this->containerVersion = $containerVersion;
38
+ }
39
+ /**
40
+ * @return Google_Service_TagManager_ContainerVersion
41
+ */
42
+ public function getContainerVersion()
43
+ {
44
+ return $this->containerVersion;
45
+ }
46
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/QuickPreviewResponse.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_QuickPreviewResponse extends Google_Model
19
+ {
20
+ public $compilerError;
21
+ protected $containerVersionType = 'Google_Service_TagManager_ContainerVersion';
22
+ protected $containerVersionDataType = '';
23
+ protected $syncStatusType = 'Google_Service_TagManager_SyncStatus';
24
+ protected $syncStatusDataType = '';
25
+
26
+ public function setCompilerError($compilerError)
27
+ {
28
+ $this->compilerError = $compilerError;
29
+ }
30
+ public function getCompilerError()
31
+ {
32
+ return $this->compilerError;
33
+ }
34
+ /**
35
+ * @param Google_Service_TagManager_ContainerVersion
36
+ */
37
+ public function setContainerVersion(Google_Service_TagManager_ContainerVersion $containerVersion)
38
+ {
39
+ $this->containerVersion = $containerVersion;
40
+ }
41
+ /**
42
+ * @return Google_Service_TagManager_ContainerVersion
43
+ */
44
+ public function getContainerVersion()
45
+ {
46
+ return $this->containerVersion;
47
+ }
48
+ /**
49
+ * @param Google_Service_TagManager_SyncStatus
50
+ */
51
+ public function setSyncStatus(Google_Service_TagManager_SyncStatus $syncStatus)
52
+ {
53
+ $this->syncStatus = $syncStatus;
54
+ }
55
+ /**
56
+ * @return Google_Service_TagManager_SyncStatus
57
+ */
58
+ public function getSyncStatus()
59
+ {
60
+ return $this->syncStatus;
61
+ }
62
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/Accounts.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "accounts" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $accounts = $tagmanagerService->accounts;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_Accounts extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Gets a GTM Account. (accounts.get)
30
+ *
31
+ * @param string $path GTM Accounts's API relative path. Example:
32
+ * accounts/{account_id}
33
+ * @param array $optParams Optional parameters.
34
+ * @return Google_Service_TagManager_Account
35
+ */
36
+ public function get($path, $optParams = array())
37
+ {
38
+ $params = array('path' => $path);
39
+ $params = array_merge($params, $optParams);
40
+ return $this->call('get', array($params), "Google_Service_TagManager_Account");
41
+ }
42
+ /**
43
+ * Lists all GTM Accounts that a user has access to. (accounts.listAccounts)
44
+ *
45
+ * @param array $optParams Optional parameters.
46
+ *
47
+ * @opt_param string pageToken Continuation token for fetching the next page of
48
+ * results.
49
+ * @return Google_Service_TagManager_ListAccountsResponse
50
+ */
51
+ public function listAccounts($optParams = array())
52
+ {
53
+ $params = array();
54
+ $params = array_merge($params, $optParams);
55
+ return $this->call('list', array($params), "Google_Service_TagManager_ListAccountsResponse");
56
+ }
57
+ /**
58
+ * Updates a GTM Account. (accounts.update)
59
+ *
60
+ * @param string $path GTM Accounts's API relative path. Example:
61
+ * accounts/{account_id}
62
+ * @param Google_Service_TagManager_Account $postBody
63
+ * @param array $optParams Optional parameters.
64
+ *
65
+ * @opt_param string fingerprint When provided, this fingerprint must match the
66
+ * fingerprint of the account in storage.
67
+ * @return Google_Service_TagManager_Account
68
+ */
69
+ public function update($path, Google_Service_TagManager_Account $postBody, $optParams = array())
70
+ {
71
+ $params = array('path' => $path, 'postBody' => $postBody);
72
+ $params = array_merge($params, $optParams);
73
+ return $this->call('update', array($params), "Google_Service_TagManager_Account");
74
+ }
75
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainers.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "containers" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $containers = $tagmanagerService->containers;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainers extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a Container. (containers.create)
30
+ *
31
+ * @param string $parent GTM Account's API relative path. Example:
32
+ * accounts/{account_id}.
33
+ * @param Google_Service_TagManager_Container $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_Container
36
+ */
37
+ public function create($parent, Google_Service_TagManager_Container $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_Container");
42
+ }
43
+ /**
44
+ * Deletes a Container. (containers.delete)
45
+ *
46
+ * @param string $path GTM Container's API relative path. Example:
47
+ * accounts/{account_id}/containers/{container_id}
48
+ * @param array $optParams Optional parameters.
49
+ */
50
+ public function delete($path, $optParams = array())
51
+ {
52
+ $params = array('path' => $path);
53
+ $params = array_merge($params, $optParams);
54
+ return $this->call('delete', array($params));
55
+ }
56
+ /**
57
+ * Gets a Container. (containers.get)
58
+ *
59
+ * @param string $path GTM Container's API relative path. Example:
60
+ * accounts/{account_id}/containers/{container_id}
61
+ * @param array $optParams Optional parameters.
62
+ * @return Google_Service_TagManager_Container
63
+ */
64
+ public function get($path, $optParams = array())
65
+ {
66
+ $params = array('path' => $path);
67
+ $params = array_merge($params, $optParams);
68
+ return $this->call('get', array($params), "Google_Service_TagManager_Container");
69
+ }
70
+ /**
71
+ * Lists all Containers that belongs to a GTM Account.
72
+ * (containers.listAccountsContainers)
73
+ *
74
+ * @param string $parent GTM Accounts's API relative path. Example:
75
+ * accounts/{account_id}.
76
+ * @param array $optParams Optional parameters.
77
+ *
78
+ * @opt_param string pageToken Continuation token for fetching the next page of
79
+ * results.
80
+ * @return Google_Service_TagManager_ListContainersResponse
81
+ */
82
+ public function listAccountsContainers($parent, $optParams = array())
83
+ {
84
+ $params = array('parent' => $parent);
85
+ $params = array_merge($params, $optParams);
86
+ return $this->call('list', array($params), "Google_Service_TagManager_ListContainersResponse");
87
+ }
88
+ /**
89
+ * Updates a Container. (containers.update)
90
+ *
91
+ * @param string $path GTM Container's API relative path. Example:
92
+ * accounts/{account_id}/containers/{container_id}
93
+ * @param Google_Service_TagManager_Container $postBody
94
+ * @param array $optParams Optional parameters.
95
+ *
96
+ * @opt_param string fingerprint When provided, this fingerprint must match the
97
+ * fingerprint of the container in storage.
98
+ * @return Google_Service_TagManager_Container
99
+ */
100
+ public function update($path, Google_Service_TagManager_Container $postBody, $optParams = array())
101
+ {
102
+ $params = array('path' => $path, 'postBody' => $postBody);
103
+ $params = array_merge($params, $optParams);
104
+ return $this->call('update', array($params), "Google_Service_TagManager_Container");
105
+ }
106
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersEnvironments.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "environments" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $environments = $tagmanagerService->environments;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersEnvironments extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a GTM Environment. (environments.create)
30
+ *
31
+ * @param string $parent GTM Container's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}
33
+ * @param Google_Service_TagManager_Environment $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_Environment
36
+ */
37
+ public function create($parent, Google_Service_TagManager_Environment $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_Environment");
42
+ }
43
+ /**
44
+ * Deletes a GTM Environment. (environments.delete)
45
+ *
46
+ * @param string $path GTM Environment's API relative path. Example:
47
+ * accounts/{account_id}/containers/{container_id}/environments/{environment_id}
48
+ * @param array $optParams Optional parameters.
49
+ */
50
+ public function delete($path, $optParams = array())
51
+ {
52
+ $params = array('path' => $path);
53
+ $params = array_merge($params, $optParams);
54
+ return $this->call('delete', array($params));
55
+ }
56
+ /**
57
+ * Gets a GTM Environment. (environments.get)
58
+ *
59
+ * @param string $path GTM Environment's API relative path. Example:
60
+ * accounts/{account_id}/containers/{container_id}/environments/{environment_id}
61
+ * @param array $optParams Optional parameters.
62
+ * @return Google_Service_TagManager_Environment
63
+ */
64
+ public function get($path, $optParams = array())
65
+ {
66
+ $params = array('path' => $path);
67
+ $params = array_merge($params, $optParams);
68
+ return $this->call('get', array($params), "Google_Service_TagManager_Environment");
69
+ }
70
+ /**
71
+ * Lists all GTM Environments of a GTM Container.
72
+ * (environments.listAccountsContainersEnvironments)
73
+ *
74
+ * @param string $parent GTM Container's API relative path. Example:
75
+ * accounts/{account_id}/containers/{container_id}
76
+ * @param array $optParams Optional parameters.
77
+ *
78
+ * @opt_param string pageToken Continuation token for fetching the next page of
79
+ * results.
80
+ * @return Google_Service_TagManager_ListEnvironmentsResponse
81
+ */
82
+ public function listAccountsContainersEnvironments($parent, $optParams = array())
83
+ {
84
+ $params = array('parent' => $parent);
85
+ $params = array_merge($params, $optParams);
86
+ return $this->call('list', array($params), "Google_Service_TagManager_ListEnvironmentsResponse");
87
+ }
88
+ /**
89
+ * Re-generates the authorization code for a GTM Environment.
90
+ * (environments.reauthorize)
91
+ *
92
+ * @param string $path GTM Environment's API relative path. Example:
93
+ * accounts/{account_id}/containers/{container_id}/environments/{environment_id}
94
+ * @param Google_Service_TagManager_Environment $postBody
95
+ * @param array $optParams Optional parameters.
96
+ * @return Google_Service_TagManager_Environment
97
+ */
98
+ public function reauthorize($path, Google_Service_TagManager_Environment $postBody, $optParams = array())
99
+ {
100
+ $params = array('path' => $path, 'postBody' => $postBody);
101
+ $params = array_merge($params, $optParams);
102
+ return $this->call('reauthorize', array($params), "Google_Service_TagManager_Environment");
103
+ }
104
+ /**
105
+ * Updates a GTM Environment. (environments.update)
106
+ *
107
+ * @param string $path GTM Environment's API relative path. Example:
108
+ * accounts/{account_id}/containers/{container_id}/environments/{environment_id}
109
+ * @param Google_Service_TagManager_Environment $postBody
110
+ * @param array $optParams Optional parameters.
111
+ *
112
+ * @opt_param string fingerprint When provided, this fingerprint must match the
113
+ * fingerprint of the environment in storage.
114
+ * @return Google_Service_TagManager_Environment
115
+ */
116
+ public function update($path, Google_Service_TagManager_Environment $postBody, $optParams = array())
117
+ {
118
+ $params = array('path' => $path, 'postBody' => $postBody);
119
+ $params = array_merge($params, $optParams);
120
+ return $this->call('update', array($params), "Google_Service_TagManager_Environment");
121
+ }
122
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersVersionHeaders.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "version_headers" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $version_headers = $tagmanagerService->version_headers;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersVersionHeaders extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Gets the latest container version header (version_headers.latest)
30
+ *
31
+ * @param string $parent GTM Container's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}
33
+ * @param array $optParams Optional parameters.
34
+ * @return Google_Service_TagManager_ContainerVersionHeader
35
+ */
36
+ public function latest($parent, $optParams = array())
37
+ {
38
+ $params = array('parent' => $parent);
39
+ $params = array_merge($params, $optParams);
40
+ return $this->call('latest', array($params), "Google_Service_TagManager_ContainerVersionHeader");
41
+ }
42
+ /**
43
+ * Lists all Container Versions of a GTM Container.
44
+ * (version_headers.listAccountsContainersVersionHeaders)
45
+ *
46
+ * @param string $parent GTM Container's API relative path. Example:
47
+ * accounts/{account_id}/containers/{container_id}
48
+ * @param array $optParams Optional parameters.
49
+ *
50
+ * @opt_param bool includeDeleted Also retrieve deleted (archived) versions when
51
+ * true.
52
+ * @opt_param string pageToken Continuation token for fetching the next page of
53
+ * results.
54
+ * @return Google_Service_TagManager_ListContainerVersionsResponse
55
+ */
56
+ public function listAccountsContainersVersionHeaders($parent, $optParams = array())
57
+ {
58
+ $params = array('parent' => $parent);
59
+ $params = array_merge($params, $optParams);
60
+ return $this->call('list', array($params), "Google_Service_TagManager_ListContainerVersionsResponse");
61
+ }
62
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersVersions.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "versions" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $versions = $tagmanagerService->versions;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersVersions extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Deletes a Container Version. (versions.delete)
30
+ *
31
+ * @param string $path GTM ContainerVersion's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}/versions/{version_id}
33
+ * @param array $optParams Optional parameters.
34
+ */
35
+ public function delete($path, $optParams = array())
36
+ {
37
+ $params = array('path' => $path);
38
+ $params = array_merge($params, $optParams);
39
+ return $this->call('delete', array($params));
40
+ }
41
+ /**
42
+ * Gets a Container Version. (versions.get)
43
+ *
44
+ * @param string $path GTM ContainerVersion's API relative path. Example:
45
+ * accounts/{account_id}/containers/{container_id}/versions/{version_id}
46
+ * @param array $optParams Optional parameters.
47
+ *
48
+ * @opt_param string containerVersionId The GTM ContainerVersion ID. Specify
49
+ * published to retrieve the currently published version.
50
+ * @return Google_Service_TagManager_ContainerVersion
51
+ */
52
+ public function get($path, $optParams = array())
53
+ {
54
+ $params = array('path' => $path);
55
+ $params = array_merge($params, $optParams);
56
+ return $this->call('get', array($params), "Google_Service_TagManager_ContainerVersion");
57
+ }
58
+ /**
59
+ * Gets the live (i.e. published) container version (versions.live)
60
+ *
61
+ * @param string $parent GTM Container's API relative path. Example:
62
+ * accounts/{account_id}/containers/{container_id}
63
+ * @param array $optParams Optional parameters.
64
+ * @return Google_Service_TagManager_ContainerVersion
65
+ */
66
+ public function live($parent, $optParams = array())
67
+ {
68
+ $params = array('parent' => $parent);
69
+ $params = array_merge($params, $optParams);
70
+ return $this->call('live', array($params), "Google_Service_TagManager_ContainerVersion");
71
+ }
72
+ /**
73
+ * Publishes a Container Version. (versions.publish)
74
+ *
75
+ * @param string $path GTM ContainerVersion's API relative path. Example:
76
+ * accounts/{account_id}/containers/{container_id}/versions/{version_id}
77
+ * @param array $optParams Optional parameters.
78
+ *
79
+ * @opt_param string fingerprint When provided, this fingerprint must match the
80
+ * fingerprint of the container version in storage.
81
+ * @return Google_Service_TagManager_PublishContainerVersionResponse
82
+ */
83
+ public function publish($path, $optParams = array())
84
+ {
85
+ $params = array('path' => $path);
86
+ $params = array_merge($params, $optParams);
87
+ return $this->call('publish', array($params), "Google_Service_TagManager_PublishContainerVersionResponse");
88
+ }
89
+ /**
90
+ * Sets the latest version used for synchronization of workspaces when detecting
91
+ * conflicts and errors. (versions.set_latest)
92
+ *
93
+ * @param string $path GTM ContainerVersion's API relative path. Example:
94
+ * accounts/{account_id}/containers/{container_id}/versions/{version_id}
95
+ * @param array $optParams Optional parameters.
96
+ * @return Google_Service_TagManager_ContainerVersion
97
+ */
98
+ public function set_latest($path, $optParams = array())
99
+ {
100
+ $params = array('path' => $path);
101
+ $params = array_merge($params, $optParams);
102
+ return $this->call('set_latest', array($params), "Google_Service_TagManager_ContainerVersion");
103
+ }
104
+ /**
105
+ * Undeletes a Container Version. (versions.undelete)
106
+ *
107
+ * @param string $path GTM ContainerVersion's API relative path. Example:
108
+ * accounts/{account_id}/containers/{container_id}/versions/{version_id}
109
+ * @param array $optParams Optional parameters.
110
+ * @return Google_Service_TagManager_ContainerVersion
111
+ */
112
+ public function undelete($path, $optParams = array())
113
+ {
114
+ $params = array('path' => $path);
115
+ $params = array_merge($params, $optParams);
116
+ return $this->call('undelete', array($params), "Google_Service_TagManager_ContainerVersion");
117
+ }
118
+ /**
119
+ * Updates a Container Version. (versions.update)
120
+ *
121
+ * @param string $path GTM ContainerVersion's API relative path. Example:
122
+ * accounts/{account_id}/containers/{container_id}/versions/{version_id}
123
+ * @param Google_Service_TagManager_ContainerVersion $postBody
124
+ * @param array $optParams Optional parameters.
125
+ *
126
+ * @opt_param string fingerprint When provided, this fingerprint must match the
127
+ * fingerprint of the container version in storage.
128
+ * @return Google_Service_TagManager_ContainerVersion
129
+ */
130
+ public function update($path, Google_Service_TagManager_ContainerVersion $postBody, $optParams = array())
131
+ {
132
+ $params = array('path' => $path, 'postBody' => $postBody);
133
+ $params = array_merge($params, $optParams);
134
+ return $this->call('update', array($params), "Google_Service_TagManager_ContainerVersion");
135
+ }
136
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspaces.php ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "workspaces" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $workspaces = $tagmanagerService->workspaces;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersWorkspaces extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a Workspace. (workspaces.create)
30
+ *
31
+ * @param string $parent GTM parent Container's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}
33
+ * @param Google_Service_TagManager_Workspace $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_Workspace
36
+ */
37
+ public function create($parent, Google_Service_TagManager_Workspace $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_Workspace");
42
+ }
43
+ /**
44
+ * Creates a Container Version from the entities present in the workspace,
45
+ * deletes the workspace, and sets the base container version to the newly
46
+ * created version. (workspaces.create_version)
47
+ *
48
+ * @param string $path GTM Workspace's API relative path. Example:
49
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
50
+ * @param Google_Service_TagManager_CreateContainerVersionRequestVersionOptions $postBody
51
+ * @param array $optParams Optional parameters.
52
+ * @return Google_Service_TagManager_CreateContainerVersionResponse
53
+ */
54
+ public function create_version($path, Google_Service_TagManager_CreateContainerVersionRequestVersionOptions $postBody, $optParams = array())
55
+ {
56
+ $params = array('path' => $path, 'postBody' => $postBody);
57
+ $params = array_merge($params, $optParams);
58
+ return $this->call('create_version', array($params), "Google_Service_TagManager_CreateContainerVersionResponse");
59
+ }
60
+ /**
61
+ * Deletes a Workspace. (workspaces.delete)
62
+ *
63
+ * @param string $path GTM Workspace's API relative path. Example:
64
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
65
+ * @param array $optParams Optional parameters.
66
+ */
67
+ public function delete($path, $optParams = array())
68
+ {
69
+ $params = array('path' => $path);
70
+ $params = array_merge($params, $optParams);
71
+ return $this->call('delete', array($params));
72
+ }
73
+ /**
74
+ * Gets a Workspace. (workspaces.get)
75
+ *
76
+ * @param string $path GTM Workspace's API relative path. Example:
77
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
78
+ * @param array $optParams Optional parameters.
79
+ * @return Google_Service_TagManager_Workspace
80
+ */
81
+ public function get($path, $optParams = array())
82
+ {
83
+ $params = array('path' => $path);
84
+ $params = array_merge($params, $optParams);
85
+ return $this->call('get', array($params), "Google_Service_TagManager_Workspace");
86
+ }
87
+ /**
88
+ * Finds conflicting and modified entities in the workspace.
89
+ * (workspaces.getStatus)
90
+ *
91
+ * @param string $path GTM Workspace's API relative path. Example:
92
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
93
+ * @param array $optParams Optional parameters.
94
+ * @return Google_Service_TagManager_GetWorkspaceStatusResponse
95
+ */
96
+ public function getStatus($path, $optParams = array())
97
+ {
98
+ $params = array('path' => $path);
99
+ $params = array_merge($params, $optParams);
100
+ return $this->call('getStatus', array($params), "Google_Service_TagManager_GetWorkspaceStatusResponse");
101
+ }
102
+ /**
103
+ * Lists all Workspaces that belong to a GTM Container.
104
+ * (workspaces.listAccountsContainersWorkspaces)
105
+ *
106
+ * @param string $parent GTM parent Container's API relative path. Example:
107
+ * accounts/{account_id}/containers/{container_id}
108
+ * @param array $optParams Optional parameters.
109
+ *
110
+ * @opt_param string pageToken Continuation token for fetching the next page of
111
+ * results.
112
+ * @return Google_Service_TagManager_ListWorkspacesResponse
113
+ */
114
+ public function listAccountsContainersWorkspaces($parent, $optParams = array())
115
+ {
116
+ $params = array('parent' => $parent);
117
+ $params = array_merge($params, $optParams);
118
+ return $this->call('list', array($params), "Google_Service_TagManager_ListWorkspacesResponse");
119
+ }
120
+ /**
121
+ * Quick previews a workspace by creating a fake container version from all
122
+ * entities in the provided workspace. (workspaces.quick_preview)
123
+ *
124
+ * @param string $path GTM Workspace's API relative path. Example:
125
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
126
+ * @param array $optParams Optional parameters.
127
+ * @return Google_Service_TagManager_QuickPreviewResponse
128
+ */
129
+ public function quick_preview($path, $optParams = array())
130
+ {
131
+ $params = array('path' => $path);
132
+ $params = array_merge($params, $optParams);
133
+ return $this->call('quick_preview', array($params), "Google_Service_TagManager_QuickPreviewResponse");
134
+ }
135
+ /**
136
+ * Resolves a merge conflict for a workspace entity by updating it to the
137
+ * resolved entity passed in the request. (workspaces.resolve_conflict)
138
+ *
139
+ * @param string $path GTM Workspace's API relative path. Example:
140
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
141
+ * @param Google_Service_TagManager_Entity $postBody
142
+ * @param array $optParams Optional parameters.
143
+ *
144
+ * @opt_param string fingerprint When provided, this fingerprint must match the
145
+ * fingerprint of the entity_in_workspace in the merge conflict.
146
+ */
147
+ public function resolve_conflict($path, Google_Service_TagManager_Entity $postBody, $optParams = array())
148
+ {
149
+ $params = array('path' => $path, 'postBody' => $postBody);
150
+ $params = array_merge($params, $optParams);
151
+ return $this->call('resolve_conflict', array($params));
152
+ }
153
+ /**
154
+ * Syncs a workspace to the latest container version by updating all unmodified
155
+ * workspace entities and displaying conflicts for modified entities.
156
+ * (workspaces.sync)
157
+ *
158
+ * @param string $path GTM Workspace's API relative path. Example:
159
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
160
+ * @param array $optParams Optional parameters.
161
+ * @return Google_Service_TagManager_SyncWorkspaceResponse
162
+ */
163
+ public function sync($path, $optParams = array())
164
+ {
165
+ $params = array('path' => $path);
166
+ $params = array_merge($params, $optParams);
167
+ return $this->call('sync', array($params), "Google_Service_TagManager_SyncWorkspaceResponse");
168
+ }
169
+ /**
170
+ * Updates a Workspace. (workspaces.update)
171
+ *
172
+ * @param string $path GTM Workspace's API relative path. Example:
173
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
174
+ * @param Google_Service_TagManager_Workspace $postBody
175
+ * @param array $optParams Optional parameters.
176
+ *
177
+ * @opt_param string fingerprint When provided, this fingerprint must match the
178
+ * fingerprint of the workspace in storage.
179
+ * @return Google_Service_TagManager_Workspace
180
+ */
181
+ public function update($path, Google_Service_TagManager_Workspace $postBody, $optParams = array())
182
+ {
183
+ $params = array('path' => $path, 'postBody' => $postBody);
184
+ $params = array_merge($params, $optParams);
185
+ return $this->call('update', array($params), "Google_Service_TagManager_Workspace");
186
+ }
187
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesBuiltInVariables.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "built_in_variables" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $built_in_variables = $tagmanagerService->built_in_variables;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersWorkspacesBuiltInVariables extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates one or more GTM Built-In Variables. (built_in_variables.create)
30
+ *
31
+ * @param string $parent GTM Workspace's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
33
+ * @param array $optParams Optional parameters.
34
+ *
35
+ * @opt_param string type The types of built-in variables to enable.
36
+ * @return Google_Service_TagManager_CreateBuiltInVariableResponse
37
+ */
38
+ public function create($parent, $optParams = array())
39
+ {
40
+ $params = array('parent' => $parent);
41
+ $params = array_merge($params, $optParams);
42
+ return $this->call('create', array($params), "Google_Service_TagManager_CreateBuiltInVariableResponse");
43
+ }
44
+ /**
45
+ * Deletes one or more GTM Built-In Variables. (built_in_variables.delete)
46
+ *
47
+ * @param string $path GTM BuiltInVariable's API relative path. Example: account
48
+ * s/{account_id}/containers/{container_id}/workspaces/{workspace_id}/built_in_v
49
+ * ariables
50
+ * @param array $optParams Optional parameters.
51
+ *
52
+ * @opt_param string type The types of built-in variables to delete.
53
+ */
54
+ public function delete($path, $optParams = array())
55
+ {
56
+ $params = array('path' => $path);
57
+ $params = array_merge($params, $optParams);
58
+ return $this->call('delete', array($params));
59
+ }
60
+ /**
61
+ * Lists all the enabled Built-In Variables of a GTM Container.
62
+ * (built_in_variables.listAccountsContainersWorkspacesBuiltInVariables)
63
+ *
64
+ * @param string $parent GTM Workspace's API relative path. Example:
65
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
66
+ * @param array $optParams Optional parameters.
67
+ *
68
+ * @opt_param string pageToken Continuation token for fetching the next page of
69
+ * results.
70
+ * @return Google_Service_TagManager_ListEnabledBuiltInVariablesResponse
71
+ */
72
+ public function listAccountsContainersWorkspacesBuiltInVariables($parent, $optParams = array())
73
+ {
74
+ $params = array('parent' => $parent);
75
+ $params = array_merge($params, $optParams);
76
+ return $this->call('list', array($params), "Google_Service_TagManager_ListEnabledBuiltInVariablesResponse");
77
+ }
78
+ /**
79
+ * Reverts changes to a GTM Built-In Variables in a GTM Workspace.
80
+ * (built_in_variables.revert)
81
+ *
82
+ * @param string $path GTM BuiltInVariable's API relative path. Example: account
83
+ * s/{account_id}/containers/{container_id}/workspaces/{workspace_id}/built_in_v
84
+ * ariables
85
+ * @param array $optParams Optional parameters.
86
+ *
87
+ * @opt_param string type The type of built-in variable to revert.
88
+ * @return Google_Service_TagManager_RevertBuiltInVariableResponse
89
+ */
90
+ public function revert($path, $optParams = array())
91
+ {
92
+ $params = array('path' => $path);
93
+ $params = array_merge($params, $optParams);
94
+ return $this->call('revert', array($params), "Google_Service_TagManager_RevertBuiltInVariableResponse");
95
+ }
96
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesFolders.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "folders" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $folders = $tagmanagerService->folders;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersWorkspacesFolders extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a GTM Folder. (folders.create)
30
+ *
31
+ * @param string $parent GTM Workspace's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
33
+ * @param Google_Service_TagManager_Folder $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_Folder
36
+ */
37
+ public function create($parent, Google_Service_TagManager_Folder $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_Folder");
42
+ }
43
+ /**
44
+ * Deletes a GTM Folder. (folders.delete)
45
+ *
46
+ * @param string $path GTM Folder's API relative path. Example: accounts/{accoun
47
+ * t_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}
48
+ * @param array $optParams Optional parameters.
49
+ */
50
+ public function delete($path, $optParams = array())
51
+ {
52
+ $params = array('path' => $path);
53
+ $params = array_merge($params, $optParams);
54
+ return $this->call('delete', array($params));
55
+ }
56
+ /**
57
+ * List all entities in a GTM Folder. (folders.entities)
58
+ *
59
+ * @param string $path GTM Folder's API relative path. Example: accounts/{accoun
60
+ * t_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}
61
+ * @param array $optParams Optional parameters.
62
+ *
63
+ * @opt_param string pageToken Continuation token for fetching the next page of
64
+ * results.
65
+ * @return Google_Service_TagManager_FolderEntities
66
+ */
67
+ public function entities($path, $optParams = array())
68
+ {
69
+ $params = array('path' => $path);
70
+ $params = array_merge($params, $optParams);
71
+ return $this->call('entities', array($params), "Google_Service_TagManager_FolderEntities");
72
+ }
73
+ /**
74
+ * Gets a GTM Folder. (folders.get)
75
+ *
76
+ * @param string $path GTM Folder's API relative path. Example: accounts/{accoun
77
+ * t_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}
78
+ * @param array $optParams Optional parameters.
79
+ * @return Google_Service_TagManager_Folder
80
+ */
81
+ public function get($path, $optParams = array())
82
+ {
83
+ $params = array('path' => $path);
84
+ $params = array_merge($params, $optParams);
85
+ return $this->call('get', array($params), "Google_Service_TagManager_Folder");
86
+ }
87
+ /**
88
+ * Lists all GTM Folders of a Container.
89
+ * (folders.listAccountsContainersWorkspacesFolders)
90
+ *
91
+ * @param string $parent GTM Workspace's API relative path. Example:
92
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
93
+ * @param array $optParams Optional parameters.
94
+ *
95
+ * @opt_param string pageToken Continuation token for fetching the next page of
96
+ * results.
97
+ * @return Google_Service_TagManager_ListFoldersResponse
98
+ */
99
+ public function listAccountsContainersWorkspacesFolders($parent, $optParams = array())
100
+ {
101
+ $params = array('parent' => $parent);
102
+ $params = array_merge($params, $optParams);
103
+ return $this->call('list', array($params), "Google_Service_TagManager_ListFoldersResponse");
104
+ }
105
+ /**
106
+ * Moves entities to a GTM Folder. (folders.move_entities_to_folder)
107
+ *
108
+ * @param string $path GTM Folder's API relative path. Example: accounts/{accoun
109
+ * t_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}
110
+ * @param Google_Service_TagManager_Folder $postBody
111
+ * @param array $optParams Optional parameters.
112
+ *
113
+ * @opt_param string tagId The tags to be moved to the folder.
114
+ * @opt_param string triggerId The triggers to be moved to the folder.
115
+ * @opt_param string variableId The variables to be moved to the folder.
116
+ */
117
+ public function move_entities_to_folder($path, Google_Service_TagManager_Folder $postBody, $optParams = array())
118
+ {
119
+ $params = array('path' => $path, 'postBody' => $postBody);
120
+ $params = array_merge($params, $optParams);
121
+ return $this->call('move_entities_to_folder', array($params));
122
+ }
123
+ /**
124
+ * Reverts changes to a GTM Folder in a GTM Workspace. (folders.revert)
125
+ *
126
+ * @param string $path GTM Folder's API relative path. Example: accounts/{accoun
127
+ * t_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}
128
+ * @param array $optParams Optional parameters.
129
+ *
130
+ * @opt_param string fingerprint When provided, this fingerprint must match the
131
+ * fingerprint of the tag in storage.
132
+ * @return Google_Service_TagManager_RevertFolderResponse
133
+ */
134
+ public function revert($path, $optParams = array())
135
+ {
136
+ $params = array('path' => $path);
137
+ $params = array_merge($params, $optParams);
138
+ return $this->call('revert', array($params), "Google_Service_TagManager_RevertFolderResponse");
139
+ }
140
+ /**
141
+ * Updates a GTM Folder. (folders.update)
142
+ *
143
+ * @param string $path GTM Folder's API relative path. Example: accounts/{accoun
144
+ * t_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}
145
+ * @param Google_Service_TagManager_Folder $postBody
146
+ * @param array $optParams Optional parameters.
147
+ *
148
+ * @opt_param string fingerprint When provided, this fingerprint must match the
149
+ * fingerprint of the folder in storage.
150
+ * @return Google_Service_TagManager_Folder
151
+ */
152
+ public function update($path, Google_Service_TagManager_Folder $postBody, $optParams = array())
153
+ {
154
+ $params = array('path' => $path, 'postBody' => $postBody);
155
+ $params = array_merge($params, $optParams);
156
+ return $this->call('update', array($params), "Google_Service_TagManager_Folder");
157
+ }
158
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesTags.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "tags" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $tags = $tagmanagerService->tags;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersWorkspacesTags extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a GTM Tag. (tags.create)
30
+ *
31
+ * @param string $parent GTM Workspace's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
33
+ * @param Google_Service_TagManager_Tag $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_Tag
36
+ */
37
+ public function create($parent, Google_Service_TagManager_Tag $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_Tag");
42
+ }
43
+ /**
44
+ * Deletes a GTM Tag. (tags.delete)
45
+ *
46
+ * @param string $path GTM Tag's API relative path. Example: accounts/{account_i
47
+ * d}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}
48
+ * @param array $optParams Optional parameters.
49
+ */
50
+ public function delete($path, $optParams = array())
51
+ {
52
+ $params = array('path' => $path);
53
+ $params = array_merge($params, $optParams);
54
+ return $this->call('delete', array($params));
55
+ }
56
+ /**
57
+ * Gets a GTM Tag. (tags.get)
58
+ *
59
+ * @param string $path GTM Tag's API relative path. Example: accounts/{account_i
60
+ * d}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}
61
+ * @param array $optParams Optional parameters.
62
+ * @return Google_Service_TagManager_Tag
63
+ */
64
+ public function get($path, $optParams = array())
65
+ {
66
+ $params = array('path' => $path);
67
+ $params = array_merge($params, $optParams);
68
+ return $this->call('get', array($params), "Google_Service_TagManager_Tag");
69
+ }
70
+ /**
71
+ * Lists all GTM Tags of a Container.
72
+ * (tags.listAccountsContainersWorkspacesTags)
73
+ *
74
+ * @param string $parent GTM Workspace's API relative path. Example:
75
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
76
+ * @param array $optParams Optional parameters.
77
+ *
78
+ * @opt_param string pageToken Continuation token for fetching the next page of
79
+ * results.
80
+ * @return Google_Service_TagManager_ListTagsResponse
81
+ */
82
+ public function listAccountsContainersWorkspacesTags($parent, $optParams = array())
83
+ {
84
+ $params = array('parent' => $parent);
85
+ $params = array_merge($params, $optParams);
86
+ return $this->call('list', array($params), "Google_Service_TagManager_ListTagsResponse");
87
+ }
88
+ /**
89
+ * Reverts changes to a GTM Tag in a GTM Workspace. (tags.revert)
90
+ *
91
+ * @param string $path GTM Tag's API relative path. Example: accounts/{account_i
92
+ * d}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}
93
+ * @param array $optParams Optional parameters.
94
+ *
95
+ * @opt_param string fingerprint When provided, this fingerprint must match the
96
+ * fingerprint of thetag in storage.
97
+ * @return Google_Service_TagManager_RevertTagResponse
98
+ */
99
+ public function revert($path, $optParams = array())
100
+ {
101
+ $params = array('path' => $path);
102
+ $params = array_merge($params, $optParams);
103
+ return $this->call('revert', array($params), "Google_Service_TagManager_RevertTagResponse");
104
+ }
105
+ /**
106
+ * Updates a GTM Tag. (tags.update)
107
+ *
108
+ * @param string $path GTM Tag's API relative path. Example: accounts/{account_i
109
+ * d}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}
110
+ * @param Google_Service_TagManager_Tag $postBody
111
+ * @param array $optParams Optional parameters.
112
+ *
113
+ * @opt_param string fingerprint When provided, this fingerprint must match the
114
+ * fingerprint of the tag in storage.
115
+ * @return Google_Service_TagManager_Tag
116
+ */
117
+ public function update($path, Google_Service_TagManager_Tag $postBody, $optParams = array())
118
+ {
119
+ $params = array('path' => $path, 'postBody' => $postBody);
120
+ $params = array_merge($params, $optParams);
121
+ return $this->call('update', array($params), "Google_Service_TagManager_Tag");
122
+ }
123
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesTemplates.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "templates" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $templates = $tagmanagerService->templates;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersWorkspacesTemplates extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a GTM Custom Template. (templates.create)
30
+ *
31
+ * @param string $parent GTM Workspace's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
33
+ * @param Google_Service_TagManager_CustomTemplate $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_CustomTemplate
36
+ */
37
+ public function create($parent, Google_Service_TagManager_CustomTemplate $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_CustomTemplate");
42
+ }
43
+ /**
44
+ * Deletes a GTM Template. (templates.delete)
45
+ *
46
+ * @param string $path GTM Custom Template's API relative path. Example: account
47
+ * s/{account_id}/containers/{container_id}/workspaces/{workspace_id}/templates/
48
+ * {template_id}
49
+ * @param array $optParams Optional parameters.
50
+ */
51
+ public function delete($path, $optParams = array())
52
+ {
53
+ $params = array('path' => $path);
54
+ $params = array_merge($params, $optParams);
55
+ return $this->call('delete', array($params));
56
+ }
57
+ /**
58
+ * Gets a GTM Template. (templates.get)
59
+ *
60
+ * @param string $path GTM Custom Template's API relative path. Example: account
61
+ * s/{account_id}/containers/{container_id}/workspaces/{workspace_id}/templates/
62
+ * {template_id}
63
+ * @param array $optParams Optional parameters.
64
+ * @return Google_Service_TagManager_CustomTemplate
65
+ */
66
+ public function get($path, $optParams = array())
67
+ {
68
+ $params = array('path' => $path);
69
+ $params = array_merge($params, $optParams);
70
+ return $this->call('get', array($params), "Google_Service_TagManager_CustomTemplate");
71
+ }
72
+ /**
73
+ * Lists all GTM Templates of a GTM container workspace.
74
+ * (templates.listAccountsContainersWorkspacesTemplates)
75
+ *
76
+ * @param string $parent GTM Workspace's API relative path. Example:
77
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
78
+ * @param array $optParams Optional parameters.
79
+ *
80
+ * @opt_param string pageToken Continuation token for fetching the next page of
81
+ * results.
82
+ * @return Google_Service_TagManager_ListTemplatesResponse
83
+ */
84
+ public function listAccountsContainersWorkspacesTemplates($parent, $optParams = array())
85
+ {
86
+ $params = array('parent' => $parent);
87
+ $params = array_merge($params, $optParams);
88
+ return $this->call('list', array($params), "Google_Service_TagManager_ListTemplatesResponse");
89
+ }
90
+ /**
91
+ * Reverts changes to a GTM Template in a GTM Workspace. (templates.revert)
92
+ *
93
+ * @param string $path GTM Custom Template's API relative path. Example: account
94
+ * s/{account_id}/containers/{container_id}/workspaces/{workspace_id}/templates/
95
+ * {template_id}
96
+ * @param array $optParams Optional parameters.
97
+ *
98
+ * @opt_param string fingerprint When provided, this fingerprint must match the
99
+ * fingerprint of the template in storage.
100
+ * @return Google_Service_TagManager_RevertTemplateResponse
101
+ */
102
+ public function revert($path, $optParams = array())
103
+ {
104
+ $params = array('path' => $path);
105
+ $params = array_merge($params, $optParams);
106
+ return $this->call('revert', array($params), "Google_Service_TagManager_RevertTemplateResponse");
107
+ }
108
+ /**
109
+ * Updates a GTM Template. (templates.update)
110
+ *
111
+ * @param string $path GTM Custom Template's API relative path. Example: account
112
+ * s/{account_id}/containers/{container_id}/workspaces/{workspace_id}/templates/
113
+ * {template_id}
114
+ * @param Google_Service_TagManager_CustomTemplate $postBody
115
+ * @param array $optParams Optional parameters.
116
+ *
117
+ * @opt_param string fingerprint When provided, this fingerprint must match the
118
+ * fingerprint of the templates in storage.
119
+ * @return Google_Service_TagManager_CustomTemplate
120
+ */
121
+ public function update($path, Google_Service_TagManager_CustomTemplate $postBody, $optParams = array())
122
+ {
123
+ $params = array('path' => $path, 'postBody' => $postBody);
124
+ $params = array_merge($params, $optParams);
125
+ return $this->call('update', array($params), "Google_Service_TagManager_CustomTemplate");
126
+ }
127
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesTriggers.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "triggers" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $triggers = $tagmanagerService->triggers;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersWorkspacesTriggers extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a GTM Trigger. (triggers.create)
30
+ *
31
+ * @param string $parent GTM Workspaces's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
33
+ * @param Google_Service_TagManager_Trigger $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_Trigger
36
+ */
37
+ public function create($parent, Google_Service_TagManager_Trigger $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_Trigger");
42
+ }
43
+ /**
44
+ * Deletes a GTM Trigger. (triggers.delete)
45
+ *
46
+ * @param string $path GTM Trigger's API relative path. Example: accounts/{accou
47
+ * nt_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_
48
+ * id}
49
+ * @param array $optParams Optional parameters.
50
+ */
51
+ public function delete($path, $optParams = array())
52
+ {
53
+ $params = array('path' => $path);
54
+ $params = array_merge($params, $optParams);
55
+ return $this->call('delete', array($params));
56
+ }
57
+ /**
58
+ * Gets a GTM Trigger. (triggers.get)
59
+ *
60
+ * @param string $path GTM Trigger's API relative path. Example: accounts/{accou
61
+ * nt_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_
62
+ * id}
63
+ * @param array $optParams Optional parameters.
64
+ * @return Google_Service_TagManager_Trigger
65
+ */
66
+ public function get($path, $optParams = array())
67
+ {
68
+ $params = array('path' => $path);
69
+ $params = array_merge($params, $optParams);
70
+ return $this->call('get', array($params), "Google_Service_TagManager_Trigger");
71
+ }
72
+ /**
73
+ * Lists all GTM Triggers of a Container.
74
+ * (triggers.listAccountsContainersWorkspacesTriggers)
75
+ *
76
+ * @param string $parent GTM Workspaces's API relative path. Example:
77
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
78
+ * @param array $optParams Optional parameters.
79
+ *
80
+ * @opt_param string pageToken Continuation token for fetching the next page of
81
+ * results.
82
+ * @return Google_Service_TagManager_ListTriggersResponse
83
+ */
84
+ public function listAccountsContainersWorkspacesTriggers($parent, $optParams = array())
85
+ {
86
+ $params = array('parent' => $parent);
87
+ $params = array_merge($params, $optParams);
88
+ return $this->call('list', array($params), "Google_Service_TagManager_ListTriggersResponse");
89
+ }
90
+ /**
91
+ * Reverts changes to a GTM Trigger in a GTM Workspace. (triggers.revert)
92
+ *
93
+ * @param string $path GTM Trigger's API relative path. Example: accounts/{accou
94
+ * nt_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_
95
+ * id}
96
+ * @param array $optParams Optional parameters.
97
+ *
98
+ * @opt_param string fingerprint When provided, this fingerprint must match the
99
+ * fingerprint of the trigger in storage.
100
+ * @return Google_Service_TagManager_RevertTriggerResponse
101
+ */
102
+ public function revert($path, $optParams = array())
103
+ {
104
+ $params = array('path' => $path);
105
+ $params = array_merge($params, $optParams);
106
+ return $this->call('revert', array($params), "Google_Service_TagManager_RevertTriggerResponse");
107
+ }
108
+ /**
109
+ * Updates a GTM Trigger. (triggers.update)
110
+ *
111
+ * @param string $path GTM Trigger's API relative path. Example: accounts/{accou
112
+ * nt_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_
113
+ * id}
114
+ * @param Google_Service_TagManager_Trigger $postBody
115
+ * @param array $optParams Optional parameters.
116
+ *
117
+ * @opt_param string fingerprint When provided, this fingerprint must match the
118
+ * fingerprint of the trigger in storage.
119
+ * @return Google_Service_TagManager_Trigger
120
+ */
121
+ public function update($path, Google_Service_TagManager_Trigger $postBody, $optParams = array())
122
+ {
123
+ $params = array('path' => $path, 'postBody' => $postBody);
124
+ $params = array_merge($params, $optParams);
125
+ return $this->call('update', array($params), "Google_Service_TagManager_Trigger");
126
+ }
127
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesVariables.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "variables" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $variables = $tagmanagerService->variables;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersWorkspacesVariables extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a GTM Variable. (variables.create)
30
+ *
31
+ * @param string $parent GTM Workspace's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
33
+ * @param Google_Service_TagManager_Variable $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_Variable
36
+ */
37
+ public function create($parent, Google_Service_TagManager_Variable $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_Variable");
42
+ }
43
+ /**
44
+ * Deletes a GTM Variable. (variables.delete)
45
+ *
46
+ * @param string $path GTM Variable's API relative path. Example: accounts/{acco
47
+ * unt_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variab
48
+ * le_id}
49
+ * @param array $optParams Optional parameters.
50
+ */
51
+ public function delete($path, $optParams = array())
52
+ {
53
+ $params = array('path' => $path);
54
+ $params = array_merge($params, $optParams);
55
+ return $this->call('delete', array($params));
56
+ }
57
+ /**
58
+ * Gets a GTM Variable. (variables.get)
59
+ *
60
+ * @param string $path GTM Variable's API relative path. Example: accounts/{acco
61
+ * unt_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variab
62
+ * le_id}
63
+ * @param array $optParams Optional parameters.
64
+ * @return Google_Service_TagManager_Variable
65
+ */
66
+ public function get($path, $optParams = array())
67
+ {
68
+ $params = array('path' => $path);
69
+ $params = array_merge($params, $optParams);
70
+ return $this->call('get', array($params), "Google_Service_TagManager_Variable");
71
+ }
72
+ /**
73
+ * Lists all GTM Variables of a Container.
74
+ * (variables.listAccountsContainersWorkspacesVariables)
75
+ *
76
+ * @param string $parent GTM Workspace's API relative path. Example:
77
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
78
+ * @param array $optParams Optional parameters.
79
+ *
80
+ * @opt_param string pageToken Continuation token for fetching the next page of
81
+ * results.
82
+ * @return Google_Service_TagManager_ListVariablesResponse
83
+ */
84
+ public function listAccountsContainersWorkspacesVariables($parent, $optParams = array())
85
+ {
86
+ $params = array('parent' => $parent);
87
+ $params = array_merge($params, $optParams);
88
+ return $this->call('list', array($params), "Google_Service_TagManager_ListVariablesResponse");
89
+ }
90
+ /**
91
+ * Reverts changes to a GTM Variable in a GTM Workspace. (variables.revert)
92
+ *
93
+ * @param string $path GTM Variable's API relative path. Example: accounts/{acco
94
+ * unt_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variab
95
+ * le_id}
96
+ * @param array $optParams Optional parameters.
97
+ *
98
+ * @opt_param string fingerprint When provided, this fingerprint must match the
99
+ * fingerprint of the variable in storage.
100
+ * @return Google_Service_TagManager_RevertVariableResponse
101
+ */
102
+ public function revert($path, $optParams = array())
103
+ {
104
+ $params = array('path' => $path);
105
+ $params = array_merge($params, $optParams);
106
+ return $this->call('revert', array($params), "Google_Service_TagManager_RevertVariableResponse");
107
+ }
108
+ /**
109
+ * Updates a GTM Variable. (variables.update)
110
+ *
111
+ * @param string $path GTM Variable's API relative path. Example: accounts/{acco
112
+ * unt_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variab
113
+ * le_id}
114
+ * @param Google_Service_TagManager_Variable $postBody
115
+ * @param array $optParams Optional parameters.
116
+ *
117
+ * @opt_param string fingerprint When provided, this fingerprint must match the
118
+ * fingerprint of the variable in storage.
119
+ * @return Google_Service_TagManager_Variable
120
+ */
121
+ public function update($path, Google_Service_TagManager_Variable $postBody, $optParams = array())
122
+ {
123
+ $params = array('path' => $path, 'postBody' => $postBody);
124
+ $params = array_merge($params, $optParams);
125
+ return $this->call('update', array($params), "Google_Service_TagManager_Variable");
126
+ }
127
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsContainersWorkspacesZones.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "zones" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $zones = $tagmanagerService->zones;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsContainersWorkspacesZones extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a GTM Zone. (zones.create)
30
+ *
31
+ * @param string $parent GTM Workspace's API relative path. Example:
32
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
33
+ * @param Google_Service_TagManager_Zone $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_Zone
36
+ */
37
+ public function create($parent, Google_Service_TagManager_Zone $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_Zone");
42
+ }
43
+ /**
44
+ * Deletes a GTM Zone. (zones.delete)
45
+ *
46
+ * @param string $path GTM Zone's API relative path. Example: accounts/{account_
47
+ * id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}
48
+ * @param array $optParams Optional parameters.
49
+ */
50
+ public function delete($path, $optParams = array())
51
+ {
52
+ $params = array('path' => $path);
53
+ $params = array_merge($params, $optParams);
54
+ return $this->call('delete', array($params));
55
+ }
56
+ /**
57
+ * Gets a GTM Zone. (zones.get)
58
+ *
59
+ * @param string $path GTM Zone's API relative path. Example: accounts/{account_
60
+ * id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}
61
+ * @param array $optParams Optional parameters.
62
+ * @return Google_Service_TagManager_Zone
63
+ */
64
+ public function get($path, $optParams = array())
65
+ {
66
+ $params = array('path' => $path);
67
+ $params = array_merge($params, $optParams);
68
+ return $this->call('get', array($params), "Google_Service_TagManager_Zone");
69
+ }
70
+ /**
71
+ * Lists all GTM Zones of a GTM container workspace.
72
+ * (zones.listAccountsContainersWorkspacesZones)
73
+ *
74
+ * @param string $parent GTM Workspace's API relative path. Example:
75
+ * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
76
+ * @param array $optParams Optional parameters.
77
+ *
78
+ * @opt_param string pageToken Continuation token for fetching the next page of
79
+ * results.
80
+ * @return Google_Service_TagManager_ListZonesResponse
81
+ */
82
+ public function listAccountsContainersWorkspacesZones($parent, $optParams = array())
83
+ {
84
+ $params = array('parent' => $parent);
85
+ $params = array_merge($params, $optParams);
86
+ return $this->call('list', array($params), "Google_Service_TagManager_ListZonesResponse");
87
+ }
88
+ /**
89
+ * Reverts changes to a GTM Zone in a GTM Workspace. (zones.revert)
90
+ *
91
+ * @param string $path GTM Zone's API relative path. Example: accounts/{account_
92
+ * id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}
93
+ * @param array $optParams Optional parameters.
94
+ *
95
+ * @opt_param string fingerprint When provided, this fingerprint must match the
96
+ * fingerprint of the zone in storage.
97
+ * @return Google_Service_TagManager_RevertZoneResponse
98
+ */
99
+ public function revert($path, $optParams = array())
100
+ {
101
+ $params = array('path' => $path);
102
+ $params = array_merge($params, $optParams);
103
+ return $this->call('revert', array($params), "Google_Service_TagManager_RevertZoneResponse");
104
+ }
105
+ /**
106
+ * Updates a GTM Zone. (zones.update)
107
+ *
108
+ * @param string $path GTM Zone's API relative path. Example: accounts/{account_
109
+ * id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}
110
+ * @param Google_Service_TagManager_Zone $postBody
111
+ * @param array $optParams Optional parameters.
112
+ *
113
+ * @opt_param string fingerprint When provided, this fingerprint must match the
114
+ * fingerprint of the zone in storage.
115
+ * @return Google_Service_TagManager_Zone
116
+ */
117
+ public function update($path, Google_Service_TagManager_Zone $postBody, $optParams = array())
118
+ {
119
+ $params = array('path' => $path, 'postBody' => $postBody);
120
+ $params = array_merge($params, $optParams);
121
+ return $this->call('update', array($params), "Google_Service_TagManager_Zone");
122
+ }
123
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Resource/AccountsUserPermissions.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * The "user_permissions" collection of methods.
20
+ * Typical usage is:
21
+ * <code>
22
+ * $tagmanagerService = new Google_Service_TagManager(...);
23
+ * $user_permissions = $tagmanagerService->user_permissions;
24
+ * </code>
25
+ */
26
+ class Google_Service_TagManager_Resource_AccountsUserPermissions extends Google_Service_Resource
27
+ {
28
+ /**
29
+ * Creates a user's Account & Container access. (user_permissions.create)
30
+ *
31
+ * @param string $parent GTM Account's API relative path. Example:
32
+ * accounts/{account_id}
33
+ * @param Google_Service_TagManager_UserPermission $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_TagManager_UserPermission
36
+ */
37
+ public function create($parent, Google_Service_TagManager_UserPermission $postBody, $optParams = array())
38
+ {
39
+ $params = array('parent' => $parent, 'postBody' => $postBody);
40
+ $params = array_merge($params, $optParams);
41
+ return $this->call('create', array($params), "Google_Service_TagManager_UserPermission");
42
+ }
43
+ /**
44
+ * Removes a user from the account, revoking access to it and all of its
45
+ * containers. (user_permissions.delete)
46
+ *
47
+ * @param string $path GTM UserPermission's API relative path. Example:
48
+ * accounts/{account_id}/user_permissions/{user_permission_id}
49
+ * @param array $optParams Optional parameters.
50
+ */
51
+ public function delete($path, $optParams = array())
52
+ {
53
+ $params = array('path' => $path);
54
+ $params = array_merge($params, $optParams);
55
+ return $this->call('delete', array($params));
56
+ }
57
+ /**
58
+ * Gets a user's Account & Container access. (user_permissions.get)
59
+ *
60
+ * @param string $path GTM UserPermission's API relative path. Example:
61
+ * accounts/{account_id}/user_permissions/{user_permission_id}
62
+ * @param array $optParams Optional parameters.
63
+ * @return Google_Service_TagManager_UserPermission
64
+ */
65
+ public function get($path, $optParams = array())
66
+ {
67
+ $params = array('path' => $path);
68
+ $params = array_merge($params, $optParams);
69
+ return $this->call('get', array($params), "Google_Service_TagManager_UserPermission");
70
+ }
71
+ /**
72
+ * List all users that have access to the account along with Account and
73
+ * Container user access granted to each of them.
74
+ * (user_permissions.listAccountsUserPermissions)
75
+ *
76
+ * @param string $parent GTM Accounts's API relative path. Example:
77
+ * accounts/{account_id}
78
+ * @param array $optParams Optional parameters.
79
+ *
80
+ * @opt_param string pageToken Continuation token for fetching the next page of
81
+ * results.
82
+ * @return Google_Service_TagManager_ListUserPermissionsResponse
83
+ */
84
+ public function listAccountsUserPermissions($parent, $optParams = array())
85
+ {
86
+ $params = array('parent' => $parent);
87
+ $params = array_merge($params, $optParams);
88
+ return $this->call('list', array($params), "Google_Service_TagManager_ListUserPermissionsResponse");
89
+ }
90
+ /**
91
+ * Updates a user's Account & Container access. (user_permissions.update)
92
+ *
93
+ * @param string $path GTM UserPermission's API relative path. Example:
94
+ * accounts/{account_id}/user_permissions/{user_permission_id}
95
+ * @param Google_Service_TagManager_UserPermission $postBody
96
+ * @param array $optParams Optional parameters.
97
+ * @return Google_Service_TagManager_UserPermission
98
+ */
99
+ public function update($path, Google_Service_TagManager_UserPermission $postBody, $optParams = array())
100
+ {
101
+ $params = array('path' => $path, 'postBody' => $postBody);
102
+ $params = array_merge($params, $optParams);
103
+ return $this->call('update', array($params), "Google_Service_TagManager_UserPermission");
104
+ }
105
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertBuiltInVariableResponse.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_RevertBuiltInVariableResponse extends Google_Model
19
+ {
20
+ public $enabled;
21
+
22
+ public function setEnabled($enabled)
23
+ {
24
+ $this->enabled = $enabled;
25
+ }
26
+ public function getEnabled()
27
+ {
28
+ return $this->enabled;
29
+ }
30
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertFolderResponse.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_RevertFolderResponse extends Google_Model
19
+ {
20
+ protected $folderType = 'Google_Service_TagManager_Folder';
21
+ protected $folderDataType = '';
22
+
23
+ /**
24
+ * @param Google_Service_TagManager_Folder
25
+ */
26
+ public function setFolder(Google_Service_TagManager_Folder $folder)
27
+ {
28
+ $this->folder = $folder;
29
+ }
30
+ /**
31
+ * @return Google_Service_TagManager_Folder
32
+ */
33
+ public function getFolder()
34
+ {
35
+ return $this->folder;
36
+ }
37
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertTagResponse.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_RevertTagResponse extends Google_Model
19
+ {
20
+ protected $tagType = 'Google_Service_TagManager_Tag';
21
+ protected $tagDataType = '';
22
+
23
+ /**
24
+ * @param Google_Service_TagManager_Tag
25
+ */
26
+ public function setTag(Google_Service_TagManager_Tag $tag)
27
+ {
28
+ $this->tag = $tag;
29
+ }
30
+ /**
31
+ * @return Google_Service_TagManager_Tag
32
+ */
33
+ public function getTag()
34
+ {
35
+ return $this->tag;
36
+ }
37
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertTemplateResponse.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_RevertTemplateResponse extends Google_Model
19
+ {
20
+ protected $templateType = 'Google_Service_TagManager_CustomTemplate';
21
+ protected $templateDataType = '';
22
+
23
+ /**
24
+ * @param Google_Service_TagManager_CustomTemplate
25
+ */
26
+ public function setTemplate(Google_Service_TagManager_CustomTemplate $template)
27
+ {
28
+ $this->template = $template;
29
+ }
30
+ /**
31
+ * @return Google_Service_TagManager_CustomTemplate
32
+ */
33
+ public function getTemplate()
34
+ {
35
+ return $this->template;
36
+ }
37
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertTriggerResponse.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_RevertTriggerResponse extends Google_Model
19
+ {
20
+ protected $triggerType = 'Google_Service_TagManager_Trigger';
21
+ protected $triggerDataType = '';
22
+
23
+ /**
24
+ * @param Google_Service_TagManager_Trigger
25
+ */
26
+ public function setTrigger(Google_Service_TagManager_Trigger $trigger)
27
+ {
28
+ $this->trigger = $trigger;
29
+ }
30
+ /**
31
+ * @return Google_Service_TagManager_Trigger
32
+ */
33
+ public function getTrigger()
34
+ {
35
+ return $this->trigger;
36
+ }
37
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertVariableResponse.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_RevertVariableResponse extends Google_Model
19
+ {
20
+ protected $variableType = 'Google_Service_TagManager_Variable';
21
+ protected $variableDataType = '';
22
+
23
+ /**
24
+ * @param Google_Service_TagManager_Variable
25
+ */
26
+ public function setVariable(Google_Service_TagManager_Variable $variable)
27
+ {
28
+ $this->variable = $variable;
29
+ }
30
+ /**
31
+ * @return Google_Service_TagManager_Variable
32
+ */
33
+ public function getVariable()
34
+ {
35
+ return $this->variable;
36
+ }
37
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/RevertZoneResponse.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_RevertZoneResponse extends Google_Model
19
+ {
20
+ protected $zoneType = 'Google_Service_TagManager_Zone';
21
+ protected $zoneDataType = '';
22
+
23
+ /**
24
+ * @param Google_Service_TagManager_Zone
25
+ */
26
+ public function setZone(Google_Service_TagManager_Zone $zone)
27
+ {
28
+ $this->zone = $zone;
29
+ }
30
+ /**
31
+ * @return Google_Service_TagManager_Zone
32
+ */
33
+ public function getZone()
34
+ {
35
+ return $this->zone;
36
+ }
37
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/SetupTag.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_SetupTag extends Google_Model
19
+ {
20
+ public $stopOnSetupFailure;
21
+ public $tagName;
22
+
23
+ public function setStopOnSetupFailure($stopOnSetupFailure)
24
+ {
25
+ $this->stopOnSetupFailure = $stopOnSetupFailure;
26
+ }
27
+ public function getStopOnSetupFailure()
28
+ {
29
+ return $this->stopOnSetupFailure;
30
+ }
31
+ public function setTagName($tagName)
32
+ {
33
+ $this->tagName = $tagName;
34
+ }
35
+ public function getTagName()
36
+ {
37
+ return $this->tagName;
38
+ }
39
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/SyncStatus.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_SyncStatus extends Google_Model
19
+ {
20
+ public $mergeConflict;
21
+ public $syncError;
22
+
23
+ public function setMergeConflict($mergeConflict)
24
+ {
25
+ $this->mergeConflict = $mergeConflict;
26
+ }
27
+ public function getMergeConflict()
28
+ {
29
+ return $this->mergeConflict;
30
+ }
31
+ public function setSyncError($syncError)
32
+ {
33
+ $this->syncError = $syncError;
34
+ }
35
+ public function getSyncError()
36
+ {
37
+ return $this->syncError;
38
+ }
39
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/SyncWorkspaceResponse.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_SyncWorkspaceResponse extends Google_Collection
19
+ {
20
+ protected $collection_key = 'mergeConflict';
21
+ protected $mergeConflictType = 'Google_Service_TagManager_MergeConflict';
22
+ protected $mergeConflictDataType = 'array';
23
+ protected $syncStatusType = 'Google_Service_TagManager_SyncStatus';
24
+ protected $syncStatusDataType = '';
25
+
26
+ /**
27
+ * @param Google_Service_TagManager_MergeConflict[]
28
+ */
29
+ public function setMergeConflict($mergeConflict)
30
+ {
31
+ $this->mergeConflict = $mergeConflict;
32
+ }
33
+ /**
34
+ * @return Google_Service_TagManager_MergeConflict[]
35
+ */
36
+ public function getMergeConflict()
37
+ {
38
+ return $this->mergeConflict;
39
+ }
40
+ /**
41
+ * @param Google_Service_TagManager_SyncStatus
42
+ */
43
+ public function setSyncStatus(Google_Service_TagManager_SyncStatus $syncStatus)
44
+ {
45
+ $this->syncStatus = $syncStatus;
46
+ }
47
+ /**
48
+ * @return Google_Service_TagManager_SyncStatus
49
+ */
50
+ public function getSyncStatus()
51
+ {
52
+ return $this->syncStatus;
53
+ }
54
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Tag.php ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Tag extends Google_Collection
19
+ {
20
+ protected $collection_key = 'teardownTag';
21
+ public $accountId;
22
+ public $blockingRuleId;
23
+ public $blockingTriggerId;
24
+ public $containerId;
25
+ public $fingerprint;
26
+ public $firingRuleId;
27
+ public $firingTriggerId;
28
+ public $liveOnly;
29
+ protected $monitoringMetadataType = 'Google_Service_TagManager_Parameter';
30
+ protected $monitoringMetadataDataType = '';
31
+ public $monitoringMetadataTagNameKey;
32
+ public $name;
33
+ public $notes;
34
+ protected $parameterType = 'Google_Service_TagManager_Parameter';
35
+ protected $parameterDataType = 'array';
36
+ public $parentFolderId;
37
+ public $path;
38
+ public $paused;
39
+ protected $priorityType = 'Google_Service_TagManager_Parameter';
40
+ protected $priorityDataType = '';
41
+ public $scheduleEndMs;
42
+ public $scheduleStartMs;
43
+ protected $setupTagType = 'Google_Service_TagManager_SetupTag';
44
+ protected $setupTagDataType = 'array';
45
+ public $tagFiringOption;
46
+ public $tagId;
47
+ public $tagManagerUrl;
48
+ protected $teardownTagType = 'Google_Service_TagManager_TeardownTag';
49
+ protected $teardownTagDataType = 'array';
50
+ public $type;
51
+ public $workspaceId;
52
+
53
+ public function setAccountId($accountId)
54
+ {
55
+ $this->accountId = $accountId;
56
+ }
57
+ public function getAccountId()
58
+ {
59
+ return $this->accountId;
60
+ }
61
+ public function setBlockingRuleId($blockingRuleId)
62
+ {
63
+ $this->blockingRuleId = $blockingRuleId;
64
+ }
65
+ public function getBlockingRuleId()
66
+ {
67
+ return $this->blockingRuleId;
68
+ }
69
+ public function setBlockingTriggerId($blockingTriggerId)
70
+ {
71
+ $this->blockingTriggerId = $blockingTriggerId;
72
+ }
73
+ public function getBlockingTriggerId()
74
+ {
75
+ return $this->blockingTriggerId;
76
+ }
77
+ public function setContainerId($containerId)
78
+ {
79
+ $this->containerId = $containerId;
80
+ }
81
+ public function getContainerId()
82
+ {
83
+ return $this->containerId;
84
+ }
85
+ public function setFingerprint($fingerprint)
86
+ {
87
+ $this->fingerprint = $fingerprint;
88
+ }
89
+ public function getFingerprint()
90
+ {
91
+ return $this->fingerprint;
92
+ }
93
+ public function setFiringRuleId($firingRuleId)
94
+ {
95
+ $this->firingRuleId = $firingRuleId;
96
+ }
97
+ public function getFiringRuleId()
98
+ {
99
+ return $this->firingRuleId;
100
+ }
101
+ public function setFiringTriggerId($firingTriggerId)
102
+ {
103
+ $this->firingTriggerId = $firingTriggerId;
104
+ }
105
+ public function getFiringTriggerId()
106
+ {
107
+ return $this->firingTriggerId;
108
+ }
109
+ public function setLiveOnly($liveOnly)
110
+ {
111
+ $this->liveOnly = $liveOnly;
112
+ }
113
+ public function getLiveOnly()
114
+ {
115
+ return $this->liveOnly;
116
+ }
117
+ /**
118
+ * @param Google_Service_TagManager_Parameter
119
+ */
120
+ public function setMonitoringMetadata(Google_Service_TagManager_Parameter $monitoringMetadata)
121
+ {
122
+ $this->monitoringMetadata = $monitoringMetadata;
123
+ }
124
+ /**
125
+ * @return Google_Service_TagManager_Parameter
126
+ */
127
+ public function getMonitoringMetadata()
128
+ {
129
+ return $this->monitoringMetadata;
130
+ }
131
+ public function setMonitoringMetadataTagNameKey($monitoringMetadataTagNameKey)
132
+ {
133
+ $this->monitoringMetadataTagNameKey = $monitoringMetadataTagNameKey;
134
+ }
135
+ public function getMonitoringMetadataTagNameKey()
136
+ {
137
+ return $this->monitoringMetadataTagNameKey;
138
+ }
139
+ public function setName($name)
140
+ {
141
+ $this->name = $name;
142
+ }
143
+ public function getName()
144
+ {
145
+ return $this->name;
146
+ }
147
+ public function setNotes($notes)
148
+ {
149
+ $this->notes = $notes;
150
+ }
151
+ public function getNotes()
152
+ {
153
+ return $this->notes;
154
+ }
155
+ /**
156
+ * @param Google_Service_TagManager_Parameter[]
157
+ */
158
+ public function setParameter($parameter)
159
+ {
160
+ $this->parameter = $parameter;
161
+ }
162
+ /**
163
+ * @return Google_Service_TagManager_Parameter[]
164
+ */
165
+ public function getParameter()
166
+ {
167
+ return $this->parameter;
168
+ }
169
+ public function setParentFolderId($parentFolderId)
170
+ {
171
+ $this->parentFolderId = $parentFolderId;
172
+ }
173
+ public function getParentFolderId()
174
+ {
175
+ return $this->parentFolderId;
176
+ }
177
+ public function setPath($path)
178
+ {
179
+ $this->path = $path;
180
+ }
181
+ public function getPath()
182
+ {
183
+ return $this->path;
184
+ }
185
+ public function setPaused($paused)
186
+ {
187
+ $this->paused = $paused;
188
+ }
189
+ public function getPaused()
190
+ {
191
+ return $this->paused;
192
+ }
193
+ /**
194
+ * @param Google_Service_TagManager_Parameter
195
+ */
196
+ public function setPriority(Google_Service_TagManager_Parameter $priority)
197
+ {
198
+ $this->priority = $priority;
199
+ }
200
+ /**
201
+ * @return Google_Service_TagManager_Parameter
202
+ */
203
+ public function getPriority()
204
+ {
205
+ return $this->priority;
206
+ }
207
+ public function setScheduleEndMs($scheduleEndMs)
208
+ {
209
+ $this->scheduleEndMs = $scheduleEndMs;
210
+ }
211
+ public function getScheduleEndMs()
212
+ {
213
+ return $this->scheduleEndMs;
214
+ }
215
+ public function setScheduleStartMs($scheduleStartMs)
216
+ {
217
+ $this->scheduleStartMs = $scheduleStartMs;
218
+ }
219
+ public function getScheduleStartMs()
220
+ {
221
+ return $this->scheduleStartMs;
222
+ }
223
+ /**
224
+ * @param Google_Service_TagManager_SetupTag[]
225
+ */
226
+ public function setSetupTag($setupTag)
227
+ {
228
+ $this->setupTag = $setupTag;
229
+ }
230
+ /**
231
+ * @return Google_Service_TagManager_SetupTag[]
232
+ */
233
+ public function getSetupTag()
234
+ {
235
+ return $this->setupTag;
236
+ }
237
+ public function setTagFiringOption($tagFiringOption)
238
+ {
239
+ $this->tagFiringOption = $tagFiringOption;
240
+ }
241
+ public function getTagFiringOption()
242
+ {
243
+ return $this->tagFiringOption;
244
+ }
245
+ public function setTagId($tagId)
246
+ {
247
+ $this->tagId = $tagId;
248
+ }
249
+ public function getTagId()
250
+ {
251
+ return $this->tagId;
252
+ }
253
+ public function setTagManagerUrl($tagManagerUrl)
254
+ {
255
+ $this->tagManagerUrl = $tagManagerUrl;
256
+ }
257
+ public function getTagManagerUrl()
258
+ {
259
+ return $this->tagManagerUrl;
260
+ }
261
+ /**
262
+ * @param Google_Service_TagManager_TeardownTag[]
263
+ */
264
+ public function setTeardownTag($teardownTag)
265
+ {
266
+ $this->teardownTag = $teardownTag;
267
+ }
268
+ /**
269
+ * @return Google_Service_TagManager_TeardownTag[]
270
+ */
271
+ public function getTeardownTag()
272
+ {
273
+ return $this->teardownTag;
274
+ }
275
+ public function setType($type)
276
+ {
277
+ $this->type = $type;
278
+ }
279
+ public function getType()
280
+ {
281
+ return $this->type;
282
+ }
283
+ public function setWorkspaceId($workspaceId)
284
+ {
285
+ $this->workspaceId = $workspaceId;
286
+ }
287
+ public function getWorkspaceId()
288
+ {
289
+ return $this->workspaceId;
290
+ }
291
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/TeardownTag.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_TeardownTag extends Google_Model
19
+ {
20
+ public $stopTeardownOnFailure;
21
+ public $tagName;
22
+
23
+ public function setStopTeardownOnFailure($stopTeardownOnFailure)
24
+ {
25
+ $this->stopTeardownOnFailure = $stopTeardownOnFailure;
26
+ }
27
+ public function getStopTeardownOnFailure()
28
+ {
29
+ return $this->stopTeardownOnFailure;
30
+ }
31
+ public function setTagName($tagName)
32
+ {
33
+ $this->tagName = $tagName;
34
+ }
35
+ public function getTagName()
36
+ {
37
+ return $this->tagName;
38
+ }
39
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Trigger.php ADDED
@@ -0,0 +1,457 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Trigger extends Google_Collection
19
+ {
20
+ protected $collection_key = 'parameter';
21
+ public $accountId;
22
+ protected $autoEventFilterType = 'Google_Service_TagManager_Condition';
23
+ protected $autoEventFilterDataType = 'array';
24
+ protected $checkValidationType = 'Google_Service_TagManager_Parameter';
25
+ protected $checkValidationDataType = '';
26
+ public $containerId;
27
+ protected $continuousTimeMinMillisecondsType = 'Google_Service_TagManager_Parameter';
28
+ protected $continuousTimeMinMillisecondsDataType = '';
29
+ protected $customEventFilterType = 'Google_Service_TagManager_Condition';
30
+ protected $customEventFilterDataType = 'array';
31
+ protected $eventNameType = 'Google_Service_TagManager_Parameter';
32
+ protected $eventNameDataType = '';
33
+ protected $filterType = 'Google_Service_TagManager_Condition';
34
+ protected $filterDataType = 'array';
35
+ public $fingerprint;
36
+ protected $horizontalScrollPercentageListType = 'Google_Service_TagManager_Parameter';
37
+ protected $horizontalScrollPercentageListDataType = '';
38
+ protected $intervalType = 'Google_Service_TagManager_Parameter';
39
+ protected $intervalDataType = '';
40
+ protected $intervalSecondsType = 'Google_Service_TagManager_Parameter';
41
+ protected $intervalSecondsDataType = '';
42
+ protected $limitType = 'Google_Service_TagManager_Parameter';
43
+ protected $limitDataType = '';
44
+ protected $maxTimerLengthSecondsType = 'Google_Service_TagManager_Parameter';
45
+ protected $maxTimerLengthSecondsDataType = '';
46
+ public $name;
47
+ public $notes;
48
+ protected $parameterType = 'Google_Service_TagManager_Parameter';
49
+ protected $parameterDataType = 'array';
50
+ public $parentFolderId;
51
+ public $path;
52
+ protected $selectorType = 'Google_Service_TagManager_Parameter';
53
+ protected $selectorDataType = '';
54
+ public $tagManagerUrl;
55
+ protected $totalTimeMinMillisecondsType = 'Google_Service_TagManager_Parameter';
56
+ protected $totalTimeMinMillisecondsDataType = '';
57
+ public $triggerId;
58
+ public $type;
59
+ protected $uniqueTriggerIdType = 'Google_Service_TagManager_Parameter';
60
+ protected $uniqueTriggerIdDataType = '';
61
+ protected $verticalScrollPercentageListType = 'Google_Service_TagManager_Parameter';
62
+ protected $verticalScrollPercentageListDataType = '';
63
+ protected $visibilitySelectorType = 'Google_Service_TagManager_Parameter';
64
+ protected $visibilitySelectorDataType = '';
65
+ protected $visiblePercentageMaxType = 'Google_Service_TagManager_Parameter';
66
+ protected $visiblePercentageMaxDataType = '';
67
+ protected $visiblePercentageMinType = 'Google_Service_TagManager_Parameter';
68
+ protected $visiblePercentageMinDataType = '';
69
+ protected $waitForTagsType = 'Google_Service_TagManager_Parameter';
70
+ protected $waitForTagsDataType = '';
71
+ protected $waitForTagsTimeoutType = 'Google_Service_TagManager_Parameter';
72
+ protected $waitForTagsTimeoutDataType = '';
73
+ public $workspaceId;
74
+
75
+ public function setAccountId($accountId)
76
+ {
77
+ $this->accountId = $accountId;
78
+ }
79
+ public function getAccountId()
80
+ {
81
+ return $this->accountId;
82
+ }
83
+ /**
84
+ * @param Google_Service_TagManager_Condition[]
85
+ */
86
+ public function setAutoEventFilter($autoEventFilter)
87
+ {
88
+ $this->autoEventFilter = $autoEventFilter;
89
+ }
90
+ /**
91
+ * @return Google_Service_TagManager_Condition[]
92
+ */
93
+ public function getAutoEventFilter()
94
+ {
95
+ return $this->autoEventFilter;
96
+ }
97
+ /**
98
+ * @param Google_Service_TagManager_Parameter
99
+ */
100
+ public function setCheckValidation(Google_Service_TagManager_Parameter $checkValidation)
101
+ {
102
+ $this->checkValidation = $checkValidation;
103
+ }
104
+ /**
105
+ * @return Google_Service_TagManager_Parameter
106
+ */
107
+ public function getCheckValidation()
108
+ {
109
+ return $this->checkValidation;
110
+ }
111
+ public function setContainerId($containerId)
112
+ {
113
+ $this->containerId = $containerId;
114
+ }
115
+ public function getContainerId()
116
+ {
117
+ return $this->containerId;
118
+ }
119
+ /**
120
+ * @param Google_Service_TagManager_Parameter
121
+ */
122
+ public function setContinuousTimeMinMilliseconds(Google_Service_TagManager_Parameter $continuousTimeMinMilliseconds)
123
+ {
124
+ $this->continuousTimeMinMilliseconds = $continuousTimeMinMilliseconds;
125
+ }
126
+ /**
127
+ * @return Google_Service_TagManager_Parameter
128
+ */
129
+ public function getContinuousTimeMinMilliseconds()
130
+ {
131
+ return $this->continuousTimeMinMilliseconds;
132
+ }
133
+ /**
134
+ * @param Google_Service_TagManager_Condition[]
135
+ */
136
+ public function setCustomEventFilter($customEventFilter)
137
+ {
138
+ $this->customEventFilter = $customEventFilter;
139
+ }
140
+ /**
141
+ * @return Google_Service_TagManager_Condition[]
142
+ */
143
+ public function getCustomEventFilter()
144
+ {
145
+ return $this->customEventFilter;
146
+ }
147
+ /**
148
+ * @param Google_Service_TagManager_Parameter
149
+ */
150
+ public function setEventName(Google_Service_TagManager_Parameter $eventName)
151
+ {
152
+ $this->eventName = $eventName;
153
+ }
154
+ /**
155
+ * @return Google_Service_TagManager_Parameter
156
+ */
157
+ public function getEventName()
158
+ {
159
+ return $this->eventName;
160
+ }
161
+ /**
162
+ * @param Google_Service_TagManager_Condition[]
163
+ */
164
+ public function setFilter($filter)
165
+ {
166
+ $this->filter = $filter;
167
+ }
168
+ /**
169
+ * @return Google_Service_TagManager_Condition[]
170
+ */
171
+ public function getFilter()
172
+ {
173
+ return $this->filter;
174
+ }
175
+ public function setFingerprint($fingerprint)
176
+ {
177
+ $this->fingerprint = $fingerprint;
178
+ }
179
+ public function getFingerprint()
180
+ {
181
+ return $this->fingerprint;
182
+ }
183
+ /**
184
+ * @param Google_Service_TagManager_Parameter
185
+ */
186
+ public function setHorizontalScrollPercentageList(Google_Service_TagManager_Parameter $horizontalScrollPercentageList)
187
+ {
188
+ $this->horizontalScrollPercentageList = $horizontalScrollPercentageList;
189
+ }
190
+ /**
191
+ * @return Google_Service_TagManager_Parameter
192
+ */
193
+ public function getHorizontalScrollPercentageList()
194
+ {
195
+ return $this->horizontalScrollPercentageList;
196
+ }
197
+ /**
198
+ * @param Google_Service_TagManager_Parameter
199
+ */
200
+ public function setInterval(Google_Service_TagManager_Parameter $interval)
201
+ {
202
+ $this->interval = $interval;
203
+ }
204
+ /**
205
+ * @return Google_Service_TagManager_Parameter
206
+ */
207
+ public function getInterval()
208
+ {
209
+ return $this->interval;
210
+ }
211
+ /**
212
+ * @param Google_Service_TagManager_Parameter
213
+ */
214
+ public function setIntervalSeconds(Google_Service_TagManager_Parameter $intervalSeconds)
215
+ {
216
+ $this->intervalSeconds = $intervalSeconds;
217
+ }
218
+ /**
219
+ * @return Google_Service_TagManager_Parameter
220
+ */
221
+ public function getIntervalSeconds()
222
+ {
223
+ return $this->intervalSeconds;
224
+ }
225
+ /**
226
+ * @param Google_Service_TagManager_Parameter
227
+ */
228
+ public function setLimit(Google_Service_TagManager_Parameter $limit)
229
+ {
230
+ $this->limit = $limit;
231
+ }
232
+ /**
233
+ * @return Google_Service_TagManager_Parameter
234
+ */
235
+ public function getLimit()
236
+ {
237
+ return $this->limit;
238
+ }
239
+ /**
240
+ * @param Google_Service_TagManager_Parameter
241
+ */
242
+ public function setMaxTimerLengthSeconds(Google_Service_TagManager_Parameter $maxTimerLengthSeconds)
243
+ {
244
+ $this->maxTimerLengthSeconds = $maxTimerLengthSeconds;
245
+ }
246
+ /**
247
+ * @return Google_Service_TagManager_Parameter
248
+ */
249
+ public function getMaxTimerLengthSeconds()
250
+ {
251
+ return $this->maxTimerLengthSeconds;
252
+ }
253
+ public function setName($name)
254
+ {
255
+ $this->name = $name;
256
+ }
257
+ public function getName()
258
+ {
259
+ return $this->name;
260
+ }
261
+ public function setNotes($notes)
262
+ {
263
+ $this->notes = $notes;
264
+ }
265
+ public function getNotes()
266
+ {
267
+ return $this->notes;
268
+ }
269
+ /**
270
+ * @param Google_Service_TagManager_Parameter[]
271
+ */
272
+ public function setParameter($parameter)
273
+ {
274
+ $this->parameter = $parameter;
275
+ }
276
+ /**
277
+ * @return Google_Service_TagManager_Parameter[]
278
+ */
279
+ public function getParameter()
280
+ {
281
+ return $this->parameter;
282
+ }
283
+ public function setParentFolderId($parentFolderId)
284
+ {
285
+ $this->parentFolderId = $parentFolderId;
286
+ }
287
+ public function getParentFolderId()
288
+ {
289
+ return $this->parentFolderId;
290
+ }
291
+ public function setPath($path)
292
+ {
293
+ $this->path = $path;
294
+ }
295
+ public function getPath()
296
+ {
297
+ return $this->path;
298
+ }
299
+ /**
300
+ * @param Google_Service_TagManager_Parameter
301
+ */
302
+ public function setSelector(Google_Service_TagManager_Parameter $selector)
303
+ {
304
+ $this->selector = $selector;
305
+ }
306
+ /**
307
+ * @return Google_Service_TagManager_Parameter
308
+ */
309
+ public function getSelector()
310
+ {
311
+ return $this->selector;
312
+ }
313
+ public function setTagManagerUrl($tagManagerUrl)
314
+ {
315
+ $this->tagManagerUrl = $tagManagerUrl;
316
+ }
317
+ public function getTagManagerUrl()
318
+ {
319
+ return $this->tagManagerUrl;
320
+ }
321
+ /**
322
+ * @param Google_Service_TagManager_Parameter
323
+ */
324
+ public function setTotalTimeMinMilliseconds(Google_Service_TagManager_Parameter $totalTimeMinMilliseconds)
325
+ {
326
+ $this->totalTimeMinMilliseconds = $totalTimeMinMilliseconds;
327
+ }
328
+ /**
329
+ * @return Google_Service_TagManager_Parameter
330
+ */
331
+ public function getTotalTimeMinMilliseconds()
332
+ {
333
+ return $this->totalTimeMinMilliseconds;
334
+ }
335
+ public function setTriggerId($triggerId)
336
+ {
337
+ $this->triggerId = $triggerId;
338
+ }
339
+ public function getTriggerId()
340
+ {
341
+ return $this->triggerId;
342
+ }
343
+ public function setType($type)
344
+ {
345
+ $this->type = $type;
346
+ }
347
+ public function getType()
348
+ {
349
+ return $this->type;
350
+ }
351
+ /**
352
+ * @param Google_Service_TagManager_Parameter
353
+ */
354
+ public function setUniqueTriggerId(Google_Service_TagManager_Parameter $uniqueTriggerId)
355
+ {
356
+ $this->uniqueTriggerId = $uniqueTriggerId;
357
+ }
358
+ /**
359
+ * @return Google_Service_TagManager_Parameter
360
+ */
361
+ public function getUniqueTriggerId()
362
+ {
363
+ return $this->uniqueTriggerId;
364
+ }
365
+ /**
366
+ * @param Google_Service_TagManager_Parameter
367
+ */
368
+ public function setVerticalScrollPercentageList(Google_Service_TagManager_Parameter $verticalScrollPercentageList)
369
+ {
370
+ $this->verticalScrollPercentageList = $verticalScrollPercentageList;
371
+ }
372
+ /**
373
+ * @return Google_Service_TagManager_Parameter
374
+ */
375
+ public function getVerticalScrollPercentageList()
376
+ {
377
+ return $this->verticalScrollPercentageList;
378
+ }
379
+ /**
380
+ * @param Google_Service_TagManager_Parameter
381
+ */
382
+ public function setVisibilitySelector(Google_Service_TagManager_Parameter $visibilitySelector)
383
+ {
384
+ $this->visibilitySelector = $visibilitySelector;
385
+ }
386
+ /**
387
+ * @return Google_Service_TagManager_Parameter
388
+ */
389
+ public function getVisibilitySelector()
390
+ {
391
+ return $this->visibilitySelector;
392
+ }
393
+ /**
394
+ * @param Google_Service_TagManager_Parameter
395
+ */
396
+ public function setVisiblePercentageMax(Google_Service_TagManager_Parameter $visiblePercentageMax)
397
+ {
398
+ $this->visiblePercentageMax = $visiblePercentageMax;
399
+ }
400
+ /**
401
+ * @return Google_Service_TagManager_Parameter
402
+ */
403
+ public function getVisiblePercentageMax()
404
+ {
405
+ return $this->visiblePercentageMax;
406
+ }
407
+ /**
408
+ * @param Google_Service_TagManager_Parameter
409
+ */
410
+ public function setVisiblePercentageMin(Google_Service_TagManager_Parameter $visiblePercentageMin)
411
+ {
412
+ $this->visiblePercentageMin = $visiblePercentageMin;
413
+ }
414
+ /**
415
+ * @return Google_Service_TagManager_Parameter
416
+ */
417
+ public function getVisiblePercentageMin()
418
+ {
419
+ return $this->visiblePercentageMin;
420
+ }
421
+ /**
422
+ * @param Google_Service_TagManager_Parameter
423
+ */
424
+ public function setWaitForTags(Google_Service_TagManager_Parameter $waitForTags)
425
+ {
426
+ $this->waitForTags = $waitForTags;
427
+ }
428
+ /**
429
+ * @return Google_Service_TagManager_Parameter
430
+ */
431
+ public function getWaitForTags()
432
+ {
433
+ return $this->waitForTags;
434
+ }
435
+ /**
436
+ * @param Google_Service_TagManager_Parameter
437
+ */
438
+ public function setWaitForTagsTimeout(Google_Service_TagManager_Parameter $waitForTagsTimeout)
439
+ {
440
+ $this->waitForTagsTimeout = $waitForTagsTimeout;
441
+ }
442
+ /**
443
+ * @return Google_Service_TagManager_Parameter
444
+ */
445
+ public function getWaitForTagsTimeout()
446
+ {
447
+ return $this->waitForTagsTimeout;
448
+ }
449
+ public function setWorkspaceId($workspaceId)
450
+ {
451
+ $this->workspaceId = $workspaceId;
452
+ }
453
+ public function getWorkspaceId()
454
+ {
455
+ return $this->workspaceId;
456
+ }
457
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/UserPermission.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_UserPermission extends Google_Collection
19
+ {
20
+ protected $collection_key = 'containerAccess';
21
+ protected $accountAccessType = 'Google_Service_TagManager_AccountAccess';
22
+ protected $accountAccessDataType = '';
23
+ public $accountId;
24
+ protected $containerAccessType = 'Google_Service_TagManager_ContainerAccess';
25
+ protected $containerAccessDataType = 'array';
26
+ public $emailAddress;
27
+ public $path;
28
+
29
+ /**
30
+ * @param Google_Service_TagManager_AccountAccess
31
+ */
32
+ public function setAccountAccess(Google_Service_TagManager_AccountAccess $accountAccess)
33
+ {
34
+ $this->accountAccess = $accountAccess;
35
+ }
36
+ /**
37
+ * @return Google_Service_TagManager_AccountAccess
38
+ */
39
+ public function getAccountAccess()
40
+ {
41
+ return $this->accountAccess;
42
+ }
43
+ public function setAccountId($accountId)
44
+ {
45
+ $this->accountId = $accountId;
46
+ }
47
+ public function getAccountId()
48
+ {
49
+ return $this->accountId;
50
+ }
51
+ /**
52
+ * @param Google_Service_TagManager_ContainerAccess[]
53
+ */
54
+ public function setContainerAccess($containerAccess)
55
+ {
56
+ $this->containerAccess = $containerAccess;
57
+ }
58
+ /**
59
+ * @return Google_Service_TagManager_ContainerAccess[]
60
+ */
61
+ public function getContainerAccess()
62
+ {
63
+ return $this->containerAccess;
64
+ }
65
+ public function setEmailAddress($emailAddress)
66
+ {
67
+ $this->emailAddress = $emailAddress;
68
+ }
69
+ public function getEmailAddress()
70
+ {
71
+ return $this->emailAddress;
72
+ }
73
+ public function setPath($path)
74
+ {
75
+ $this->path = $path;
76
+ }
77
+ public function getPath()
78
+ {
79
+ return $this->path;
80
+ }
81
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Variable.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Variable extends Google_Collection
19
+ {
20
+ protected $collection_key = 'parameter';
21
+ public $accountId;
22
+ public $containerId;
23
+ public $disablingTriggerId;
24
+ public $enablingTriggerId;
25
+ public $fingerprint;
26
+ protected $formatValueType = 'Google_Service_TagManager_VariableFormatValue';
27
+ protected $formatValueDataType = '';
28
+ public $name;
29
+ public $notes;
30
+ protected $parameterType = 'Google_Service_TagManager_Parameter';
31
+ protected $parameterDataType = 'array';
32
+ public $parentFolderId;
33
+ public $path;
34
+ public $scheduleEndMs;
35
+ public $scheduleStartMs;
36
+ public $tagManagerUrl;
37
+ public $type;
38
+ public $variableId;
39
+ public $workspaceId;
40
+
41
+ public function setAccountId($accountId)
42
+ {
43
+ $this->accountId = $accountId;
44
+ }
45
+ public function getAccountId()
46
+ {
47
+ return $this->accountId;
48
+ }
49
+ public function setContainerId($containerId)
50
+ {
51
+ $this->containerId = $containerId;
52
+ }
53
+ public function getContainerId()
54
+ {
55
+ return $this->containerId;
56
+ }
57
+ public function setDisablingTriggerId($disablingTriggerId)
58
+ {
59
+ $this->disablingTriggerId = $disablingTriggerId;
60
+ }
61
+ public function getDisablingTriggerId()
62
+ {
63
+ return $this->disablingTriggerId;
64
+ }
65
+ public function setEnablingTriggerId($enablingTriggerId)
66
+ {
67
+ $this->enablingTriggerId = $enablingTriggerId;
68
+ }
69
+ public function getEnablingTriggerId()
70
+ {
71
+ return $this->enablingTriggerId;
72
+ }
73
+ public function setFingerprint($fingerprint)
74
+ {
75
+ $this->fingerprint = $fingerprint;
76
+ }
77
+ public function getFingerprint()
78
+ {
79
+ return $this->fingerprint;
80
+ }
81
+ /**
82
+ * @param Google_Service_TagManager_VariableFormatValue
83
+ */
84
+ public function setFormatValue(Google_Service_TagManager_VariableFormatValue $formatValue)
85
+ {
86
+ $this->formatValue = $formatValue;
87
+ }
88
+ /**
89
+ * @return Google_Service_TagManager_VariableFormatValue
90
+ */
91
+ public function getFormatValue()
92
+ {
93
+ return $this->formatValue;
94
+ }
95
+ public function setName($name)
96
+ {
97
+ $this->name = $name;
98
+ }
99
+ public function getName()
100
+ {
101
+ return $this->name;
102
+ }
103
+ public function setNotes($notes)
104
+ {
105
+ $this->notes = $notes;
106
+ }
107
+ public function getNotes()
108
+ {
109
+ return $this->notes;
110
+ }
111
+ /**
112
+ * @param Google_Service_TagManager_Parameter[]
113
+ */
114
+ public function setParameter($parameter)
115
+ {
116
+ $this->parameter = $parameter;
117
+ }
118
+ /**
119
+ * @return Google_Service_TagManager_Parameter[]
120
+ */
121
+ public function getParameter()
122
+ {
123
+ return $this->parameter;
124
+ }
125
+ public function setParentFolderId($parentFolderId)
126
+ {
127
+ $this->parentFolderId = $parentFolderId;
128
+ }
129
+ public function getParentFolderId()
130
+ {
131
+ return $this->parentFolderId;
132
+ }
133
+ public function setPath($path)
134
+ {
135
+ $this->path = $path;
136
+ }
137
+ public function getPath()
138
+ {
139
+ return $this->path;
140
+ }
141
+ public function setScheduleEndMs($scheduleEndMs)
142
+ {
143
+ $this->scheduleEndMs = $scheduleEndMs;
144
+ }
145
+ public function getScheduleEndMs()
146
+ {
147
+ return $this->scheduleEndMs;
148
+ }
149
+ public function setScheduleStartMs($scheduleStartMs)
150
+ {
151
+ $this->scheduleStartMs = $scheduleStartMs;
152
+ }
153
+ public function getScheduleStartMs()
154
+ {
155
+ return $this->scheduleStartMs;
156
+ }
157
+ public function setTagManagerUrl($tagManagerUrl)
158
+ {
159
+ $this->tagManagerUrl = $tagManagerUrl;
160
+ }
161
+ public function getTagManagerUrl()
162
+ {
163
+ return $this->tagManagerUrl;
164
+ }
165
+ public function setType($type)
166
+ {
167
+ $this->type = $type;
168
+ }
169
+ public function getType()
170
+ {
171
+ return $this->type;
172
+ }
173
+ public function setVariableId($variableId)
174
+ {
175
+ $this->variableId = $variableId;
176
+ }
177
+ public function getVariableId()
178
+ {
179
+ return $this->variableId;
180
+ }
181
+ public function setWorkspaceId($workspaceId)
182
+ {
183
+ $this->workspaceId = $workspaceId;
184
+ }
185
+ public function getWorkspaceId()
186
+ {
187
+ return $this->workspaceId;
188
+ }
189
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/VariableFormatValue.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_VariableFormatValue extends Google_Model
19
+ {
20
+ public $caseConversionType;
21
+ protected $convertFalseToValueType = 'Google_Service_TagManager_Parameter';
22
+ protected $convertFalseToValueDataType = '';
23
+ protected $convertNullToValueType = 'Google_Service_TagManager_Parameter';
24
+ protected $convertNullToValueDataType = '';
25
+ protected $convertTrueToValueType = 'Google_Service_TagManager_Parameter';
26
+ protected $convertTrueToValueDataType = '';
27
+ protected $convertUndefinedToValueType = 'Google_Service_TagManager_Parameter';
28
+ protected $convertUndefinedToValueDataType = '';
29
+
30
+ public function setCaseConversionType($caseConversionType)
31
+ {
32
+ $this->caseConversionType = $caseConversionType;
33
+ }
34
+ public function getCaseConversionType()
35
+ {
36
+ return $this->caseConversionType;
37
+ }
38
+ /**
39
+ * @param Google_Service_TagManager_Parameter
40
+ */
41
+ public function setConvertFalseToValue(Google_Service_TagManager_Parameter $convertFalseToValue)
42
+ {
43
+ $this->convertFalseToValue = $convertFalseToValue;
44
+ }
45
+ /**
46
+ * @return Google_Service_TagManager_Parameter
47
+ */
48
+ public function getConvertFalseToValue()
49
+ {
50
+ return $this->convertFalseToValue;
51
+ }
52
+ /**
53
+ * @param Google_Service_TagManager_Parameter
54
+ */
55
+ public function setConvertNullToValue(Google_Service_TagManager_Parameter $convertNullToValue)
56
+ {
57
+ $this->convertNullToValue = $convertNullToValue;
58
+ }
59
+ /**
60
+ * @return Google_Service_TagManager_Parameter
61
+ */
62
+ public function getConvertNullToValue()
63
+ {
64
+ return $this->convertNullToValue;
65
+ }
66
+ /**
67
+ * @param Google_Service_TagManager_Parameter
68
+ */
69
+ public function setConvertTrueToValue(Google_Service_TagManager_Parameter $convertTrueToValue)
70
+ {
71
+ $this->convertTrueToValue = $convertTrueToValue;
72
+ }
73
+ /**
74
+ * @return Google_Service_TagManager_Parameter
75
+ */
76
+ public function getConvertTrueToValue()
77
+ {
78
+ return $this->convertTrueToValue;
79
+ }
80
+ /**
81
+ * @param Google_Service_TagManager_Parameter
82
+ */
83
+ public function setConvertUndefinedToValue(Google_Service_TagManager_Parameter $convertUndefinedToValue)
84
+ {
85
+ $this->convertUndefinedToValue = $convertUndefinedToValue;
86
+ }
87
+ /**
88
+ * @return Google_Service_TagManager_Parameter
89
+ */
90
+ public function getConvertUndefinedToValue()
91
+ {
92
+ return $this->convertUndefinedToValue;
93
+ }
94
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Workspace.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Workspace extends Google_Model
19
+ {
20
+ public $accountId;
21
+ public $containerId;
22
+ public $description;
23
+ public $fingerprint;
24
+ public $name;
25
+ public $path;
26
+ public $tagManagerUrl;
27
+ public $workspaceId;
28
+
29
+ public function setAccountId($accountId)
30
+ {
31
+ $this->accountId = $accountId;
32
+ }
33
+ public function getAccountId()
34
+ {
35
+ return $this->accountId;
36
+ }
37
+ public function setContainerId($containerId)
38
+ {
39
+ $this->containerId = $containerId;
40
+ }
41
+ public function getContainerId()
42
+ {
43
+ return $this->containerId;
44
+ }
45
+ public function setDescription($description)
46
+ {
47
+ $this->description = $description;
48
+ }
49
+ public function getDescription()
50
+ {
51
+ return $this->description;
52
+ }
53
+ public function setFingerprint($fingerprint)
54
+ {
55
+ $this->fingerprint = $fingerprint;
56
+ }
57
+ public function getFingerprint()
58
+ {
59
+ return $this->fingerprint;
60
+ }
61
+ public function setName($name)
62
+ {
63
+ $this->name = $name;
64
+ }
65
+ public function getName()
66
+ {
67
+ return $this->name;
68
+ }
69
+ public function setPath($path)
70
+ {
71
+ $this->path = $path;
72
+ }
73
+ public function getPath()
74
+ {
75
+ return $this->path;
76
+ }
77
+ public function setTagManagerUrl($tagManagerUrl)
78
+ {
79
+ $this->tagManagerUrl = $tagManagerUrl;
80
+ }
81
+ public function getTagManagerUrl()
82
+ {
83
+ return $this->tagManagerUrl;
84
+ }
85
+ public function setWorkspaceId($workspaceId)
86
+ {
87
+ $this->workspaceId = $workspaceId;
88
+ }
89
+ public function getWorkspaceId()
90
+ {
91
+ return $this->workspaceId;
92
+ }
93
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/Zone.php ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_Zone extends Google_Collection
19
+ {
20
+ protected $collection_key = 'childContainer';
21
+ public $accountId;
22
+ protected $boundaryType = 'Google_Service_TagManager_ZoneBoundary';
23
+ protected $boundaryDataType = '';
24
+ protected $childContainerType = 'Google_Service_TagManager_ZoneChildContainer';
25
+ protected $childContainerDataType = 'array';
26
+ public $containerId;
27
+ public $fingerprint;
28
+ public $name;
29
+ public $notes;
30
+ public $path;
31
+ public $tagManagerUrl;
32
+ protected $typeRestrictionType = 'Google_Service_TagManager_ZoneTypeRestriction';
33
+ protected $typeRestrictionDataType = '';
34
+ public $workspaceId;
35
+ public $zoneId;
36
+
37
+ public function setAccountId($accountId)
38
+ {
39
+ $this->accountId = $accountId;
40
+ }
41
+ public function getAccountId()
42
+ {
43
+ return $this->accountId;
44
+ }
45
+ /**
46
+ * @param Google_Service_TagManager_ZoneBoundary
47
+ */
48
+ public function setBoundary(Google_Service_TagManager_ZoneBoundary $boundary)
49
+ {
50
+ $this->boundary = $boundary;
51
+ }
52
+ /**
53
+ * @return Google_Service_TagManager_ZoneBoundary
54
+ */
55
+ public function getBoundary()
56
+ {
57
+ return $this->boundary;
58
+ }
59
+ /**
60
+ * @param Google_Service_TagManager_ZoneChildContainer[]
61
+ */
62
+ public function setChildContainer($childContainer)
63
+ {
64
+ $this->childContainer = $childContainer;
65
+ }
66
+ /**
67
+ * @return Google_Service_TagManager_ZoneChildContainer[]
68
+ */
69
+ public function getChildContainer()
70
+ {
71
+ return $this->childContainer;
72
+ }
73
+ public function setContainerId($containerId)
74
+ {
75
+ $this->containerId = $containerId;
76
+ }
77
+ public function getContainerId()
78
+ {
79
+ return $this->containerId;
80
+ }
81
+ public function setFingerprint($fingerprint)
82
+ {
83
+ $this->fingerprint = $fingerprint;
84
+ }
85
+ public function getFingerprint()
86
+ {
87
+ return $this->fingerprint;
88
+ }
89
+ public function setName($name)
90
+ {
91
+ $this->name = $name;
92
+ }
93
+ public function getName()
94
+ {
95
+ return $this->name;
96
+ }
97
+ public function setNotes($notes)
98
+ {
99
+ $this->notes = $notes;
100
+ }
101
+ public function getNotes()
102
+ {
103
+ return $this->notes;
104
+ }
105
+ public function setPath($path)
106
+ {
107
+ $this->path = $path;
108
+ }
109
+ public function getPath()
110
+ {
111
+ return $this->path;
112
+ }
113
+ public function setTagManagerUrl($tagManagerUrl)
114
+ {
115
+ $this->tagManagerUrl = $tagManagerUrl;
116
+ }
117
+ public function getTagManagerUrl()
118
+ {
119
+ return $this->tagManagerUrl;
120
+ }
121
+ /**
122
+ * @param Google_Service_TagManager_ZoneTypeRestriction
123
+ */
124
+ public function setTypeRestriction(Google_Service_TagManager_ZoneTypeRestriction $typeRestriction)
125
+ {
126
+ $this->typeRestriction = $typeRestriction;
127
+ }
128
+ /**
129
+ * @return Google_Service_TagManager_ZoneTypeRestriction
130
+ */
131
+ public function getTypeRestriction()
132
+ {
133
+ return $this->typeRestriction;
134
+ }
135
+ public function setWorkspaceId($workspaceId)
136
+ {
137
+ $this->workspaceId = $workspaceId;
138
+ }
139
+ public function getWorkspaceId()
140
+ {
141
+ return $this->workspaceId;
142
+ }
143
+ public function setZoneId($zoneId)
144
+ {
145
+ $this->zoneId = $zoneId;
146
+ }
147
+ public function getZoneId()
148
+ {
149
+ return $this->zoneId;
150
+ }
151
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ZoneBoundary.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ZoneBoundary extends Google_Collection
19
+ {
20
+ protected $collection_key = 'customEvaluationTriggerId';
21
+ protected $conditionType = 'Google_Service_TagManager_Condition';
22
+ protected $conditionDataType = 'array';
23
+ public $customEvaluationTriggerId;
24
+
25
+ /**
26
+ * @param Google_Service_TagManager_Condition[]
27
+ */
28
+ public function setCondition($condition)
29
+ {
30
+ $this->condition = $condition;
31
+ }
32
+ /**
33
+ * @return Google_Service_TagManager_Condition[]
34
+ */
35
+ public function getCondition()
36
+ {
37
+ return $this->condition;
38
+ }
39
+ public function setCustomEvaluationTriggerId($customEvaluationTriggerId)
40
+ {
41
+ $this->customEvaluationTriggerId = $customEvaluationTriggerId;
42
+ }
43
+ public function getCustomEvaluationTriggerId()
44
+ {
45
+ return $this->customEvaluationTriggerId;
46
+ }
47
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ZoneChildContainer.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ZoneChildContainer extends Google_Model
19
+ {
20
+ public $nickname;
21
+ public $publicId;
22
+
23
+ public function setNickname($nickname)
24
+ {
25
+ $this->nickname = $nickname;
26
+ }
27
+ public function getNickname()
28
+ {
29
+ return $this->nickname;
30
+ }
31
+ public function setPublicId($publicId)
32
+ {
33
+ $this->publicId = $publicId;
34
+ }
35
+ public function getPublicId()
36
+ {
37
+ return $this->publicId;
38
+ }
39
+ }
inc/lib/google-api/vendor/google/apiclient-services/src/Google/Service/TagManager/ZoneTypeRestriction.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ class Google_Service_TagManager_ZoneTypeRestriction extends Google_Collection
19
+ {
20
+ protected $collection_key = 'whitelistedTypeId';
21
+ public $enable;
22
+ public $whitelistedTypeId;
23
+
24
+ public function setEnable($enable)
25
+ {
26
+ $this->enable = $enable;
27
+ }
28
+ public function getEnable()
29
+ {
30
+ return $this->enable;
31
+ }
32
+ public function setWhitelistedTypeId($whitelistedTypeId)
33
+ {
34
+ $this->whitelistedTypeId = $whitelistedTypeId;
35
+ }
36
+ public function getWhitelistedTypeId()
37
+ {
38
+ return $this->whitelistedTypeId;
39
+ }
40
+ }
inc/pages/google-analytics/ga-trackcode.php DELETED
@@ -1,321 +0,0 @@
1
- <div id="post-body-content">
2
- <div class="settings-wrapper">
3
- <?php
4
- $lists_dimension = array(
5
- 'Disabled',
6
- 'dimension 1',
7
- 'dimension 2',
8
- 'dimension 3',
9
- 'dimension 4',
10
- 'dimension 5',
11
- 'dimension 6',
12
- 'dimension 7',
13
- 'dimension 8',
14
- 'dimension 9',
15
- 'dimension 10',
16
- 'dimension 11',
17
- 'dimension 12',
18
- 'dimension 13',
19
- 'dimension 14',
20
- 'dimension 15',
21
- 'dimension 16',
22
- 'dimension 17',
23
- 'dimension 18',
24
- 'dimension 19',
25
- 'dimension 20'
26
- );
27
-
28
- $trackExclude = $this->ga_tracking['wpmsga_track_exclude'];
29
-
30
- if (empty($this->ga_tracking['wpmsga_dash_tracking'])) {
31
- echo '<div class="error"><p>' . esc_html__('The tracking component is disabled.
32
- You should set Tracking Options to Enabled', 'wp-meta-seo') . '.</p></div>';
33
- }
34
-
35
- if (empty($this->google_alanytics['tableid_jail'])) {
36
- echo "<div class='error'><p>";
37
- esc_html_e('Please select a profile first in order to get Google Analytics data: Select profile ', 'wp-meta-seo');
38
- echo '<a href="' . esc_url(admin_url('admin.php?page=metaseo_google_analytics&view=wpmsga_trackcode')) . '">';
39
- esc_html_e('authorize the plugin', 'wp-meta-seo');
40
- echo '</a></p></div>';
41
- }
42
-
43
- require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-analytics/menu.php');
44
- ?>
45
- <div class="inside content-box">
46
- <form method="post" action="">
47
- <div id="wpmsga-basic">
48
- <p class="wpms_width_100 wpms_left">
49
- <button type="submit" name="Submit" class="ju-button orange-button"
50
- ><?php esc_html_e('Save Changes', 'wp-meta-seo'); ?></button>
51
- </p>
52
-
53
- <div class="ju-settings-option wpms-no-background wpms-no-shadow wpms-no-margin">
54
- <div class="wpms_row_full">
55
- <label class="ju-setting-label wpms_width_100 text">
56
- <?php esc_html_e('Tracking Settings', 'wp-meta-seo') ?>
57
- </label>
58
-
59
- <div class="ju-settings-option wpms_width_100">
60
- <div class="wpms_row_full">
61
- <label class="ju-setting-label wpms_width_100">
62
- <?php esc_html_e('Tracking Options', 'wp-meta-seo') ?>
63
- </label>
64
- <p class="p-d-20">
65
- <label>
66
- <select id="wpmsga_dash_tracking" class="wpms-large-input"
67
- name="_metaseo_ggtracking_settings[wpmsga_dash_tracking]"
68
- onchange="this.form.submit()">
69
- <option value="0" <?php selected($this->ga_tracking['wpmsga_dash_tracking'], 0) ?>>
70
- <?php esc_html_e('Disabled', 'wp-meta-seo') ?>
71
- </option>
72
- <option value="1" <?php selected($this->ga_tracking['wpmsga_dash_tracking'], 1) ?>>
73
- <?php esc_html_e('Enabled', 'wp-meta-seo') ?>
74
- </option>
75
- </select>
76
- <input type="button" name="wpmsClearauthor"
77
- class="wpmsClearauthor ju-button"
78
- value="<?php esc_attr_e('!Remove tracking authorization!', 'wp-meta-seo') ?>">
79
- <span class="spinner"></span>
80
- </label>
81
- </p>
82
- </div>
83
-
84
- <div class="wpms_row_full">
85
- <label class="ju-setting-label wpms_width_100">
86
- <?php esc_html_e('Analytics profile:', 'wp-meta-seo') ?>
87
- </label>
88
- <p class="p-d-20">
89
- <label>
90
- <input type="hidden" name="wpms_nonce"
91
- value="<?php echo esc_attr(wp_create_nonce('wpms_nonce')) ?>">
92
- <select id="tableid_jail" class="wpms-large-input wpms_width_100"
93
- name="tableid_jail">
94
- <?php
95
- echo '<option value="0">' . esc_html__('Select a profile', 'wp-meta-seo') . '</option>';
96
- if (!empty($this->google_alanytics['profile_list'])) {
97
- foreach ($this->google_alanytics['profile_list'] as $items) {
98
- if ($items[3]) {
99
- echo '<optgroup
100
- label="' . esc_attr(WpmsGaTools::stripProtocol($items[3])) . '">';
101
- if (isset($this->google_alanytics['tableid_jail'])
102
- && $this->google_alanytics['tableid_jail'] === $items[1]) {
103
- echo '<option value="' . esc_attr($items[1]) . '" selected';
104
- echo '>' . esc_html($items[0]) . '</option>';
105
- } else {
106
- echo '<option value="' . esc_attr($items[1]) . '" ';
107
- echo '>' . esc_html($items[0]) . '</option>';
108
- }
109
-
110
- echo '</optgroup >';
111
- }
112
- }
113
- } else {
114
- echo '<option value="">
115
- ' . esc_html__('Property not found', 'wp-meta-seo') . '</option>';
116
- }
117
- ?>
118
- </select>
119
- </label>
120
- <?php
121
- if (isset($this->google_alanytics['tableid_jail'])
122
- && isset($this->google_alanytics['profile_list'])) {
123
- $profile_info = WpmsGaTools::getSelectedProfile(
124
- $this->google_alanytics['profile_list'],
125
- $this->google_alanytics['tableid_jail']
126
- );
127
- if (!empty($profile_info[0])
128
- && !empty($this->ga_tracking['wpmsga_dash_tracking'])) {
129
- echo '<pre class="p-lr-20" style="white-space: nowrap;width: 100%;overflow: hidden;text-overflow: ellipsis;">View Name: ' . esc_html($profile_info[0]) . '<br>
130
- Tracking ID: ' . esc_html($profile_info[2]) . '<br>
131
- Default URL: ' . esc_html($profile_info[3]) . '<br>
132
- Time Zone: ' . esc_html($profile_info[5]) . '</pre>';
133
- }
134
- }
135
- ?>
136
- </p>
137
- </div>
138
- </div>
139
- </div>
140
- </div>
141
-
142
- <div class="ju-settings-option wpms-no-background wpms-no-shadow wpms_right wpms-no-margin">
143
- <div class="wpms_row_full">
144
- <label class="ju-setting-label wpms_width_100 text">
145
- <?php esc_html_e('Basic Tracking', 'wp-meta-seo') ?>
146
- </label>
147
-
148
- <div class="ju-settings-option wpms_width_100">
149
- <div class="wpms_row_full">
150
- <label class="ju-setting-label wpms_width_100">
151
- <?php esc_html_e('Tracking Type:', 'wp-meta-seo') ?>
152
- </label>
153
- <p class="p-d-20">
154
- <label>
155
- <select id="wpmsga_dash_tracking_type"
156
- class="wpms-large-input wpms_width_100"
157
- name="_metaseo_ggtracking_settings[wpmsga_dash_tracking_type]">
158
- <option value="classic"
159
- <?php selected($this->ga_tracking['wpmsga_dash_tracking_type'], 'classic') ?>>
160
- <?php esc_html_e('Classic Analytics', 'wp-meta-seo') ?></option>
161
- <option value="universal"
162
- <?php selected($this->ga_tracking['wpmsga_dash_tracking_type'], 'universal') ?>>
163
- <?php esc_html_e('Universal Analytics', 'wp-meta-seo') ?></option>
164
- </select>
165
- </label>
166
- </p>
167
- </div>
168
-
169
- <div class="wpms_row_full">
170
- <label class="ju-setting-label">
171
- <?php esc_html_e('Anonymize IPs while tracking', 'wp-meta-seo') ?>
172
- </label>
173
- <div class="ju-switch-button">
174
- <label class="switch">
175
- <input type="checkbox"
176
- name="_metaseo_ggtracking_settings[wpmsga_dash_anonim]"
177
- <?php checked($this->ga_tracking['wpmsga_dash_anonim'], 1) ?>
178
- value="1" class="wpmsga-settings-switchoo-checkbox"
179
- id="wpmsga_dash_anonim">
180
- <span class="slider round"></span>
181
- </label>
182
- </div>
183
- </div>
184
-
185
- <div class="wpms_row_full">
186
- <label class="ju-setting-label">
187
- <?php esc_html_e('Enable remarketing, demographics and interests reports', 'wp-meta-seo') ?>
188
- </label>
189
- <div class="ju-switch-button">
190
- <label class="switch">
191
- <input type="checkbox"
192
- name="_metaseo_ggtracking_settings[wpmsga_dash_remarketing]"
193
- <?php checked($this->ga_tracking['wpmsga_dash_remarketing'], 1) ?>
194
- value="1" class="wpmsga-settings-switchoo-checkbox"
195
- id="wpmsga_dash_remarketing">
196
- <span class="slider round"></span>
197
- </label>
198
- </div>
199
- </div>
200
- </div>
201
- </div>
202
- </div>
203
-
204
- <div class="ju-settings-option wpms-no-background wpms-no-shadow wpms_width_100 wpms-no-margin">
205
- <div class="ju-settings-option wpms-no-background wpms-no-shadow">
206
- <div class="wpms_row_full">
207
- <label class="ju-setting-label wpms_width_100 text">
208
- <?php esc_html_e('Events Tracking', 'wp-meta-seo') ?>
209
- </label>
210
-
211
- <div class="ju-settings-option wpms_width_100">
212
- <div class="wpms_row_full">
213
- <label class="ju-setting-label wpms_width_100">
214
- <?php esc_html_e('Downloads Regex:', 'wp-meta-seo') ?>
215
- </label>
216
- <p class="p-d-20">
217
- <label>
218
- <input type="text" id="wpmsga_event_downloads"
219
- class="wpms-large-input wpms_width_100"
220
- name="_metaseo_ggtracking_settings[wpmsga_event_downloads]"
221
- value="<?php echo esc_attr($this->ga_tracking['wpmsga_event_downloads']) ?>"
222
- size="50">
223
- </label>
224
- </p>
225
- </div>
226
-
227
- <div class="wpms_row_full">
228
- <label class="ju-setting-label">
229
- <?php esc_html_e('Track downloads, mailto and outbound links', 'wp-meta-seo') ?>
230
- </label>
231
- <div class="ju-switch-button">
232
- <label class="switch">
233
- <input type="checkbox"
234
- name="_metaseo_ggtracking_settings[wpmsga_event_tracking]"
235
- <?php checked($this->ga_tracking['wpmsga_event_tracking'], 1) ?>
236
- value="1" class="wpmsga-settings-switchoo-checkbox"
237
- id="wpmsga_event_tracking">
238
- <span class="slider round"></span>
239
- </label>
240
- </div>
241
- </div>
242
- </div>
243
- </div>
244
- </div>
245
-
246
- <div class="ju-settings-option wpms-no-background wpms-no-shadow wpms_right wpms-no-margin">
247
- <div class="wpms_row_full">
248
- <label class="ju-setting-label wpms_width_100 text">
249
- <?php esc_html_e('Exclude Tracking', 'wp-meta-seo') ?>
250
- </label>
251
-
252
- <div class="ju-settings-option wpms_width_100">
253
- <div class="wpms_row_full">
254
- <label class="ju-setting-label wpms_width_100">
255
- <?php esc_html_e('Exclude tracking for:', 'wp-meta-seo') ?>
256
- </label>
257
- <div class="p-d-20 exclude_tracking">
258
- <div class="pure-checkbox">
259
- <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
260
- <?php
261
- echo (in_array('administrator', $trackExclude)) ? 'checked' : ''
262
- ?>
263
- value="administrator" id="wpmsga_track_exclude_administrator"
264
- type="checkbox">
265
- <label for="wpmsga_track_exclude_administrator">
266
- <?php esc_html_e('Administrator', 'wp-meta-seo'); ?></label>
267
- </div>
268
- <div class="pure-checkbox">
269
- <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
270
- <?php echo (in_array('editor', $trackExclude)) ? 'checked' : '' ?>
271
- value="editor" id="wpmsga_track_exclude_editor" type="checkbox">
272
- <label for="wpmsga_track_exclude_editor">
273
- <?php esc_html_e('Editor', 'wp-meta-seo'); ?>
274
- </label>
275
- </div>
276
- <div class="pure-checkbox">
277
- <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
278
- <?php echo (in_array('author', $trackExclude)) ? 'checked' : '' ?>
279
- value="author" id="wpmsga_track_exclude_author" type="checkbox">
280
- <label for="wpmsga_track_exclude_author">
281
- <?php esc_html_e('Author', 'wp-meta-seo'); ?>
282
- </label>
283
- </div>
284
- <div class="pure-checkbox">
285
- <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
286
- <?php
287
- echo (in_array('contributor', $trackExclude)) ? 'checked' : ''
288
- ?>
289
- value="contributor" id="wpmsga_track_exclude_contributor"
290
- type="checkbox">
291
- <label for="wpmsga_track_exclude_contributor">
292
- <?php esc_html_e('Contributor', 'wp-meta-seo'); ?>
293
- </label>
294
- </div>
295
- <div class="pure-checkbox">
296
- <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
297
- <?php echo in_array('subscriber', $trackExclude) ? 'checked' : '' ?>
298
- value="subscriber" id="wpmsga_track_exclude_subscriber"
299
- type="checkbox">
300
- <label for="wpmsga_track_exclude_subscriber">
301
- <?php esc_html_e('Subscriber', 'wp-meta-seo'); ?>
302
- </label>
303
- </div>
304
- </div>
305
- </div>
306
- </div>
307
- </div>
308
- </div>
309
- </div>
310
- <p class="wpms_width_100 wpms_left">
311
- <button type="submit" name="Submit" class="ju-button orange-button"
312
- ><?php esc_html_e('Save Changes', 'wp-meta-seo'); ?></button>
313
- </p>
314
-
315
- <input type="hidden" name="_metaseo_ggtracking_settings[wpmsga_dash_hidden]" value="Y">
316
- <?php wp_nonce_field('gadash_form', 'gadash_security'); ?>
317
- </div>
318
- </form>
319
- </div>
320
- </div>
321
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/pages/google-analytics/google-analytics.php DELETED
@@ -1,224 +0,0 @@
1
- <div class="wrap">
2
- <?php
3
- require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-analytics/menu.php');
4
- wp_enqueue_script('jquery');
5
- ?>
6
- <h2 class="wpms_uppercase"><?php esc_html_e('Google Analytics tracking & report', 'wp-meta-seo') ?></h2>
7
- <p class="ju-description"><?php esc_html_e('Enable Google Analytics tracking and reports using a Google Analytics direct connection. Require free Google Cloud credentials', 'wp-meta-seo') ?></p>
8
- <p class="wpms-ga-link-document">
9
- <a class="ju-link-classic" href="<?php echo esc_url('https://www.joomunited.com/wordpress-documentation/wp-meta-seo/343-wp-meta-seo-google-analytics-integration') ?>"
10
- target="_blank"><?php esc_html_e('DOCUMENTATION', 'wp-meta-seo') ?></a>
11
- <a class="ju-link-classic" href="<?php echo esc_url('https://console.cloud.google.com/apis/dashboard') ?>" style="margin-left: 15px"
12
- target="_blank"><?php esc_html_e('GET GOOGLE CREDENTIALS >>', 'wp-meta-seo') ?></a>
13
- </p>
14
- <?php
15
- $display_body_info = '';
16
- $display_body_access = 'style=display:none;';
17
- if (!empty($this->google_alanytics['wpmsga_dash_clientid']) && !empty($this->google_alanytics['wpmsga_dash_clientsecret'])) {
18
- $display_body_info = 'style=display:none;';
19
- $display_body_access = '';
20
- }
21
- ?>
22
- <form name="input" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" method="post" style="margin-top: 20px">
23
- <?php wp_nonce_field('gadash_form', 'gadash_security'); ?>
24
- <input type="hidden" name="wpms_nonce" value="<?php echo esc_attr(wp_create_nonce('wpms_nonce')) ?>">
25
-
26
- <div class="ju-settings-option wpms_ga_info background-none" <?php echo esc_attr($display_body_info) ?>>
27
- <div class="wpms_row_full">
28
- <label class="ju-setting-label"><?php esc_html_e('Client ID', 'wp-meta-seo') ?></label>
29
- <div class="ju-switch-button">
30
- <input type="text" name="wpmsga_dash_clientid" class="wpms-large-input wpmsga_dash_input" size="60"
31
- value="<?php echo esc_attr((!empty($this->google_alanytics['wpmsga_dash_clientid'])) ? $this->google_alanytics['wpmsga_dash_clientid'] : '') ?>">
32
- </div>
33
- </div>
34
- <div class="wpms_row_full">
35
- <label class="ju-setting-label"><?php esc_html_e('Client Secret', 'wp-meta-seo') ?></label>
36
- <div class="ju-switch-button">
37
- <input type="text" name="wpmsga_dash_clientsecret" class="wpms-large-input wpmsga_dash_input" size="60"
38
- value="<?php echo esc_attr((!empty($this->google_alanytics['wpmsga_dash_clientsecret'])) ? $this->google_alanytics['wpmsga_dash_clientsecret'] : '') ?>">
39
- </div>
40
- </div>
41
- <div class="wpms_row_full save-ga-field">
42
- <input type="button" class="ju-button save-ga-infomation orange-button" <?php echo esc_attr($display_body_access)?>
43
- value="<?php esc_html_e('Save and Continue', 'wp-meta-seo') ?>" />
44
- <img class="save-ga-loader" src="<?php echo esc_url(WPMETASEO_PLUGIN_URL . '/assets/images/ajax-loader1.gif') ?>" width="50px"
45
- style="display:none;margin-left:10px;vertical-align: middle" />
46
- </div>
47
- </div>
48
- <div class="ju-settings-option wpms_ga_access background-none" <?php echo esc_attr($display_body_access) ?>>
49
- <div class="wpms_row_full">
50
- <input type="button" class="ju-button wpms-ga-back-information"
51
- value="<?php esc_html_e('Back to credentials', 'wp-meta-seo') ?>">
52
- </div>
53
- <div class="wpms_row_full">
54
- <label class="ju-setting-label" title="<?php esc_attr_e('Use the generate access code to get your access code!', 'wp-meta-seo') ?>">
55
- <?php esc_html_e('Access Code', 'wp-meta-seo'); ?>
56
- </label>
57
- <div class="ju-switch-button">
58
- <input type="text" class="wpms-large-input" id="ga_dash_code" name="wpms_ga_code" value="" size="60" />
59
- </div>
60
- <button type="submit" class="ju-button orange-button" data-href="<?php echo esc_url($authUrl) ?>" id="wpms-ga-get-accesscode"
61
- data-type="link"><?php esc_html_e('Generate Access Code', 'wp-meta-seo') ?></button>
62
- </div>
63
- </div>
64
-
65
- <script>
66
- jQuery('body').on('click', '.wpmsga-advanced-config-header', function (e) {
67
- if (jQuery(this).hasClass('down')) {
68
- jQuery(this).removeClass('down').addClass('up');
69
- } else {
70
- jQuery(this).removeClass('up').addClass('down');
71
- }
72
-
73
- jQuery.cookie('wpmsga-advanced-box', jQuery('.wpmsga-advanced-box .content-box').is(':hidden').toString());
74
- jQuery(this).closest('.wpmsga-advanced-box').find('.content-box').stop().slideToggle();
75
- });
76
-
77
- jQuery(document).ready(function ($) {
78
- if ($.cookie('wpmsga-advanced-box') === 'true') {
79
- $('.wpmsga-advanced-box .content-box').show();
80
- $('.wpmsga-advanced-config-header').removeClass('down').addClass('up');
81
- } else {
82
- $('.wpmsga-advanced-box .content-box').hide();
83
- $('.wpmsga-advanced-config-header').removeClass('up').addClass('down');
84
- }
85
-
86
- $('input.wpmsga_dash_input').on('keyup', function () {
87
- if ($('input[name="wpmsga_dash_clientid"]').val() !== '' && $('input[name="wpmsga_dash_clientsecret"]').val()) {
88
- $('.save-ga-infomation').show();
89
- } else {
90
- $('.save-ga-infomation').hide();
91
- }
92
- });
93
-
94
- $('input#ga_dash_code').on('keyup', function () {
95
- if ($(this).val() !== '') {
96
- $('button#wpms-ga-get-accesscode').html('Save and Apply');
97
- $('button#wpms-ga-get-accesscode').attr('name', 'ga_dash_authorize');
98
- $('button#wpms-ga-get-accesscode').attr('data-type', 'save');
99
- } else {
100
- $('button#wpms-ga-get-accesscode').html('Generate Access Code');
101
- $('button#wpms-ga-get-accesscode').removeAttr('name');
102
- $('button#wpms-ga-get-accesscode').attr('data-type', 'link');
103
- }
104
- });
105
-
106
- $('button#wpms-ga-get-accesscode').on('click', function (e) {
107
- if ($(this).attr('data-type') === 'link') {
108
- e.preventDefault();
109
- window.open($(this).attr('data-href'),"_blank");
110
- return false;
111
- }
112
- });
113
-
114
- $('input.save-ga-infomation').click(function () {
115
- var wpmsga_dash_clientid = $('input[name="wpmsga_dash_clientid"').val();
116
- var wpmsga_dash_clientsecret = $('input[name="wpmsga_dash_clientsecret"').val();
117
- $('.save-ga-field .save-ga-loader').show();
118
- if (wpmsga_dash_clientid !== '' && wpmsga_dash_clientsecret !== '') {
119
- $.ajax({
120
- url: ajaxurl,
121
- method: 'POST',
122
- dataType: 'json',
123
- data: {
124
- 'action': 'wpms_ga_save_information',
125
- 'wpmsga_dash_clientid': wpmsga_dash_clientid,
126
- 'wpmsga_dash_clientsecret': wpmsga_dash_clientsecret,
127
- 'wpms_nonce': $('input[name="wpms_nonce"]').val()
128
- },
129
- success: function (res) {
130
- if (res.status) {
131
- $('#wpms-ga-get-accesscode').attr('data-href', res.authUrl);
132
- $('.wpms_ga_info').hide();
133
- $('.save-ga-field .save-ga-loader').hide();
134
- $('.wpms_ga_access').show('fade');
135
- }
136
- }
137
- });
138
- } else {
139
- if (wpmsga_dash_clientid === '') {
140
- $('input[name="wpmsga_dash_clientid"').focus();
141
- }
142
- if (wpmsga_dash_clientsecret === '') {
143
- $('input[name="wpmsga_dash_clientsecret"').focus();
144
- }
145
- }
146
- });
147
-
148
- $('.wpms-ga-back-information').click(function () {
149
- $('.wpms_ga_access').hide();
150
- $('.wpms_ga_info').show('fade');
151
- })
152
- });
153
- </script>
154
- <div class="wpmsga-advanced-configuration">
155
- <div class="wpmsga-advanced-box">
156
- <h2 class="wpmsga-advanced-config-header down">
157
- <?php esc_html_e('Advanced configuration', 'wp-meta-seo') ?>
158
- </h2>
159
- <div class="content-box">
160
- <h4 class="wpms_uppercase"><?php esc_html_e('Google analytics tracking only', 'wp-meta-seo') ?></h4>
161
- <p class="ju-description"><?php esc_html_e('Enable Google Analytics tracking only. You won\'t be
162
- able to display statistics in your', 'wp-meta-seo') ?></p>
163
- <p class="ju-description"><?php esc_html_e('Wordpress admin, only on Google Analytics website', 'wp-meta-seo') ?></p>
164
-
165
- <table class="wpms-settings-options">
166
- <tr>
167
- <td class="wpms-settings-title"><label for="wpms_ga_uax_reference" class="wpms-text"
168
- title="<?php esc_attr_e('Analytics UA-X reference', 'wp-meta-seo') ?>">
169
- <?php esc_html_e('Analytics UA-X reference:', 'wp-meta-seo'); ?></label>
170
- </td>
171
- <td>
172
- <input type="text" class="wpms-large-input" id="wpms_ga_uax_reference"
173
- name="_metaseo_ga_disconnect[wpms_ga_uax_reference]"
174
- value="<?php echo esc_attr($this->gaDisconnect['wpms_ga_uax_reference']) ?>"
175
- size="61">
176
- <input type="hidden" name="wpms_nonce"
177
- value="<?php echo esc_attr(wp_create_nonce('wpms_nonce')) ?>">
178
- </td>
179
- </tr>
180
- <tr>
181
- <td class="wpms-settings-title"><label for="wpms_ga_uax_reference" class="wpms-text"
182
- title="<?php esc_attr_e('Analytics tracking type', 'wp-meta-seo') ?>">
183
- <?php esc_html_e('Analytics tracking type', 'wp-meta-seo'); ?></label>
184
- </td>
185
- <td>
186
- <label>
187
- <select id="wpmsga_dash_tracking_type" class="wpms-large-input"
188
- name="_metaseo_ga_disconnect[wpmsga_dash_tracking_type]">
189
- <option value="classic"
190
- <?php selected($this->gaDisconnect['wpmsga_dash_tracking_type'], 'classic') ?>>
191
- <?php esc_html_e('Classic Analytics', 'wp-meta-seo') ?>
192
- </option>
193
- <option value="universal"
194
- <?php selected($this->gaDisconnect['wpmsga_dash_tracking_type'], 'universal') ?>>
195
- <?php esc_html_e('Universal Analytics', 'wp-meta-seo') ?>
196
- </option>
197
- </select>
198
- </label>
199
- </td>
200
- </tr>
201
- </table>
202
- <p class="ju-description">
203
- <?php esc_html_e('If you are using Universal Analytics make sure you have changed your account to a Universal Analytics', 'wp-meta-seo') ?>
204
- </p>
205
- <p class="ju-description">
206
- <?php esc_html_e('property in Google Analytics Read more about Universal Analytics ', 'wp-meta-seo') ?>
207
- <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/upgrade/">here</a>
208
- </p>
209
- <p class="ju-description"><?php esc_html_e('OR use Analytics JS code', 'wp-meta-seo') ?></p>
210
- <label>
211
- <textarea name="_metaseo_ga_disconnect[wpmsga_code_tracking]" class="wpmsga_code_tracking">
212
- <?php echo esc_textarea($this->gaDisconnect['wpmsga_code_tracking']); ?>
213
- </textarea>
214
- </label>
215
- </div>
216
- </div>
217
- </div>
218
-
219
- <p>
220
- <button type="submit" class="ju-button orange-button wpmsga_authorize" name="ga_dash_authorize"
221
- ><?php esc_html_e('Save Changes', 'wp-meta-seo'); ?></button>
222
- </p>
223
- </form>
224
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/pages/google-analytics/menu.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- if (!empty($this->google_alanytics)) :
3
- ?>
4
- <ul class="wpmstabs wpms-nav-tab-wrapper">
5
-
6
- <li class="tab wpmstab col" style="min-width: 240px">
7
- <?php
8
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
9
- if (empty($_GET['view'])) {
10
- ?>
11
- <a href="<?php echo esc_url(admin_url('admin.php?page=metaseo_google_analytics')) ?>" class="active">
12
- <?php esc_html_e('Google Analytics Report', 'wp-meta-seo') ?>
13
- </a>
14
- <?php
15
- echo '<div class="indicator" style="bottom: 0; left: 0;width:100%"></div>';
16
- } else {
17
- ?>
18
- <a href="<?php echo esc_url(admin_url('admin.php?page=metaseo_google_analytics')) ?>">
19
- <?php esc_html_e('Google Analytics Report', 'wp-meta-seo') ?>
20
- </a>
21
- <?php
22
- }
23
- ?>
24
- </li>
25
-
26
- <li class="tab wpmstab col">
27
- <?php
28
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
29
- if (isset($_GET['view']) && $_GET['view'] === 'wpmsga_trackcode') {
30
- ?>
31
- <a href="<?php echo esc_url(admin_url('admin.php?page=metaseo_google_analytics&view=wpmsga_trackcode')) ?>" class="active">
32
- <?php esc_html_e('Tracking code', 'wp-meta-seo') ?>
33
- </a>
34
- <?php
35
- echo '<div class="indicator" style="bottom: 0; left: 0;width:100%"></div>';
36
- } else {
37
- ?>
38
- <a href="<?php echo esc_url(admin_url('admin.php?page=metaseo_google_analytics&view=wpmsga_trackcode')) ?>">
39
- <?php esc_html_e('Tracking code', 'wp-meta-seo') ?>
40
- </a>
41
- <?php
42
- }
43
- ?>
44
- </li>
45
- </ul>
46
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/pages/{google-analytics → google-services}/form-connect.php RENAMED
File without changes
inc/pages/google-services/ga-trackcode.php ADDED
@@ -0,0 +1,405 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-services/menu.php');
3
+ ?>
4
+ <div class="wpms-ga-setting">
5
+ <h3 class="wpms-ga-setting-title up">
6
+ <?php esc_html_e('Tracking settings', 'wp-meta-seo') ?>
7
+ </h3>
8
+ <div class="wpms-ga-setting-content">
9
+ <div id="post-body-content">
10
+ <div class="settings-wrapper">
11
+ <?php
12
+ $lists_dimension = array(
13
+ 'Disabled',
14
+ 'dimension 1',
15
+ 'dimension 2',
16
+ 'dimension 3',
17
+ 'dimension 4',
18
+ 'dimension 5',
19
+ 'dimension 6',
20
+ 'dimension 7',
21
+ 'dimension 8',
22
+ 'dimension 9',
23
+ 'dimension 10',
24
+ 'dimension 11',
25
+ 'dimension 12',
26
+ 'dimension 13',
27
+ 'dimension 14',
28
+ 'dimension 15',
29
+ 'dimension 16',
30
+ 'dimension 17',
31
+ 'dimension 18',
32
+ 'dimension 19',
33
+ 'dimension 20'
34
+ );
35
+
36
+ $trackExclude = $this->ga_tracking['wpmsga_track_exclude'];
37
+ if (empty($this->ga_tracking['wpmsga_dash_tracking'])) {
38
+ echo '<div class="error"><p>' .
39
+ sprintf(
40
+ esc_html__('The tracking component is disabled. You should set %1$s to %2$s', 'wp-meta-seo'),
41
+ '<strong>' . esc_html__('Tracking Options', 'wp-meta-seo') . '</strong>',
42
+ '<strong>' . esc_html__('Enabled', 'wp-meta-seo') . '</strong>'
43
+ ) . '</p></div>';
44
+ }
45
+ if (empty($this->google_alanytics['tableid_jail'])) {
46
+ echo "<div class='error'><p>";
47
+ esc_html_e('Please select a profile first in order to get Google Analytics data', 'wp-meta-seo');
48
+ echo '</p></div>';
49
+ }
50
+ ?>
51
+ <div class="inside track-setting-content-box">
52
+ <form method="post" action="">
53
+ <div id="wpmsga-basic">
54
+ <p class="wpms_width_100 wpms_left">
55
+ <button type="submit" name="Submit" class="ju-button orange-button"
56
+ ><?php esc_html_e('Save Changes', 'wp-meta-seo'); ?></button>
57
+ </p>
58
+
59
+ <!--Tracking setting-->
60
+ <div class="ju-settings-option wpms-no-background wpms-no-shadow wpms-no-margin">
61
+ <div class="wpms_row_full">
62
+ <label class="ju-setting-label wpms_width_100 text">
63
+ <?php esc_html_e('Tracking Settings', 'wp-meta-seo') ?>
64
+ </label>
65
+ <div class="ju-settings-option wpms_width_100">
66
+ <div class="wpms_row_full" style="margin-bottom: 0">
67
+ <label class="ju-setting-label wpms_width_100">
68
+ <?php esc_html_e('Tracking Options', 'wp-meta-seo') ?>
69
+ </label>
70
+ <p class="p-d-20">
71
+ <label>
72
+ <select id="wpmsga_dash_tracking" class="wpms-large-input"
73
+ name="_metaseo_ggtracking_settings[wpmsga_dash_tracking]"
74
+ onchange="this.form.submit()">
75
+ <option value="0" <?php selected($this->ga_tracking['wpmsga_dash_tracking'], 0) ?>>
76
+ <?php esc_html_e('Disabled', 'wp-meta-seo') ?>
77
+ </option>
78
+ <option value="1" <?php selected($this->ga_tracking['wpmsga_dash_tracking'], 1) ?>>
79
+ <?php esc_html_e('Enabled', 'wp-meta-seo') ?>
80
+ </option>
81
+ </select>
82
+ <input type="button" name="wpmsClearauthor"
83
+ class="wpmsClearauthor ju-button"
84
+ value="<?php esc_attr_e('!Remove tracking authorization!', 'wp-meta-seo') ?>">
85
+ </label>
86
+ </p>
87
+ </div>
88
+
89
+ <div class="wpms_row_full" style="margin-top: 0">
90
+ <label class="ju-setting-label wpms_width_100">
91
+ <?php esc_html_e('Analytics profile:', 'wp-meta-seo') ?>
92
+ </label>
93
+ <p class="p-d-20">
94
+ <label>
95
+ <input type="hidden" name="wpms_nonce"
96
+ value="<?php echo esc_attr(wp_create_nonce('wpms_nonce')) ?>">
97
+ <script>
98
+ var profileList = <?php echo json_encode($this->google_alanytics['profile_list']); ?>;
99
+ </script>
100
+ <select onclick="changeSettingProfile(this.value, profileList)" id="tableid_jail" class="wpms-large-input wpms_width_100"
101
+ name="tableid_jail">
102
+ <?php
103
+ echo '<option value="0">' . esc_html__('Select a profile', 'wp-meta-seo') . '</option>';
104
+ if (!empty($this->google_alanytics['profile_list'])) {
105
+ foreach ($this->google_alanytics['profile_list'] as $items) {
106
+ if ($items[1]) {
107
+ echo '<optgroup
108
+ label="' . esc_attr($items[3]) . '">';
109
+ if (isset($this->google_alanytics['tableid_jail'])
110
+ && $this->google_alanytics['tableid_jail'] === $items[1]) {
111
+ echo '<option value="' . esc_attr($items[1]) . '" selected ';
112
+ echo '>' . esc_html($items[0]) . '</option>';
113
+ } else {
114
+ echo '<option value="' . esc_attr($items[1]) . '" ';
115
+ echo '>' . esc_html($items[0]) . '</option>';
116
+ }
117
+
118
+ echo '</optgroup >';
119
+ }
120
+ }
121
+ } else {
122
+ echo '<option value="">
123
+ ' . esc_html__('Property not found', 'wp-meta-seo') . '</option>';
124
+ }
125
+ ?>
126
+ </select>
127
+ </label>
128
+ <?php
129
+ if (isset($this->google_alanytics['tableid_jail'])
130
+ && isset($this->google_alanytics['profile_list'])) {
131
+ $profile_info = WpmsGaTools::getSelectedProfile(
132
+ $this->google_alanytics['profile_list'],
133
+ $this->google_alanytics['tableid_jail']
134
+ );
135
+ if (!empty($profile_info[0])
136
+ && !empty($this->ga_tracking['wpmsga_dash_tracking'])) {
137
+ echo '<pre class="p-lr-20" style="white-space: nowrap;width: 100%;overflow: hidden;text-overflow: ellipsis;"><div id="tracking-profile-info">';
138
+ if ($profile_info[0]) {
139
+ echo 'Profile Name: ' . esc_html($profile_info[0]) . '<br>';
140
+ }
141
+ if ($profile_info[1]) {
142
+ echo 'Profile ID: ' . esc_html($profile_info[1]) . '<br>';
143
+ }
144
+ if ($profile_info[2]) {
145
+ echo 'Property ID: ' . esc_html($profile_info[2]) . '<br>';
146
+ }
147
+ if ($profile_info[3]) {
148
+ echo 'Default URL: ' . esc_html($profile_info[3]) . '<br>';
149
+ }
150
+ if ($profile_info[4]) {
151
+ echo 'Property Type: ' . esc_html($profile_info[4]) . '<br>';
152
+ }
153
+ if ($profile_info[5]) {
154
+ echo 'Time Shift: ' . esc_html($profile_info[5]) . '<br>';
155
+ }
156
+ if ($profile_info[6]) {
157
+ echo 'Time Zone: ' . esc_html($profile_info[6]) . '<br>';
158
+ }
159
+ if ($profile_info[7]) {
160
+ echo 'Default Page: ' . esc_html($profile_info[7]) . '<br>';
161
+ }
162
+ if ($profile_info[8]) {
163
+ echo 'Measurement ID: ' . esc_html($profile_info[8]) . '<br>';
164
+ }
165
+ echo '</div></pre>';
166
+ }
167
+ } else {
168
+ echo '<pre class="p-lr-20" style="white-space: nowrap;width: 100%;overflow: hidden;text-overflow: ellipsis;"><div id="tracking-profile-info">';
169
+ echo '</div></pre>';
170
+ }
171
+
172
+ ?>
173
+ </p>
174
+ </div>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ <!--End Tracking setting-->
179
+
180
+ <!--Basic Tracking-->
181
+ <div class="ju-settings-option wpms-no-background wpms-no-shadow wpms_right wpms-no-margin">
182
+ <?php
183
+ if (isset($this->google_alanytics['tableid_jail'])
184
+ && isset($this->google_alanytics['profile_list'])) {
185
+ $profile_info = WpmsGaTools::getSelectedProfile(
186
+ $this->google_alanytics['profile_list'],
187
+ $this->google_alanytics['tableid_jail']
188
+ );
189
+ }
190
+ ?>
191
+ <div class="wpms_row_full">
192
+ <label class="ju-setting-label wpms_width_100 text">
193
+ <?php esc_html_e('Basic Tracking', 'wp-meta-seo') ?>
194
+ </label>
195
+
196
+ <div class="ju-settings-option wpms_width_100">
197
+ <div id="gg-tracking-type" class="wpms_row_full" style="margin-bottom: 0">
198
+ <label class="ju-setting-label wpms_width_100">
199
+ <?php esc_html_e('Tracking Type:', 'wp-meta-seo') ?>
200
+ </label>
201
+ <p class="p-d-20">
202
+ <label>
203
+ <select id="wpmsga_dash_tracking_type"
204
+ class="wpms-large-input wpms_width_100"
205
+ name="_metaseo_ggtracking_settings[wpmsga_dash_tracking_type]">
206
+ <option value="classic"
207
+ <?php selected($this->ga_tracking['wpmsga_dash_tracking_type'], 'classic') ?>>
208
+ <?php esc_html_e('Classic Analytics', 'wp-meta-seo') ?></option>
209
+ <option value="universal"
210
+ <?php selected($this->ga_tracking['wpmsga_dash_tracking_type'], 'universal') ?>
211
+ >
212
+ <?php esc_html_e('Universal Analytics', 'wp-meta-seo') ?></option>
213
+ </select>
214
+ </label>
215
+ </p>
216
+ </div>
217
+ <div id="anonymize-ip-tracking" class="wpms_row_full" style="margin-bottom: 0; margin-top: 0">
218
+ <label class="ju-setting-label">
219
+ <?php esc_html_e('Anonymize IPs while tracking', 'wp-meta-seo') ?>
220
+ </label>
221
+ <div class="ju-switch-button">
222
+ <label class="switch">
223
+ <input type="checkbox"
224
+ name="_metaseo_ggtracking_settings[wpmsga_dash_anonim]"
225
+ <?php checked($this->ga_tracking['wpmsga_dash_anonim'], 1); ?>
226
+ value="1" class="wpmsga-settings-switchoo-checkbox"
227
+ id="wpmsga_dash_anonim">
228
+ <span class="slider round"></span>
229
+ </label>
230
+ </div>
231
+ </div>
232
+ <?php if (isset($profile_info) && $profile_info[4] === 'GA4') {
233
+ ?>
234
+ <script>
235
+ document.getElementById('anonymize-ip-tracking').style.display = 'none';
236
+ document.getElementById('gg-tracking-type').style.display = 'none';
237
+ </script>
238
+ <?php } ?>
239
+ <div class="wpms_row_full" style="margin-top: 0">
240
+ <label class="ju-setting-label">
241
+ <?php esc_html_e('Enable remarketing, demographics and interests reports', 'wp-meta-seo') ?>
242
+ </label>
243
+ <div class="ju-switch-button">
244
+ <label class="switch">
245
+ <input type="checkbox"
246
+ name="_metaseo_ggtracking_settings[wpmsga_dash_remarketing]"
247
+ <?php checked($this->ga_tracking['wpmsga_dash_remarketing'], 1) ?>
248
+ value="1" class="wpmsga-settings-switchoo-checkbox"
249
+ id="wpmsga_dash_remarketing">
250
+ <span class="slider round"></span>
251
+ </label>
252
+ </div>
253
+ </div>
254
+ </div>
255
+ </div>
256
+ </div>
257
+ <!--End Basic tracking-->
258
+
259
+ <!--Events Tracking-->
260
+ <div class="ju-settings-option wpms-no-background wpms-no-shadow wpms_width_100 wpms-no-margin">
261
+ <div class="ju-settings-option wpms-no-background wpms-no-shadow">
262
+ <div class="wpms_row_full">
263
+ <label class="ju-setting-label wpms_width_100 text">
264
+ <?php esc_html_e('Events Tracking', 'wp-meta-seo') ?>
265
+ </label>
266
+
267
+ <div class="ju-settings-option wpms_width_100">
268
+ <div class="wpms_row_full" style="margin-bottom: 0">
269
+ <label class="ju-setting-label wpms_width_100">
270
+ <?php esc_html_e('Downloads Regex:', 'wp-meta-seo') ?>
271
+ </label>
272
+ <p class="p-d-20">
273
+ <label>
274
+ <input type="text" id="wpmsga_event_downloads"
275
+ class="wpms-large-input wpms_width_100"
276
+ name="_metaseo_ggtracking_settings[wpmsga_event_downloads]"
277
+ value="<?php echo esc_attr($this->ga_tracking['wpmsga_event_downloads']) ?>"
278
+ size="50">
279
+ </label>
280
+ </p>
281
+ </div>
282
+
283
+ <div class="wpms_row_full" style="margin-top: 0">
284
+ <label class="ju-setting-label">
285
+ <?php esc_html_e('Track downloads, mailto and outbound links', 'wp-meta-seo') ?>
286
+ </label>
287
+ <div class="ju-switch-button">
288
+ <label class="switch">
289
+ <input type="checkbox"
290
+ name="_metaseo_ggtracking_settings[wpmsga_event_tracking]"
291
+ <?php checked($this->ga_tracking['wpmsga_event_tracking'], 1) ?>
292
+ value="1" class="wpmsga-settings-switchoo-checkbox"
293
+ id="wpmsga_event_tracking">
294
+ <span class="slider round"></span>
295
+ </label>
296
+ </div>
297
+ </div>
298
+ </div>
299
+ </div>
300
+ </div>
301
+
302
+ <div class="ju-settings-option wpms-no-background wpms-no-shadow wpms_right wpms-no-margin">
303
+ <div class="wpms_row_full">
304
+ <label class="ju-setting-label wpms_width_100 text">
305
+ <?php esc_html_e('Exclude Tracking', 'wp-meta-seo') ?>
306
+ </label>
307
+
308
+ <div class="ju-settings-option wpms_width_100">
309
+ <div class="wpms_row_full">
310
+ <label class="ju-setting-label wpms_width_100">
311
+ <?php esc_html_e('Exclude tracking for:', 'wp-meta-seo') ?>
312
+ </label>
313
+ <div class="p-d-20 exclude_tracking">
314
+ <div class="pure-checkbox">
315
+ <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
316
+ <?php
317
+ echo (in_array('administrator', $trackExclude)) ? 'checked' : ''
318
+ ?>
319
+ value="administrator" id="wpmsga_track_exclude_administrator"
320
+ type="checkbox">
321
+ <label for="wpmsga_track_exclude_administrator">
322
+ <?php esc_html_e('Administrator', 'wp-meta-seo'); ?></label>
323
+ </div>
324
+ <div class="pure-checkbox">
325
+ <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
326
+ <?php echo (in_array('editor', $trackExclude)) ? 'checked' : '' ?>
327
+ value="editor" id="wpmsga_track_exclude_editor" type="checkbox">
328
+ <label for="wpmsga_track_exclude_editor">
329
+ <?php esc_html_e('Editor', 'wp-meta-seo'); ?>
330
+ </label>
331
+ </div>
332
+ <div class="pure-checkbox">
333
+ <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
334
+ <?php echo (in_array('author', $trackExclude)) ? 'checked' : '' ?>
335
+ value="author" id="wpmsga_track_exclude_author" type="checkbox">
336
+ <label for="wpmsga_track_exclude_author">
337
+ <?php esc_html_e('Author', 'wp-meta-seo'); ?>
338
+ </label>
339
+ </div>
340
+ <div class="pure-checkbox">
341
+ <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
342
+ <?php
343
+ echo (in_array('contributor', $trackExclude)) ? 'checked' : ''
344
+ ?>
345
+ value="contributor" id="wpmsga_track_exclude_contributor"
346
+ type="checkbox">
347
+ <label for="wpmsga_track_exclude_contributor">
348
+ <?php esc_html_e('Contributor', 'wp-meta-seo'); ?>
349
+ </label>
350
+ </div>
351
+ <div class="pure-checkbox">
352
+ <input name="_metaseo_ggtracking_settings[wpmsga_track_exclude][]"
353
+ <?php echo in_array('subscriber', $trackExclude) ? 'checked' : '' ?>
354
+ value="subscriber" id="wpmsga_track_exclude_subscriber"
355
+ type="checkbox">
356
+ <label for="wpmsga_track_exclude_subscriber">
357
+ <?php esc_html_e('Subscriber', 'wp-meta-seo'); ?>
358
+ </label>
359
+ </div>
360
+ </div>
361
+ </div>
362
+ </div>
363
+ </div>
364
+ </div>
365
+ </div>
366
+ <!--End Events Tracking-->
367
+
368
+ <p class="wpms_width_100 wpms_left">
369
+ <button type="submit" name="Submit" class="ju-button orange-button"
370
+ ><?php esc_html_e('Save Changes', 'wp-meta-seo'); ?></button>
371
+ </p>
372
+
373
+ <input type="hidden" name="_metaseo_ggtracking_settings[wpmsga_dash_hidden]" value="Y">
374
+ <?php wp_nonce_field('gadash_form', 'gadash_security'); ?>
375
+ </div>
376
+ </form>
377
+ </div>
378
+ </div>
379
+ </div>
380
+ </div>
381
+ </div>
382
+ <!--Slide toggle-->
383
+ <script>
384
+ // Set default
385
+ <?php if (empty($this->google_alanytics['tableid_jail'])) {
386
+ ?>
387
+ jQuery('.wpms-ga-setting-content').removeClass('hidden');
388
+ <?php
389
+ } else {
390
+ ?>
391
+ jQuery('.wpms-ga-setting-content').addClass('hidden');
392
+ <?php
393
+ }
394
+ ?>
395
+ // Up/Down arrow
396
+ jQuery('body').on('click', '.wpms-ga-setting-title', function (e) {
397
+ if (jQuery(this).hasClass('down')) {
398
+ jQuery(this).removeClass('down').addClass('up');
399
+ } else {
400
+ jQuery(this).removeClass('up').addClass('down');
401
+ }
402
+
403
+ jQuery(this).closest('.wpms-ga-setting').find('.wpms-ga-setting-content').stop().slideToggle();
404
+ });
405
+ </script>
inc/pages/google-services/gg-services-connect.php ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <?php
3
+ require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-services/menu.php');
4
+ wp_enqueue_script('jquery');
5
+ ?>
6
+ <div class="wpms-gg-services-connect">
7
+ <h2 class="wpms_uppercase"><?php esc_html_e('Google Analytics tracking & report', 'wp-meta-seo') ?></h2>
8
+ <p class="ju-description"><?php esc_html_e('Enable Google Analytics tracking and reports using a Google Analytics direct connection. Require free Google Cloud credentials', 'wp-meta-seo') ?></p>
9
+ <p class="wpms-ga-link-document">
10
+ <a class="ju-link-classic" href="<?php echo esc_url('https://www.joomunited.com/wordpress-documentation/wp-meta-seo/343-wp-meta-seo-google-analytics-integration') ?>"
11
+ target="_blank"><?php esc_html_e('DOCUMENTATION', 'wp-meta-seo') ?></a>
12
+ <a class="ju-link-classic" href="<?php echo esc_url('https://console.cloud.google.com/apis/dashboard') ?>" style="margin-left: 15px"
13
+ target="_blank"><?php esc_html_e('GET GOOGLE CREDENTIALS >>', 'wp-meta-seo') ?></a>
14
+ </p>
15
+ <?php
16
+ $display_body_info = '';
17
+ $display_body_access = 'style=display:none;';
18
+ if (!empty($this->google_alanytics['wpmsga_dash_clientid']) && !empty($this->google_alanytics['wpmsga_dash_clientsecret'])) {
19
+ $display_body_info = 'style=display:none;';
20
+ $display_body_access = '';
21
+ }
22
+ ?>
23
+ <form name="input" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" method="post" style="margin-top: 20px">
24
+ <?php wp_nonce_field('gadash_form', 'gadash_security'); ?>
25
+ <input type="hidden" name="wpms_nonce" value="<?php echo esc_attr(wp_create_nonce('wpms_nonce')) ?>">
26
+
27
+ <div class="ju-settings-option wpms_ga_info background-none" <?php echo esc_attr($display_body_info) ?>>
28
+ <div class="wpms_row_full">
29
+ <label class="ju-setting-label"><?php esc_html_e('Client ID', 'wp-meta-seo') ?></label>
30
+ <div class="ju-switch-button">
31
+ <input type="text" name="wpmsga_dash_clientid" class="wpms-large-input wpmsga_dash_input" size="60"
32
+ value="<?php echo esc_attr((!empty($this->google_alanytics['wpmsga_dash_clientid'])) ? $this->google_alanytics['wpmsga_dash_clientid'] : '') ?>">
33
+ </div>
34
+ </div>
35
+ <div class="wpms_row_full">
36
+ <label class="ju-setting-label"><?php esc_html_e('Client Secret', 'wp-meta-seo') ?></label>
37
+ <div class="ju-switch-button">
38
+ <input type="text" name="wpmsga_dash_clientsecret" class="wpms-large-input wpmsga_dash_input" size="60"
39
+ value="<?php echo esc_attr((!empty($this->google_alanytics['wpmsga_dash_clientsecret'])) ? $this->google_alanytics['wpmsga_dash_clientsecret'] : '') ?>">
40
+ </div>
41
+ </div>
42
+ <div class="wpms_row_full save-ga-field">
43
+ <input type="button" class="ju-button save-ga-infomation orange-button" <?php echo esc_attr($display_body_access)?>
44
+ value="<?php esc_html_e('Save and Continue', 'wp-meta-seo') ?>" />
45
+ <img class="save-ga-loader" src="<?php echo esc_url(WPMETASEO_PLUGIN_URL . '/assets/images/ajax-loader1.gif') ?>" width="50px"
46
+ style="display:none;margin-left:10px;vertical-align: middle" />
47
+ </div>
48
+ </div>
49
+ <div class="ju-settings-option wpms_ga_access background-none" <?php echo esc_attr($display_body_access) ?>>
50
+ <div class="wpms_row_full">
51
+ <input type="button" class="ju-button wpms-ga-back-information"
52
+ value="<?php esc_html_e('Back to credentials', 'wp-meta-seo') ?>">
53
+ </div>
54
+ <div class="wpms_row_full">
55
+ <label class="ju-setting-label" title="<?php esc_attr_e('Use the generate access code to get your access code!', 'wp-meta-seo') ?>">
56
+ <?php esc_html_e('Access Code', 'wp-meta-seo'); ?>
57
+ </label>
58
+ <div class="ju-switch-button">
59
+ <input type="text" class="wpms-large-input" id="ga_dash_code" name="wpms_gg_access_code" value="" size="60" />
60
+ </div>
61
+ <button type="submit" class="ju-button orange-button" data-href="<?php echo esc_url($authUrl) ?>" id="wpms-gg-get-accesscode"
62
+ data-type="link"><?php esc_html_e('Generate Access Code', 'wp-meta-seo') ?></button>
63
+ </div>
64
+ </div>
65
+
66
+ <script>
67
+ jQuery(document).ready(function ($) {
68
+ $('input.wpmsga_dash_input').on('change', function () {
69
+ if ($('input[name="wpmsga_dash_clientid"]').val() !== '' && $('input[name="wpmsga_dash_clientsecret"]').val()) {
70
+ $('.save-ga-infomation').show();
71
+ } else {
72
+ $('.save-ga-infomation').hide();
73
+ }
74
+ });
75
+
76
+ $('input#ga_dash_code').on('change', function () {
77
+ if ($(this).val() !== '') {
78
+ $('button#wpms-gg-get-accesscode').html('Save and Apply');
79
+ $('button#wpms-gg-get-accesscode').attr('name', 'ga_dash_authorize');
80
+ $('button#wpms-gg-get-accesscode').attr('data-type', 'save');
81
+ } else {
82
+ $('button#wpms-gg-get-accesscode').html('Generate Access Code');
83
+ $('button#wpms-gg-get-accesscode').removeAttr('name');
84
+ $('button#wpms-gg-get-accesscode').attr('data-type', 'link');
85
+ }
86
+ });
87
+
88
+ $('button#wpms-gg-get-accesscode').on('click', function (e) {
89
+ if ($(this).attr('data-type') === 'link') {
90
+ e.preventDefault();
91
+ window.open($(this).attr('data-href'),"_blank");
92
+ return false;
93
+ }
94
+ });
95
+
96
+ $('input.save-ga-infomation').click(function () {
97
+ var wpmsga_dash_clientid = $('input[name="wpmsga_dash_clientid"').val();
98
+ var wpmsga_dash_clientsecret = $('input[name="wpmsga_dash_clientsecret"').val();
99
+ $('.save-ga-field .save-ga-loader').show();
100
+ if (wpmsga_dash_clientid !== '' && wpmsga_dash_clientsecret !== '') {
101
+ $.ajax({
102
+ url: ajaxurl,
103
+ method: 'POST',
104
+ dataType: 'json',
105
+ data: {
106
+ 'action': 'wpms_gg_save_information',
107
+ 'wpmsga_dash_clientid': wpmsga_dash_clientid,
108
+ 'wpmsga_dash_clientsecret': wpmsga_dash_clientsecret,
109
+ 'wpms_nonce': $('input[name="wpms_nonce"]').val()
110
+ },
111
+ success: function (res) {
112
+ if (res.status) {
113
+ $('#wpms-gg-get-accesscode').attr('data-href', res.authUrl);
114
+ $('.wpms_ga_info').hide();
115
+ $('.save-ga-field .save-ga-loader').hide();
116
+ $('.wpms_ga_access').show('fade');
117
+ }
118
+ }
119
+ });
120
+ } else {
121
+ if (wpmsga_dash_clientid === '') {
122
+ $('input[name="wpmsga_dash_clientid"').focus();
123
+ }
124
+ if (wpmsga_dash_clientsecret === '') {
125
+ $('input[name="wpmsga_dash_clientsecret"').focus();
126
+ }
127
+ }
128
+ });
129
+
130
+ $('.wpms-ga-back-information').click(function () {
131
+ $('.wpms_ga_access').hide();
132
+ $('.wpms_ga_info').show('fade');
133
+ })
134
+ });
135
+ </script>
136
+ </form>
137
+ </div>
138
+ </div>
inc/pages/google-services/google-services.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <?php
3
+ require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/google-services/menu.php');
4
+ wp_enqueue_script('jquery');
5
+ ?>
6
+ <h2 class="wpms_uppercase"><?php esc_html_e('Google Analytics Tracking Methods', 'wp-meta-seo') ?></h2>
7
+ <form name="input" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" method="post" style="margin-top: 20px">
8
+ <?php wp_nonce_field('gadash_form', 'gadash_security'); ?>
9
+ <input type="hidden" name="wpms_nonce" value="<?php echo esc_attr(wp_create_nonce('wpms_nonce')) ?>">
10
+ <div class="wpmsga-advanced-configuration">
11
+ <div class="content-box">
12
+ <p class="ju-description">
13
+ <?php esc_html_e('You can active the tracking for 4 methods: Universal,
14
+ Classic Analytics(legacy) or using the Analytics v4 or Tag manager', 'wp-meta-seo') ?></p>
15
+ <table class="wpms-settings-options">
16
+ <tr>
17
+ <td class="wpms-settings-title">
18
+ <label for="wpms_gg_service_tracking_type"
19
+ class="wpms-text"
20
+ title="<?php esc_attr_e('Analytics tracking type', 'wp-meta-seo') ?>">
21
+ <?php esc_html_e('Analytics property type', 'wp-meta-seo'); ?></label>
22
+ </td>
23
+ <td>
24
+ <label>
25
+ <select onclick="requireTrackingIdTitle(this.value)" id="wpms_gg_service_tracking_type"
26
+ class="wpms-large-input"
27
+ name="_metaseo_gg_service_disconnect[wpms_gg_service_tracking_type]">
28
+ <option value="universal"
29
+ <?php
30
+ selected($this->gaDisconnect['wpms_gg_service_tracking_type'], 'universal') ?>>
31
+ <?php esc_html_e('Universal Analytics', 'wp-meta-seo') ?>
32
+ </option>
33
+ <option value="classic"
34
+ <?php
35
+ selected($this->gaDisconnect['wpms_gg_service_tracking_type'], 'classic') ?>>
36
+ <?php esc_html_e('Classic Analytics', 'wp-meta-seo') ?>
37
+ </option>
38
+ <option value="analytics4"
39
+ <?php
40
+ selected($this->gaDisconnect['wpms_gg_service_tracking_type'], 'analytics4') ?>>
41
+ <?php esc_html_e('Analytics 4 Property', 'wp-meta-seo') ?>
42
+ </option>
43
+ <option value="tagmanager"
44
+ <?php
45
+ selected($this->gaDisconnect['wpms_gg_service_tracking_type'], 'tagmanager') ?>>
46
+ <?php esc_html_e('Tag Manager', 'wp-meta-seo') ?>
47
+ </option>
48
+ </select>
49
+ </label>
50
+ </td>
51
+ </tr>
52
+ <tr>
53
+ <td id="wpms-trackingId-title" class="wpms-settings-title">
54
+ <label
55
+ for="wpms_gg_service_tracking_id"
56
+ class="wpms-text"
57
+ title="<?php esc_attr_e('Analytics UA-Tracking ID', 'wp-meta-seo') ?>">
58
+ <?php
59
+ $tracking_type = $this->gaDisconnect['wpms_gg_service_tracking_type'];
60
+ if ($tracking_type === 'analytics4') {
61
+ esc_html_e('Measurement ID', 'wp-meta-seo');
62
+ } elseif ($tracking_type === 'tagmanager') {
63
+ esc_html_e('Container ID', 'wp-meta-seo');
64
+ } else {
65
+ esc_html_e('UA-Tracking ID', 'wp-meta-seo');
66
+ }
67
+
68
+ ?></label>
69
+ </td>
70
+ <td>
71
+ <input type="text" class="wpms-large-input" id="wpms_gg_service_tracking_id"
72
+ name="_metaseo_gg_service_disconnect[wpms_gg_service_tracking_id]"
73
+ value="<?php echo esc_attr($this->gaDisconnect['wpms_gg_service_tracking_id']) ?>"
74
+ size="61">
75
+ <input type="hidden" name="wpms_nonce"
76
+ value="<?php echo esc_attr(wp_create_nonce('wpms_nonce')) ?>">
77
+ </td>
78
+ </tr>
79
+ </table>
80
+ <p class="ju-description">
81
+ <?php esc_html_e('OR use directly any of the tracking JS code', 'wp-meta-seo') ?></p>
82
+ <!--Google Analytics-->
83
+ <div class="wpmsga-advanced-box" style="margin-bottom: 5px">
84
+ <h3 class="wpms-gg-services-directly-header down">
85
+ <?php esc_html_e('Google Analytics', 'wp-meta-seo') ?>
86
+ </h3>
87
+ <div class="content-box analytics-content-box hidden">
88
+ <p class="ju-description"><?php esc_html_e('Paste directly in the field the JS code given by Google. If you use the tracking ID above, this is not necessary', 'wp-meta-seo') ?></p>
89
+ <textarea name="_metaseo_gg_service_disconnect[wpmsga_code_tracking]"
90
+ class="wpmsga_code_tracking wpms-gg-analytics-code">
91
+ <?php echo esc_textarea($this->gaDisconnect['wpmsga_code_tracking']); ?>
92
+ </textarea>
93
+ </label>
94
+ </div>
95
+ </div>
96
+ <!--End Google Analytics-->
97
+ <!--Google Tag manager-->
98
+ <div class="wpmsga-advanced-box">
99
+ <h3 class="wpms-gg-services-directly-header down">
100
+ <?php esc_html_e('Tag Manager', 'wp-meta-seo') ?>
101
+ </h3>
102
+ <div class="content-box tagmanager-content-box hidden">
103
+ <p class="ju-description">
104
+ <?php
105
+ echo sprintf(
106
+ esc_html__('Add the Tag manager code in the %s of your website', 'wp-meta-seo'),
107
+ '<strong>' . esc_html__('<head>', 'wp-meta-seo') . '</strong>'
108
+ );
109
+ ?>
110
+ </p>
111
+ <textarea style="height: 160px"
112
+ name="_metaseo_gg_service_disconnect[wpmstm_header_code_tracking]"
113
+ class="wpmsga_code_tracking wpms-gg-tagmanager-header-code">
114
+ <?php echo esc_textarea($this->gaDisconnect['wpmstm_header_code_tracking']); ?>
115
+ </textarea>
116
+ <p class="ju-description">
117
+ <?php
118
+ echo sprintf(
119
+ esc_html__('Add the Tag manager code in the %s of your website', 'wp-meta-seo'),
120
+ '<strong>' . esc_html__('<body>', 'wp-meta-seo') . '</strong>'
121
+ );
122
+ ?>
123
+ </p>
124
+ <textarea style="height: 100px" name="_metaseo_gg_service_disconnect[wpmstm_body_code_tracking]"
125
+ class="wpmsga_code_tracking wpms-gg-tagmanager-body-code">
126
+ <?php echo esc_textarea($this->gaDisconnect['wpmstm_body_code_tracking']); ?>
127
+ </textarea>
128
+ </div>
129
+ </div>
130
+ <!--End Google Tag manager-->
131
+ </div>
132
+ </div>
133
+
134
+ <p>
135
+ <button type="submit" class="ju-button orange-button wpmsga_authorize gg_service_disconnect_setting"
136
+ name="gg_service_disconnect_setting"
137
+ ><?php esc_html_e('Save Changes', 'wp-meta-seo'); ?></button>
138
+ </p>
139
+ </form>
140
+ <script>
141
+ // Remove the default empty spaces in field
142
+ jQuery('.wpms-gg-analytics-code').val(jQuery('.wpms-gg-analytics-code').val().trim());
143
+ jQuery('.wpms-gg-tagmanager-header-code').val(jQuery('.wpms-gg-tagmanager-header-code').val().trim());
144
+ jQuery('.wpms-gg-tagmanager-body-code').val(jQuery('.wpms-gg-tagmanager-body-code').val().trim());
145
+
146
+ // Slide toggle
147
+ jQuery('body').on('click', '.wpms-gg-services-directly-header', function (e) {
148
+ if (jQuery(this).hasClass('down')) {
149
+ jQuery(this).removeClass('down').addClass('up');
150
+ } else {
151
+ jQuery(this).removeClass('up').addClass('down');
152
+ }
153
+
154
+ jQuery(this).closest('.wpmsga-advanced-box').find('.content-box').stop().slideToggle();
155
+ });
156
+ </script>
157
+ </div>
inc/pages/google-services/menu.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <ul class="wpmstabs wpms-nav-tab-wrapper">
2
+ <!--Google Analytcis Tracking-->
3
+ <li class="tab wpmstab col" style="min-width: 300px">
4
+ <?php
5
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
6
+ if (empty($_GET['view'])) {
7
+ ?>
8
+ <a href="<?php echo esc_url(admin_url('admin.php?page=metaseo_google_analytics')) ?>" class="active">
9
+ <?php esc_html_e('Google Analytics Tracking', 'wp-meta-seo') ?>
10
+ </a>
11
+ <?php
12
+ echo '<div class="indicator" style="bottom: 0; left: 0;width:100%"></div>';
13
+ } else {
14
+ ?>
15
+ <a href="<?php echo esc_url(admin_url('admin.php?page=metaseo_google_analytics')) ?>">
16
+ <?php esc_html_e('Google Analytics Tracking', 'wp-meta-seo') ?>
17
+ </a>
18
+ <?php
19
+ }
20
+ ?>
21
+ </li>
22
+ <!--End Google Analytcis Tracking-->
23
+ <!--Google Analytcis Data-->
24
+ <li class="tab wpmstab col" style="min-width: 300px">
25
+ <?php
26
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
27
+ if (isset($_GET['view']) && $_GET['view'] === 'wpms_gg_service_data') {
28
+ ?>
29
+ <a href="<?php echo esc_url(admin_url('admin.php?page=metaseo_google_analytics&view=wpms_gg_service_data')) ?>"
30
+ class="active">
31
+ <?php esc_html_e('Google Analytics Data', 'wp-meta-seo') ?>
32
+ </a>
33
+ <?php
34
+ echo '<div class="indicator" style="bottom: 0; left: 0;width:100%"></div>';
35
+ } else {
36
+ ?>
37
+ <a href="<?php echo esc_url(admin_url('admin.php?page=metaseo_google_analytics&view=wpms_gg_service_data')) ?>">
38
+ <?php esc_html_e('Google Analytics Data', 'wp-meta-seo') ?>
39
+ </a>
40
+ <?php
41
+ }
42
+ ?>
43
+ </li>
44
+ <!--End Google Analytcis Data-->
45
+ </ul>
inc/pages/settings/breadcrumb.php CHANGED
@@ -50,7 +50,7 @@ defined('ABSPATH') || die('No direct script access allowed!');
50
  <label>
51
  <input id="breadcrumbs_separator" class="wpms_width_100" name="_metaseo_breadcrumbs[separator]"
52
  type="text"
53
- value="<?php echo esc_attr(htmlentities($breadcrumbs['separator'])) ?>" size="50">
54
  </label>
55
  </p>
56
  </div>
50
  <label>
51
  <input id="breadcrumbs_separator" class="wpms_width_100" name="_metaseo_breadcrumbs[separator]"
52
  type="text"
53
+ value="<?php echo esc_attr(htmlentities($breadcrumbs['separator'], ENT_COMPAT, 'UTF-8', true)) ?>" size="50">
54
  </label>
55
  </p>
56
  </div>
inc/pages/settings/image_compression.php CHANGED
@@ -28,6 +28,7 @@ if (isset($_GET['action'])) {
28
  require_once(ABSPATH . 'wp-admin/admin.php');
29
  include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
30
 
 
31
  $plugin = isset($_REQUEST['plugin']) ? trim($_REQUEST['plugin']) : '';
32
  $request_action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
33
  if ('install-plugin' === $request_action) {
28
  require_once(ABSPATH . 'wp-admin/admin.php');
29
  include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
30
 
31
+ //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- work oke in before version
32
  $plugin = isset($_REQUEST['plugin']) ? trim($_REQUEST['plugin']) : '';
33
  $request_action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
34
  if ('install-plugin' === $request_action) {
jutranslation/jutranslation.php CHANGED
@@ -683,7 +683,7 @@ class Jutranslation
683
  echo '<input type="hidden" name="site_url" value="' . esc_url(admin_url()) . '" />';
684
  echo '<input type="hidden" name="extension_updated" value="1" />';
685
  // phpcs:ignore WordPress.Security.EscapeOutput -- Value wrong
686
- echo '<textarea style="display: none" name="strings">' . htmlentities($strings) . '</textarea>';
687
  echo '</form>';
688
  //Add waiting image
689
  echo '<div style="text-align:center"><img src="' .
683
  echo '<input type="hidden" name="site_url" value="' . esc_url(admin_url()) . '" />';
684
  echo '<input type="hidden" name="extension_updated" value="1" />';
685
  // phpcs:ignore WordPress.Security.EscapeOutput -- Value wrong
686
+ echo '<textarea style="display: none" name="strings">' . htmlentities($strings, ENT_COMPAT, 'UTF-8', 'true') . '</textarea>';
687
  echo '</form>';
688
  //Add waiting image
689
  echo '<div style="text-align:center"><img src="' .
languages/wp-meta-seo-en_US.mo CHANGED
Binary file
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: JoomUnited
3
  Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
4
  Requires at least: 4.7
5
  Tested up to: 5.7.1
6
- Stable tag: 4.3.4
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -258,6 +258,13 @@ Yes WP Meta SEO is compatible with Gutenberg editor since 3.7 version.
258
 
259
  == Changelog ==
260
 
 
 
 
 
 
 
 
261
  = 4.3.4 =
262
  * Fix : Remove some jQuery deprecated functions
263
  * Fix : Update Google Analytics library
3
  Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
4
  Requires at least: 4.7
5
  Tested up to: 5.7.1
6
+ Stable tag: 4.3.5
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
258
 
259
  == Changelog ==
260
 
261
+ = 4.3.5 =
262
+ * Add : New Google Analytics tracking UX
263
+ * Add : Support Google Analytics v4 property
264
+ * Add : Support Google Tag manager
265
+ * Fix : Update Meta SEO meta description length
266
+ * Fix : Remove HTML tags from WP Meta SEO meta tags
267
+
268
  = 4.3.4 =
269
  * Fix : Remove some jQuery deprecated functions
270
  * Fix : Update Google Analytics library
wp-meta-seo.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: WP Meta SEO
5
  * Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
6
  * Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
7
- * Version: 4.3.4
8
  * Text Domain: wp-meta-seo
9
  * Domain Path: /languages
10
  * Author: JoomUnited
@@ -28,6 +28,7 @@ if (version_compare(PHP_VERSION, '5.6', '<')) {
28
  {
29
  if (current_user_can('activate_plugins') && is_plugin_active(plugin_basename(__FILE__))) {
30
  deactivate_plugins(__FILE__);
 
31
  unset($_GET['activate']);
32
  }
33
  }
@@ -101,7 +102,7 @@ if (class_exists('\Joomunited\WPMS\JUCheckRequirements')) {
101
  $wpmsCheck = call_user_func('\Joomunited\WPMS\JUCheckRequirements::init', $args);
102
 
103
  if (!$wpmsCheck['success']) {
104
- // Do not load anything more
105
  unset($_GET['activate']);
106
  return;
107
  }
@@ -132,7 +133,7 @@ if (!defined('WPMSEO_VERSION')) {
132
  /**
133
  * Plugin version
134
  */
135
- define('WPMSEO_VERSION', '4.3.4');
136
  }
137
 
138
  if (!defined('WPMS_CLIENTID')) {
@@ -626,18 +627,18 @@ if (is_admin()) {
626
  $meta_twcard,
627
  $meta_twitter_site,
628
  $sitename,
629
- $meta_twdesc,
630
- $meta_twtitle,
631
  $facebook_admin,
632
  $meta_fbimage,
633
- $meta_fbdesc,
634
  $current_url,
635
  $type,
636
  $fbapp_id,
637
- $meta_fbtitle,
638
- $meta_desc_esc,
639
- $meta_keywords_esc,
640
- $meta_title_esc,
641
  $page_index,
642
  $page_follow
643
  );
4
  * Plugin Name: WP Meta SEO
5
  * Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
6
  * Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
7
+ * Version: 4.3.5
8
  * Text Domain: wp-meta-seo
9
  * Domain Path: /languages
10
  * Author: JoomUnited
28
  {
29
  if (current_user_can('activate_plugins') && is_plugin_active(plugin_basename(__FILE__))) {
30
  deactivate_plugins(__FILE__);
31
+ //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Do not load anything more
32
  unset($_GET['activate']);
33
  }
34
  }
102
  $wpmsCheck = call_user_func('\Joomunited\WPMS\JUCheckRequirements::init', $args);
103
 
104
  if (!$wpmsCheck['success']) {
105
+ //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Do not load anything more
106
  unset($_GET['activate']);
107
  return;
108
  }
133
  /**
134
  * Plugin version
135
  */
136
+ define('WPMSEO_VERSION', '4.3.5');
137
  }
138
 
139
  if (!defined('WPMS_CLIENTID')) {
627
  $meta_twcard,
628
  $meta_twitter_site,
629
  $sitename,
630
+ strip_tags(html_entity_decode($meta_twdesc, ENT_COMPAT, 'UTF-8')),
631
+ strip_tags(html_entity_decode($meta_twtitle, ENT_COMPAT, 'UTF-8')),
632
  $facebook_admin,
633
  $meta_fbimage,
634
+ strip_tags(html_entity_decode($meta_fbdesc, ENT_COMPAT, 'UTF-8')),
635
  $current_url,
636
  $type,
637
  $fbapp_id,
638
+ strip_tags(html_entity_decode($meta_fbtitle, ENT_COMPAT, 'UTF-8')),
639
+ esc_html($meta_desc_esc, 'wp-meta-seo'),
640
+ esc_html($meta_keywords_esc, 'wp-meta-seo'),
641
+ strip_tags(html_entity_decode($meta_title_esc, ENT_COMPAT, 'UTF-8')),
642
  $page_index,
643
  $page_follow
644
  );
wpms-sitemap.xsl CHANGED
@@ -136,7 +136,7 @@
136
  </table>
137
  </div>
138
  <div id="footer">
139
- Generated by <a href="https://www.joomunited.com/wordpress-products/wp-meta-seo">WP Meta SEO</a> plugin from <a href="https://www.joomunited.com">JoomUnited</a>
140
  </div>
141
  </body>
142
  </html>
136
  </table>
137
  </div>
138
  <div id="footer">
139
+ Generated by <strong>WP Meta SEO</strong> plugin from <strong>JoomUnited</strong>
140
  </div>
141
  </body>
142
  </html>