Google Analytics Dashboard for WP (GADWP) - Version 5.3.7

Version Description

Download this release

Release Info

Developer chriscct7
Plugin Icon 128x128 Google Analytics Dashboard for WP (GADWP)
Version 5.3.7
Comparing to
See all releases

Code changes from version 5.3.6 to 5.3.7

Files changed (248) hide show
  1. {tags/5.3.3/admin → admin}/ajax-actions.php +0 -0
  2. {trunk/admin → admin}/class-am-notification.php +0 -0
  3. {tags/5.3.1.1/admin → admin}/css/admin-widgets.css +0 -0
  4. {tags/5.3.3/admin → admin}/css/gadwp.css +0 -0
  5. {tags/5.3.1.1/admin → admin}/css/item-reports.css +0 -0
  6. {tags/5.3.1.1/admin → admin}/images/clicky.png +0 -0
  7. {tags/5.3.1.1/admin → admin}/images/gadwp-icon.png +0 -0
  8. {tags/5.3.1.1/admin → admin}/images/google-analytics-dashboard.png +0 -0
  9. {tags/5.3.1.1/admin → admin}/images/help.png +0 -0
  10. {tags/5.3.1.1/admin → admin}/images/mcdn.png +0 -0
  11. {tags/5.3.3/admin → admin}/images/optinmonster.png +0 -0
  12. {tags/5.3.1.1/admin → admin}/images/ssl.png +0 -0
  13. {tags/5.3.1.1/admin → admin}/images/star.png +0 -0
  14. {tags/5.3.1.1/admin → admin}/images/wp.png +0 -0
  15. {tags/5.3.3/admin → admin}/images/wpforms.png +0 -0
  16. {tags/5.3.3/admin → admin}/item-reports.php +0 -0
  17. {tags/5.3.1.1/admin → admin}/js/settings.js +0 -0
  18. {tags/5.3.1.1/admin → admin}/js/ui.js +0 -0
  19. {tags/5.3.1.1/admin → admin}/js/wp-color-picker-script.js +0 -0
  20. {trunk/admin → admin}/settings.php +0 -0
  21. {tags/5.3.4/admin → admin}/setup.php +0 -0
  22. {tags/5.3.4/admin → admin}/tracking.php +0 -0
  23. {tags/5.3.3/admin → admin}/views/access-code.php +0 -0
  24. {tags/5.3.3/admin → admin}/widgets.php +0 -0
  25. assets/banner-772x250-old.png +0 -0
  26. assets/banner-772x250.png +0 -0
  27. assets/icon-128x128.png +0 -0
  28. assets/icon-256x256.png +0 -0
  29. assets/logo.png +0 -0
  30. assets/screenshot-1.png +0 -0
  31. assets/screenshot-2.png +0 -0
  32. assets/screenshot-3.png +0 -0
  33. assets/screenshot-4.png +0 -0
  34. assets/screenshot-5.png +0 -0
  35. assets/screenshot-6.png +0 -0
  36. assets/screenshot-7.png +0 -0
  37. assets/screenshot-8.png +0 -0
  38. assets/screenshot-9.png +0 -0
  39. {tags/5.3.3/common → common}/ajax-actions.php +0 -0
  40. {tags/5.3.3/common → common}/js/reports5.js +0 -0
  41. {tags/5.3.1.1/common → common}/nprogress/nprogress.css +0 -0
  42. {tags/5.3.1.1/common → common}/nprogress/nprogress.js +0 -0
  43. {tags/5.3.1.1/common → common}/realtime/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  44. {tags/5.3.1.1/common → common}/realtime/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  45. {tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  46. {tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  47. {tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  48. {tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  49. {tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  50. {tags/5.3.1.1/common → common}/realtime/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  51. {tags/5.3.1.1/common → common}/realtime/images/ui-icons_222222_256x240.png +0 -0
  52. {tags/5.3.1.1/common → common}/realtime/images/ui-icons_2e83ff_256x240.png +0 -0
  53. {tags/5.3.1.1/common → common}/realtime/images/ui-icons_454545_256x240.png +0 -0
  54. {tags/5.3.1.1/common → common}/realtime/images/ui-icons_888888_256x240.png +0 -0
  55. {tags/5.3.1.1/common → common}/realtime/images/ui-icons_cd0a0a_256x240.png +0 -0
  56. {tags/5.3.3/common → common}/realtime/jquery.ui.tooltip.html.css +0 -0
  57. {tags/5.3.1.1/common → common}/realtime/jquery.ui.tooltip.html.js +0 -0
  58. tags/5.3.4/config.php → config.php +0 -0
  59. {tags/5.3.3/front → front}/ajax-actions.php +0 -0
  60. {tags/5.3.1.1/front → front}/css/item-reports.css +0 -0
  61. {tags/5.3.1.1/front → front}/css/widgets.css +0 -0
  62. {tags/5.3.3/front → front}/item-reports.php +0 -0
  63. {tags/5.3.1.1/front → front}/js/tracking-analytics-events.js +0 -0
  64. {tags/5.3.1.1/front → front}/js/tracking-scrolldepth.js +0 -0
  65. {tags/5.3.1.1/front → front}/js/widgets.js +0 -0
  66. {tags/5.3.3/front → front}/setup.php +0 -0
  67. {tags/5.3.3/front → front}/tracking-analytics.php +0 -0
  68. {tags/5.3.3/front → front}/tracking-tagmanager.php +0 -0
  69. {tags/5.3.3/front → front}/tracking.php +0 -0
  70. {tags/5.3.3/front → front}/views/analytics-amp-clientidapi.php +0 -0
  71. {tags/5.3.3/front → front}/views/analytics-amp-code.php +0 -0
  72. {tags/5.3.4/front → front}/views/analytics-code.php +0 -0
  73. {tags/5.3.3/front → front}/views/analytics-optout-code.php +0 -0
  74. {tags/5.3.3/front → front}/views/optimize-code.php +0 -0
  75. {tags/5.3.3/front → front}/views/tagmanager-amp-code.php +0 -0
  76. {tags/5.3.3/front → front}/views/tagmanager-code.php +0 -0
  77. {tags/5.3.3/front → front}/widgets.php +0 -0
  78. tags/5.3.4/gadwp.php → gadwp.php +2 -2
  79. {tags/5.3.4/install → install}/install.php +0 -0
  80. {tags/5.3.4/install → install}/uninstall.php +0 -0
  81. trunk/readme.txt → readme.txt +2 -1
  82. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  83. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  84. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  85. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  86. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  87. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  88. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  89. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  90. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_222222_256x240.png +0 -0
  91. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_2e83ff_256x240.png +0 -0
  92. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_454545_256x240.png +0 -0
  93. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_888888_256x240.png +0 -0
  94. {tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_cd0a0a_256x240.png +0 -0
  95. {tags/5.3.3/realtime → realtime}/jquery/jquery.ui.tooltip.html.css +0 -0
  96. {tags/5.3.1.1/realtime → realtime}/jquery/jquery.ui.tooltip.html.js +0 -0
  97. tags/5.3.1.1/SECURITY.md +0 -3
  98. tags/5.3.1.1/admin/ajax-actions.php +0 -143
  99. tags/5.3.1.1/admin/css/gadwp.css +0 -1
  100. tags/5.3.1.1/admin/item-reports.php +0 -56
  101. tags/5.3.1.1/admin/settings.php +0 -1901
  102. tags/5.3.1.1/admin/setup.php +0 -378
  103. tags/5.3.1.1/admin/views/access-code.php +0 -36
  104. tags/5.3.1.1/admin/widgets.php +0 -65
  105. tags/5.3.1.1/common/ajax-actions.php +0 -42
  106. tags/5.3.1.1/common/js/reports5.js +0 -1
  107. tags/5.3.1.1/common/realtime/jquery.ui.tooltip.html.css +0 -3
  108. tags/5.3.1.1/config.php +0 -456
  109. tags/5.3.1.1/front/ajax-actions.php +0 -157
  110. tags/5.3.1.1/front/item-reports.php +0 -38
  111. tags/5.3.1.1/front/setup.php +0 -133
  112. tags/5.3.1.1/front/tracking-analytics.php +0 -775
  113. tags/5.3.1.1/front/tracking-tagmanager.php +0 -177
  114. tags/5.3.1.1/front/tracking.php +0 -66
  115. tags/5.3.1.1/front/views/analytics-amp-clientidapi.php +0 -11
  116. tags/5.3.1.1/front/views/analytics-amp-code.php +0 -14
  117. tags/5.3.1.1/front/views/analytics-code.php +0 -40
  118. tags/5.3.1.1/front/views/analytics-optout-code.php +0 -26
  119. tags/5.3.1.1/front/views/optimize-code.php +0 -21
  120. tags/5.3.1.1/front/views/tagmanager-amp-code.php +0 -14
  121. tags/5.3.1.1/front/views/tagmanager-code.php +0 -24
  122. tags/5.3.1.1/front/widgets.php +0 -195
  123. tags/5.3.1.1/gadwp.php +0 -272
  124. tags/5.3.1.1/install/install.php +0 -190
  125. tags/5.3.1.1/install/uninstall.php +0 -34
  126. tags/5.3.1.1/readme.txt +0 -240
  127. tags/5.3.1.1/realtime/jquery/jquery.ui.tooltip.html.css +0 -3
  128. tags/5.3.1.1/tools/gapi.php +0 -961
  129. tags/5.3.1.1/tools/iso3166.php +0 -255
  130. tags/5.3.1.1/tools/src/Deconf/Auth/Exception.php +0 -24
  131. tags/5.3.1.1/tools/src/Deconf/Cache/Exception.php +0 -24
  132. tags/5.3.1.1/tools/src/Deconf/Exception.php +0 -20
  133. tags/5.3.1.1/tools/src/Deconf/IO/Abstract.php +0 -343
  134. tags/5.3.1.1/tools/src/Deconf/IO/Exception.php +0 -69
  135. tags/5.3.1.1/tools/src/Deconf/IO/Stream.php +0 -246
  136. tags/5.3.1.1/tools/src/Deconf/Utils/URITemplate.php +0 -333
  137. tags/5.3.1.1/tools/src/readme.txt +0 -25
  138. tags/5.3.1.1/tools/tools.php +0 -314
  139. tags/5.3.1/SECURITY.md +0 -3
  140. tags/5.3.1/admin/ajax-actions.php +0 -143
  141. tags/5.3.1/admin/css/admin-widgets.css +0 -1
  142. tags/5.3.1/admin/css/gadwp.css +0 -1
  143. tags/5.3.1/admin/css/item-reports.css +0 -1
  144. tags/5.3.1/admin/images/clicky.png +0 -0
  145. tags/5.3.1/admin/images/gadwp-icon.png +0 -0
  146. tags/5.3.1/admin/images/google-analytics-dashboard.png +0 -0
  147. tags/5.3.1/admin/images/help.png +0 -0
  148. tags/5.3.1/admin/images/mcdn.png +0 -0
  149. tags/5.3.1/admin/images/ssl.png +0 -0
  150. tags/5.3.1/admin/images/star.png +0 -0
  151. tags/5.3.1/admin/images/wp.png +0 -0
  152. tags/5.3.1/admin/item-reports.php +0 -56
  153. tags/5.3.1/admin/js/settings.js +0 -1
  154. tags/5.3.1/admin/js/ui.js +0 -1
  155. tags/5.3.1/admin/js/wp-color-picker-script.js +0 -1
  156. tags/5.3.1/admin/settings.php +0 -1909
  157. tags/5.3.1/admin/setup.php +0 -378
  158. tags/5.3.1/admin/views/access-code.php +0 -36
  159. tags/5.3.1/admin/widgets.php +0 -65
  160. tags/5.3.1/common/ajax-actions.php +0 -42
  161. tags/5.3.1/common/js/reports5.js +0 -1
  162. tags/5.3.1/common/nprogress/nprogress.css +0 -1
  163. tags/5.3.1/common/nprogress/nprogress.js +0 -1
  164. tags/5.3.1/common/realtime/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  165. tags/5.3.1/common/realtime/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  166. tags/5.3.1/common/realtime/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  167. tags/5.3.1/common/realtime/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  168. tags/5.3.1/common/realtime/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  169. tags/5.3.1/common/realtime/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  170. tags/5.3.1/common/realtime/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  171. tags/5.3.1/common/realtime/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  172. tags/5.3.1/common/realtime/images/ui-icons_222222_256x240.png +0 -0
  173. tags/5.3.1/common/realtime/images/ui-icons_2e83ff_256x240.png +0 -0
  174. tags/5.3.1/common/realtime/images/ui-icons_454545_256x240.png +0 -0
  175. tags/5.3.1/common/realtime/images/ui-icons_888888_256x240.png +0 -0
  176. tags/5.3.1/common/realtime/images/ui-icons_cd0a0a_256x240.png +0 -0
  177. tags/5.3.1/common/realtime/jquery.ui.tooltip.html.css +0 -3
  178. tags/5.3.1/common/realtime/jquery.ui.tooltip.html.js +0 -1
  179. tags/5.3.1/config.php +0 -456
  180. tags/5.3.1/front/ajax-actions.php +0 -157
  181. tags/5.3.1/front/css/item-reports.css +0 -1
  182. tags/5.3.1/front/css/widgets.css +0 -1
  183. tags/5.3.1/front/item-reports.php +0 -38
  184. tags/5.3.1/front/js/tracking-analytics-events.js +0 -1
  185. tags/5.3.1/front/js/tracking-scrolldepth.js +0 -1
  186. tags/5.3.1/front/js/widgets.js +0 -1
  187. tags/5.3.1/front/setup.php +0 -133
  188. tags/5.3.1/front/tracking-analytics.php +0 -775
  189. tags/5.3.1/front/tracking-tagmanager.php +0 -177
  190. tags/5.3.1/front/tracking.php +0 -66
  191. tags/5.3.1/front/views/analytics-amp-clientidapi.php +0 -11
  192. tags/5.3.1/front/views/analytics-amp-code.php +0 -14
  193. tags/5.3.1/front/views/analytics-code.php +0 -40
  194. tags/5.3.1/front/views/analytics-optout-code.php +0 -26
  195. tags/5.3.1/front/views/optimize-code.php +0 -21
  196. tags/5.3.1/front/views/tagmanager-amp-code.php +0 -14
  197. tags/5.3.1/front/views/tagmanager-code.php +0 -24
  198. tags/5.3.1/front/widgets.php +0 -195
  199. tags/5.3.1/gadwp.php +0 -272
  200. tags/5.3.1/install/install.php +0 -190
  201. tags/5.3.1/install/uninstall.php +0 -34
  202. tags/5.3.1/readme.txt +0 -236
  203. tags/5.3.1/realtime/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  204. tags/5.3.1/realtime/jquery/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  205. tags/5.3.1/realtime/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  206. tags/5.3.1/realtime/jquery/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  207. tags/5.3.1/realtime/jquery/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  208. tags/5.3.1/realtime/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  209. tags/5.3.1/realtime/jquery/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  210. tags/5.3.1/realtime/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  211. tags/5.3.1/realtime/jquery/images/ui-icons_222222_256x240.png +0 -0
  212. tags/5.3.1/realtime/jquery/images/ui-icons_2e83ff_256x240.png +0 -0
  213. tags/5.3.1/realtime/jquery/images/ui-icons_454545_256x240.png +0 -0
  214. tags/5.3.1/realtime/jquery/images/ui-icons_888888_256x240.png +0 -0
  215. tags/5.3.1/realtime/jquery/images/ui-icons_cd0a0a_256x240.png +0 -0
  216. tags/5.3.1/realtime/jquery/jquery.ui.tooltip.html.css +0 -3
  217. tags/5.3.1/realtime/jquery/jquery.ui.tooltip.html.js +0 -1
  218. tags/5.3.1/tools/gapi.php +0 -961
  219. tags/5.3.1/tools/iso3166.php +0 -255
  220. tags/5.3.1/tools/src/Deconf/Auth/Abstract.php +0 -38
  221. tags/5.3.1/tools/src/Deconf/Auth/AppIdentity.php +0 -120
  222. tags/5.3.1/tools/src/Deconf/Auth/AssertionCredentials.php +0 -136
  223. tags/5.3.1/tools/src/Deconf/Auth/ComputeEngine.php +0 -146
  224. tags/5.3.1/tools/src/Deconf/Auth/Exception.php +0 -24
  225. tags/5.3.1/tools/src/Deconf/Auth/LoginTicket.php +0 -71
  226. tags/5.3.1/tools/src/Deconf/Auth/OAuth2.php +0 -646
  227. tags/5.3.1/tools/src/Deconf/Auth/Simple.php +0 -63
  228. tags/5.3.1/tools/src/Deconf/Cache/Abstract.php +0 -53
  229. tags/5.3.1/tools/src/Deconf/Cache/Apc.php +0 -113
  230. tags/5.3.1/tools/src/Deconf/Cache/Exception.php +0 -24
  231. tags/5.3.1/tools/src/Deconf/Cache/File.php +0 -209
  232. tags/5.3.1/tools/src/Deconf/Cache/Memcache.php +0 -184
  233. tags/5.3.1/tools/src/Deconf/Cache/Null.php +0 -57
  234. tags/5.3.1/tools/src/Deconf/Client.php +0 -715
  235. tags/5.3.1/tools/src/Deconf/Collection.php +0 -101
  236. tags/5.3.1/tools/src/Deconf/Config.php +0 -456
  237. tags/5.3.1/tools/src/Deconf/Exception.php +0 -20
  238. tags/5.3.1/tools/src/Deconf/Http/Batch.php +0 -145
  239. tags/5.3.1/tools/src/Deconf/Http/CacheParser.php +0 -185
  240. tags/5.3.1/tools/src/Deconf/Http/MediaFileUpload.php +0 -341
  241. tags/5.3.1/tools/src/Deconf/Http/REST.php +0 -178
  242. tags/5.3.1/tools/src/Deconf/Http/Request.php +0 -504
  243. tags/5.3.1/tools/src/Deconf/IO/Abstract.php +0 -343
  244. tags/5.3.1/tools/src/Deconf/IO/Curl.php +0 -194
  245. tags/5.3.1/tools/src/Deconf/IO/Exception.php +0 -69
  246. tags/5.3.1/tools/src/Deconf/IO/Stream.php +0 -246
  247. tags/5.3.1/tools/src/Deconf/IO/cacerts.pem +0 -2233
  248. tags/5.3.1/tools/src/Deconf/Logger/Abstract.php +0 -253
{tags/5.3.3/admin → admin}/ajax-actions.php RENAMED
File without changes
{trunk/admin → admin}/class-am-notification.php RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/css/admin-widgets.css RENAMED
File without changes
{tags/5.3.3/admin → admin}/css/gadwp.css RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/css/item-reports.css RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/images/clicky.png RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/images/gadwp-icon.png RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/images/google-analytics-dashboard.png RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/images/help.png RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/images/mcdn.png RENAMED
File without changes
{tags/5.3.3/admin → admin}/images/optinmonster.png RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/images/ssl.png RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/images/star.png RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/images/wp.png RENAMED
File without changes
{tags/5.3.3/admin → admin}/images/wpforms.png RENAMED
File without changes
{tags/5.3.3/admin → admin}/item-reports.php RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/js/settings.js RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/js/ui.js RENAMED
File without changes
{tags/5.3.1.1/admin → admin}/js/wp-color-picker-script.js RENAMED
File without changes
{trunk/admin → admin}/settings.php RENAMED
File without changes
{tags/5.3.4/admin → admin}/setup.php RENAMED
File without changes
{tags/5.3.4/admin → admin}/tracking.php RENAMED
File without changes
{tags/5.3.3/admin → admin}/views/access-code.php RENAMED
File without changes
{tags/5.3.3/admin → admin}/widgets.php RENAMED
File without changes
assets/banner-772x250-old.png DELETED
Binary file
assets/banner-772x250.png DELETED
Binary file
assets/icon-128x128.png DELETED
Binary file
assets/icon-256x256.png DELETED
Binary file
assets/logo.png DELETED
Binary file
assets/screenshot-1.png DELETED
Binary file
assets/screenshot-2.png DELETED
Binary file
assets/screenshot-3.png DELETED
Binary file
assets/screenshot-4.png DELETED
Binary file
assets/screenshot-5.png DELETED
Binary file
assets/screenshot-6.png DELETED
Binary file
assets/screenshot-7.png DELETED
Binary file
assets/screenshot-8.png DELETED
Binary file
assets/screenshot-9.png DELETED
Binary file
{tags/5.3.3/common → common}/ajax-actions.php RENAMED
File without changes
{tags/5.3.3/common → common}/js/reports5.js RENAMED
File without changes
{tags/5.3.1.1/common → common}/nprogress/nprogress.css RENAMED
File without changes
{tags/5.3.1.1/common → common}/nprogress/nprogress.js RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-bg_flat_0_aaaaaa_40x100.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-bg_flat_75_ffffff_40x100.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_55_fbf9ee_1x400.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_65_ffffff_1x400.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_75_dadada_1x400.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_75_e6e6e6_1x400.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-bg_glass_95_fef1ec_1x400.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-bg_highlight-soft_75_cccccc_1x100.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-icons_222222_256x240.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-icons_2e83ff_256x240.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-icons_454545_256x240.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-icons_888888_256x240.png RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/images/ui-icons_cd0a0a_256x240.png RENAMED
File without changes
{tags/5.3.3/common → common}/realtime/jquery.ui.tooltip.html.css RENAMED
File without changes
{tags/5.3.1.1/common → common}/realtime/jquery.ui.tooltip.html.js RENAMED
File without changes
tags/5.3.4/config.php → config.php RENAMED
File without changes
{tags/5.3.3/front → front}/ajax-actions.php RENAMED
File without changes
{tags/5.3.1.1/front → front}/css/item-reports.css RENAMED
File without changes
{tags/5.3.1.1/front → front}/css/widgets.css RENAMED
File without changes
{tags/5.3.3/front → front}/item-reports.php RENAMED
File without changes
{tags/5.3.1.1/front → front}/js/tracking-analytics-events.js RENAMED
File without changes
{tags/5.3.1.1/front → front}/js/tracking-scrolldepth.js RENAMED
File without changes
{tags/5.3.1.1/front → front}/js/widgets.js RENAMED
File without changes
{tags/5.3.3/front → front}/setup.php RENAMED
File without changes
{tags/5.3.3/front → front}/tracking-analytics.php RENAMED
File without changes
{tags/5.3.3/front → front}/tracking-tagmanager.php RENAMED
File without changes
{tags/5.3.3/front → front}/tracking.php RENAMED
File without changes
{tags/5.3.3/front → front}/views/analytics-amp-clientidapi.php RENAMED
File without changes
{tags/5.3.3/front → front}/views/analytics-amp-code.php RENAMED
File without changes
{tags/5.3.4/front → front}/views/analytics-code.php RENAMED
File without changes
{tags/5.3.3/front → front}/views/analytics-optout-code.php RENAMED
File without changes
{tags/5.3.3/front → front}/views/optimize-code.php RENAMED
File without changes
{tags/5.3.3/front → front}/views/tagmanager-amp-code.php RENAMED
File without changes
{tags/5.3.3/front → front}/views/tagmanager-code.php RENAMED
File without changes
{tags/5.3.3/front → front}/widgets.php RENAMED
File without changes
tags/5.3.4/gadwp.php → gadwp.php RENAMED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://exactmetrics.com
5
  * Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
6
  * Author: ExactMetrics
7
- * Version: 5.3.4
8
  * Author URI: https://exactmetrics.com
9
  * Text Domain: google-analytics-dashboard-for-wp
10
  * Domain Path: /languages
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) )
16
 
17
  // Plugin Version
18
  if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
19
- define( 'GADWP_CURRENT_VERSION', '5.3.4' );
20
  }
21
 
22
  if ( ! defined( 'GADWP_ENDPOINT_URL' ) ) {
4
  * Plugin URI: https://exactmetrics.com
5
  * Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
6
  * Author: ExactMetrics
7
+ * Version: 5.3.7
8
  * Author URI: https://exactmetrics.com
9
  * Text Domain: google-analytics-dashboard-for-wp
10
  * Domain Path: /languages
16
 
17
  // Plugin Version
18
  if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
19
+ define( 'GADWP_CURRENT_VERSION', '5.3.7' );
20
  }
21
 
22
  if ( ! defined( 'GADWP_ENDPOINT_URL' ) ) {
{tags/5.3.4/install → install}/install.php RENAMED
File without changes
{tags/5.3.4/install → install}/uninstall.php RENAMED
File without changes
trunk/readme.txt → readme.txt RENAMED
@@ -4,7 +4,7 @@ Donate link: http://www.wpbeginner.com/wpbeginner-needs-your-help/
4
  Tags: analytics,google analytics,google analytics dashboard,google analytics plugin,google analytics widget,gtag
5
  Requires at least: 3.5
6
  Tested up to: 5.0
7
- Stable tag: 5.3.6
8
  Requires PHP: 5.2.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -171,6 +171,7 @@ Google Analytics Dashboard for WP it's released under the GPLv2, you can use it
171
  * Enhancements:
172
  * Updates dependency libraries.
173
  * Confirms compatibility with WordPress 5.0.
 
174
 
175
  = 5.3.5 =
176
  * Bug Fixes:
4
  Tags: analytics,google analytics,google analytics dashboard,google analytics plugin,google analytics widget,gtag
5
  Requires at least: 3.5
6
  Tested up to: 5.0
7
+ Stable tag: 5.3.7
8
  Requires PHP: 5.2.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
171
  * Enhancements:
172
  * Updates dependency libraries.
173
  * Confirms compatibility with WordPress 5.0.
174
+ * Replaces "Cheating Huh?"" with "You don’t have permission to do this" to align the error message with recent WP core changes. (core.trac.wordpress.org/ticket/38332)
175
 
176
  = 5.3.5 =
177
  * Bug Fixes:
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_flat_75_ffffff_40x100.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_65_ffffff_1x400.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_75_dadada_1x400.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_glass_95_fef1ec_1x400.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_222222_256x240.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_2e83ff_256x240.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_454545_256x240.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_888888_256x240.png RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/images/ui-icons_cd0a0a_256x240.png RENAMED
File without changes
{tags/5.3.3/realtime → realtime}/jquery/jquery.ui.tooltip.html.css RENAMED
File without changes
{tags/5.3.1.1/realtime → realtime}/jquery/jquery.ui.tooltip.html.js RENAMED
File without changes
tags/5.3.1.1/SECURITY.md DELETED
@@ -1,3 +0,0 @@
1
- Every day we do our best to make sure [Google Analytics Dashboard for WP (GADWP)](https://deconf.com/google-analytics-dashboard-wordpress/) is safe and secure. But we’re only human, and there’s always a chance that we missed something. That’s where you come in – find a security weakness in our plugin, report it on [HackerOne](https://hackerone.com/deconf_eb9eh), and get listed as a contributor!
2
-
3
- To find out more about our security reports policy for the plugin [click here](https://deconf.com/security/).
 
 
 
tags/5.3.1.1/admin/ajax-actions.php DELETED
@@ -1,143 +0,0 @@
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
- */
9
-
10
- // Exit if accessed directly
11
- if ( ! defined( 'ABSPATH' ) )
12
- exit();
13
-
14
- if ( ! class_exists( 'GADWP_Backend_Ajax' ) ) {
15
-
16
- final class GADWP_Backend_Ajax {
17
-
18
- private $gadwp;
19
-
20
- public function __construct() {
21
- $this->gadwp = GADWP();
22
-
23
- if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) && ( ( 1 == $this->gadwp->config->options['backend_item_reports'] ) || ( 1 == $this->gadwp->config->options['dashboard_widget'] ) ) ) {
24
- // Items action
25
- add_action( 'wp_ajax_gadwp_backend_item_reports', array( $this, 'ajax_item_reports' ) );
26
- }
27
- if ( current_user_can( 'manage_options' ) ) {
28
- // Admin Widget action
29
- add_action( 'wp_ajax_gadwp_dismiss_notices', array( $this, 'ajax_dismiss_notices' ) );
30
- }
31
- }
32
-
33
- /**
34
- * Ajax handler for Item Reports
35
- *
36
- * @return json|int
37
- */
38
- public function ajax_item_reports() {
39
- if ( ! isset( $_POST['gadwp_security_backend_item_reports'] ) || ! wp_verify_nonce( $_POST['gadwp_security_backend_item_reports'], 'gadwp_backend_item_reports' ) ) {
40
- wp_die( - 30 );
41
- }
42
- if ( isset( $_POST['projectId'] ) && $this->gadwp->config->options['switch_profile'] && 'false' !== $_POST['projectId'] ) {
43
- $projectId = $_POST['projectId'];
44
- } else {
45
- $projectId = false;
46
- }
47
- $from = $_POST['from'];
48
- $to = $_POST['to'];
49
- $query = $_POST['query'];
50
- if ( isset( $_POST['filter'] ) ) {
51
- $filter_id = $_POST['filter'];
52
- } else {
53
- $filter_id = false;
54
- }
55
- if ( isset( $_POST['metric'] ) ) {
56
- $metric = $_POST['metric'];
57
- } else {
58
- $metric = 'sessions';
59
- }
60
-
61
- if ( $filter_id && $metric == 'sessions' ) { // Sessions metric is not available for item reports
62
- $metric = 'pageviews';
63
- }
64
-
65
- if ( ob_get_length() ) {
66
- ob_clean();
67
- }
68
-
69
- if ( ! ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) && ( ( 1 == $this->gadwp->config->options['backend_item_reports'] ) || ( 1 == $this->gadwp->config->options['dashboard_widget'] ) ) ) ) {
70
- wp_die( - 31 );
71
- }
72
- if ( $this->gadwp->config->options['token'] && $this->gadwp->config->options['tableid_jail'] && $from && $to ) {
73
- if ( null === $this->gadwp->gapi_controller ) {
74
- $this->gadwp->gapi_controller = new GADWP_GAPI_Controller();
75
- }
76
- } else {
77
- wp_die( - 24 );
78
- }
79
- if ( false == $projectId ) {
80
- $projectId = $this->gadwp->config->options['tableid_jail'];
81
- }
82
- $profile_info = GADWP_Tools::get_selected_profile( $this->gadwp->config->options['ga_profiles_list'], $projectId );
83
- if ( isset( $profile_info[4] ) ) {
84
- $this->gadwp->gapi_controller->timeshift = $profile_info[4];
85
- } else {
86
- $this->gadwp->gapi_controller->timeshift = (int) current_time( 'timestamp' ) - time();
87
- }
88
-
89
- if ( $filter_id ) {
90
- $uri_parts = explode( '/', get_permalink( $filter_id ), 4 );
91
-
92
- if ( isset( $uri_parts[3] ) ) {
93
- $uri = '/' . $uri_parts[3];
94
- } else {
95
- wp_die( - 25 );
96
- }
97
-
98
- // allow URL correction before sending an API request
99
- $filter = apply_filters( 'gadwp_backenditem_uri', $uri, $filter_id );
100
-
101
- $lastchar = substr( $filter, - 1 );
102
-
103
- if ( isset( $profile_info[6] ) && $profile_info[6] && '/' == $lastchar ) {
104
- $filter = $filter . $profile_info[6];
105
- }
106
-
107
- // Encode URL
108
- $filter = rawurlencode( rawurldecode( $filter ) );
109
- } else {
110
- $filter = false;
111
- }
112
-
113
- $queries = explode( ',', $query );
114
-
115
- $results = array();
116
-
117
- foreach ( $queries as $value ) {
118
- $results[] = $this->gadwp->gapi_controller->get( $projectId, $value, $from, $to, $filter, $metric );
119
- }
120
-
121
- wp_send_json( $results );
122
- }
123
-
124
- /**
125
- * Ajax handler for dismissing Admin notices
126
- *
127
- * @return json|int
128
- */
129
- public function ajax_dismiss_notices() {
130
- if ( ! isset( $_POST['gadwp_security_dismiss_notices'] ) || ! wp_verify_nonce( $_POST['gadwp_security_dismiss_notices'], 'gadwp_dismiss_notices' ) ) {
131
- wp_die( - 30 );
132
- }
133
-
134
- if ( ! current_user_can( 'manage_options' ) ) {
135
- wp_die( - 31 );
136
- }
137
-
138
- delete_option( 'gadwp_got_updated' );
139
-
140
- wp_die();
141
- }
142
- }
143
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tags/5.3.1.1/admin/css/gadwp.css DELETED
@@ -1 +0,0 @@
1
- #gadwp-events,#gadwp-custom,#gadwp-advanced,#gadwp-exclude,#gadwp-config,#gadwp-tmdatalayervars,#gadwp-tmintegration,#gadwp-integration{display:none}table.gadwp-settings-options{padding-left:10px;width:100%}.gadwp-settings-options td{padding:0 5px 5px 5px}td.gadwp-settings-title,td.info{width:140px;padding-left:20px}td.gadwp-settings-title-s{width:300px}.gadwp-help{padding-left:15px}td.gadwp-settings-info{padding-bottom:15px}td.gadwp-settings-title label{font-size:1.1em}.gadwp-title{float:left;margin-right:10px;margin-top:2px;clear:left}.gadwp-desc{font-size:1em}.gadwp-top{vertical-align:top}pre.gadwp-settings-logdata{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}pre.gadwp-settings-logdata span{color:#b30000;font-weight:800}table.gadwp-settings-logdata{table-layout:fixed;width:100%}td.gadwp-settings-roles{padding-bottom:15px}#ga_speed_samplerate,#ga_user_samplerate,#ga_realtime_pages{width:50px}#gapi-access-code{color:red !important}#poststuff.gadwp h2{padding-bottom:0;font-size:19.5px;font-weight:normal;padding:0;margin:20px 0 15px 0}#poststuff.gadwp h2.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0}.button-primary.gadwp-settings-switchoo{position:relative;width:50px;float:left;border:0;padding:0;height:22px;-moz-box-shadow:none;-webkit-box-shadow:none;-o-box-shadow:none;box-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}input.gadwp-settings-switchoo-checkbox{display:none}.gadwp-settings-switchoo-label{display:block;overflow:hidden;cursor:pointer;background:transparent;border:1px solid #ddd;border-radius:2px;text-shadow:none}.gadwp-settings-switchoo-inner{width:200%;margin-left:-100%;border-radius:2px;-moz-transition:margin .2s ease-in 0;-webkit-transition:margin .2s ease-in 0;-o-transition:margin .2s ease-in 0;transition:margin .2s ease-in 0}.gadwp-settings-switchoo-inner:before,.gadwp-settings-switchoo-inner:after{float:left;width:50%;font-weight:normal;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;height:22px;line-height:22px;font-size:12px;text-shadow:none}.gadwp-settings-switchoo-inner:before{content:"On";padding-left:5px;border-bottom:0}.gadwp-settings-switchoo-inner:after{content:"Off";padding-right:5px;background-color:#ddd;text-align:right}.gadwp-settings-switchoo-switch{width:22px;height:22px;background:#fff;color:#ddd;border:1px solid #ddd;border-radius:2px;position:absolute;top:0;bottom:0;right:27px;-moz-transition:all .2s ease-in 0;-webkit-transition:all .2s ease-in 0;-o-transition:all .2s ease-in 0;transition:all .2s ease-in 0}.gadwp-settings-switchoo-switch:hover{color:#aaa;border-color:#aaa}.gadwp-settings-switchoo-switch:after{margin:0;outline:0;display:inline-block;font:400 16px/16px dashicons;content:"\f228";padding:3px 0 0 3px;text-align:left;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.gadwp-settings-switchoo-checkbox:checked+.gadwp-settings-switchoo-label .gadwp-settings-switchoo-inner{margin-left:0}.gadwp-settings-switchoo-checkbox:checked+.gadwp-settings-switchoo-label .gadwp-settings-switchoo-switch{right:0}.switch-desc{float:left;margin-left:10px;line-height:20px}
 
tags/5.3.1.1/admin/item-reports.php DELETED
@@ -1,56 +0,0 @@
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
- */
9
-
10
- // Exit if accessed directly
11
- if ( ! defined( 'ABSPATH' ) )
12
- exit();
13
-
14
- if ( ! class_exists( 'GADWP_Backend_Item_Reports' ) ) {
15
-
16
- final class GADWP_Backend_Item_Reports {
17
-
18
- private $gadwp;
19
-
20
- public function __construct() {
21
- $this->gadwp = GADWP();
22
-
23
- if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) && 1 == $this->gadwp->config->options['backend_item_reports'] ) {
24
- // Add custom column in Posts List
25
- add_filter( 'manage_posts_columns', array( $this, 'add_columns' ) );
26
-
27
- // Populate custom column in Posts List
28
- add_action( 'manage_posts_custom_column', array( $this, 'add_icons' ), 10, 2 );
29
-
30
- // Add custom column in Pages List
31
- add_filter( 'manage_pages_columns', array( $this, 'add_columns' ) );
32
-
33
- // Populate custom column in Pages List
34
- add_action( 'manage_pages_custom_column', array( $this, 'add_icons' ), 10, 2 );
35
- }
36
- }
37
-
38
- public function add_icons( $column, $id ) {
39
- global $wp_version;
40
-
41
- if ( 'gadwp_stats' != $column ) {
42
- return;
43
- }
44
-
45
- if ( version_compare( $wp_version, '3.8.0', '>=' ) ) {
46
- echo '<a id="gadwp-' . $id . '" title="' . get_the_title( $id ) . '" href="#' . $id . '" class="gadwp-icon dashicons-before dashicons-chart-area">&nbsp;</a>';
47
- } else {
48
- echo '<a id="gadwp-' . $id . '" title="' . get_the_title( $id ) . '" href="#' . $id . '"><img class="gadwp-icon-oldwp" src="' . GADWP_URL . 'admin/images/gadwp-icon.png"</a>';
49
- }
50
- }
51
-
52
- public function add_columns( $columns ) {
53
- return array_merge( $columns, array( 'gadwp_stats' => __( 'Analytics', 'google-analytics-dashboard-for-wp' ) ) );
54
- }
55
- }
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tags/5.3.1.1/admin/settings.php DELETED
@@ -1,1901 +0,0 @@
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
- */
9
-
10
- // Exit if accessed directly
11
- if ( ! defined( 'ABSPATH' ) ) {
12
- exit();
13
- }
14
-
15
- final class GADWP_Settings {
16
-
17
- private static function update_options( $who ) {
18
- $gadwp = GADWP();
19
- $network_settings = false;
20
- $options = $gadwp->config->options; // Get current options
21
- if ( isset( $_POST['options']['gadwp_hidden'] ) && isset( $_POST['options'] ) && ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) && 'Reset' != $who ) {
22
- $new_options = $_POST['options'];
23
- if ( 'tracking' == $who ) {
24
- $options['ga_anonymize_ip'] = 0;
25
- $options['ga_optout'] = 0;
26
- $options['ga_dnt_optout'] = 0;
27
- $options['ga_event_tracking'] = 0;
28
- $options['ga_enhanced_links'] = 0;
29
- $options['ga_event_precision'] = 0;
30
- $options['ga_remarketing'] = 0;
31
- $options['ga_event_bouncerate'] = 0;
32
- $options['ga_crossdomain_tracking'] = 0;
33
- $options['ga_aff_tracking'] = 0;
34
- $options['ga_hash_tracking'] = 0;
35
- $options['ga_formsubmit_tracking'] = 0;
36
- $options['ga_force_ssl'] = 0;
37
- $options['ga_pagescrolldepth_tracking'] = 0;
38
- $options['tm_pagescrolldepth_tracking'] = 0;
39
- $options['amp_tracking_analytics'] = 0;
40
- $options['amp_tracking_clientidapi'] = 0;
41
- $options['amp_tracking_tagmanager'] = 0;
42
- $options['optimize_pagehiding'] = 0;
43
- $options['optimize_tracking'] = 0;
44
- $options['trackingcode_infooter'] = 0;
45
- $options['trackingevents_infooter'] = 0;
46
- $options['ga_with_gtag'] = 0;
47
- if ( isset( $_POST['options']['ga_tracking_code'] ) ) {
48
- $new_options['ga_tracking_code'] = trim( $new_options['ga_tracking_code'], "\t" );
49
- }
50
- if ( empty( $new_options['track_exclude'] ) ) {
51
- $new_options['track_exclude'] = array();
52
- }
53
- } elseif ( 'backend' == $who ) {
54
- $options['switch_profile'] = 0;
55
- $options['backend_item_reports'] = 0;
56
- $options['dashboard_widget'] = 0;
57
- $options['backend_realtime_report'] = 0;
58
- if ( empty( $new_options['access_back'] ) ) {
59
- $new_options['access_back'][] = 'administrator';
60
- }
61
- } elseif ( 'frontend' == $who ) {
62
- $options['frontend_item_reports'] = 0;
63
- if ( empty( $new_options['access_front'] ) ) {
64
- $new_options['access_front'][] = 'administrator';
65
- }
66
- } elseif ( 'general' == $who ) {
67
- $options['user_api'] = 0;
68
- if ( ! is_multisite() ) {
69
- $options['automatic_updates_minorversion'] = 0;
70
- }
71
- } elseif ( 'network' == $who ) {
72
- $options['user_api'] = 0;
73
- $options['network_mode'] = 0;
74
- $options['superadmin_tracking'] = 0;
75
- $options['automatic_updates_minorversion'] = 0;
76
- $network_settings = true;
77
- }
78
- $options = array_merge( $options, $new_options );
79
- $gadwp->config->options = $options;
80
- $gadwp->config->set_plugin_options( $network_settings );
81
- }
82
- return $options;
83
- }
84
-
85
- private static function navigation_tabs( $tabs ) {
86
- echo '<h2 class="nav-tab-wrapper">';
87
- foreach ( $tabs as $tab => $name ) {
88
- echo "<a class='nav-tab' id='tab-$tab' href='#top#gadwp-$tab'>$name</a>";
89
- }
90
- echo '</h2>';
91
- }
92
-
93
- public static function frontend_settings() {
94
- $gadwp = GADWP();
95
- if ( ! current_user_can( 'manage_options' ) ) {
96
- return;
97
- }
98
- $options = self::update_options( 'frontend' );
99
- if ( isset( $_POST['options']['gadwp_hidden'] ) ) {
100
- $message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Settings saved.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
101
- if ( ! ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) ) {
102
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
103
- }
104
- }
105
- if ( ! $gadwp->config->options['tableid_jail'] || ! $gadwp->config->options['token'] ) {
106
- $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
107
- }
108
- ?>
109
- <form name="gadwp_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
110
- <div class="wrap">
111
- <?php echo "<h2>" . __( "Google Analytics Frontend Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
112
- </div>
113
- <div id="poststuff" class="gadwp">
114
- <div id="post-body" class="metabox-holder columns-2">
115
- <div id="post-body-content">
116
- <div class="settings-wrapper">
117
- <div class="inside">
118
- <?php if (isset($message)) echo $message; ?>
119
- <table class="gadwp-settings-options">
120
- <tr>
121
- <td colspan="2"><?php echo "<h2>" . __( "Permissions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
122
- </tr>
123
- <tr>
124
- <td class="roles gadwp-settings-title">
125
- <label for="access_front"><?php _e("Show stats to:", 'google-analytics-dashboard-for-wp' ); ?>
126
- </label>
127
- </td>
128
- <td class="gadwp-settings-roles">
129
- <table>
130
- <tr>
131
- <?php if ( ! isset( $wp_roles ) ) : ?>
132
- <?php $wp_roles = new WP_Roles(); ?>
133
- <?php endif; ?>
134
- <?php $i = 0; ?>
135
- <?php foreach ( $wp_roles->role_names as $role => $name ) : ?>
136
- <?php if ( 'subscriber' != $role ) : ?>
137
- <?php $i++; ?>
138
- <td>
139
- <label>
140
- <input type="checkbox" name="options[access_front][]" value="<?php echo $role; ?>" <?php if ( in_array($role,$options['access_front']) || 'administrator' == $role ) echo 'checked="checked"'; if ( 'administrator' == $role ) echo 'disabled="disabled"';?> /><?php echo $name; ?>
141
- </label>
142
- </td>
143
- <?php endif; ?>
144
- <?php if ( 0 == $i % 4 ) : ?>
145
- </tr>
146
- <tr>
147
- <?php endif; ?>
148
- <?php endforeach; ?>
149
- </table>
150
- </td>
151
- </tr>
152
- <tr>
153
- <td colspan="2" class="gadwp-settings-title">
154
- <div class="button-primary gadwp-settings-switchoo">
155
- <input type="checkbox" name="options[frontend_item_reports]" value="1" class="gadwp-settings-switchoo-checkbox" id="frontend_item_reports" <?php checked( $options['frontend_item_reports'], 1 ); ?>>
156
- <label class="gadwp-settings-switchoo-label" for="frontend_item_reports">
157
- <div class="gadwp-settings-switchoo-inner"></div>
158
- <div class="gadwp-settings-switchoo-switch"></div>
159
- </label>
160
- </div>
161
- <div class="switch-desc"><?php echo " ".__("enable web page reports on frontend", 'google-analytics-dashboard-for-wp' );?></div>
162
- </td>
163
- </tr>
164
- <tr>
165
- <td colspan="2">
166
- <hr>
167
- </td>
168
- </tr>
169
- <tr>
170
- <td colspan="2" class="submit">
171
- <input type="submit" name="Submit" class="button button-primary" value="<?php _e('Save Changes', 'google-analytics-dashboard-for-wp' ) ?>" />
172
- </td>
173
- </tr>
174
- </table>
175
- <input type="hidden" name="options[gadwp_hidden]" value="Y">
176
- <?php wp_nonce_field('gadwp_form','gadwp_security');?>
177
-
178
-
179
-
180
-
181
-
182
-
183
- </form>
184
- <?php
185
- self::output_sidebar();
186
- }
187
-
188
- public static function backend_settings() {
189
- $gadwp = GADWP();
190
- if ( ! current_user_can( 'manage_options' ) ) {
191
- return;
192
- }
193
- $options = self::update_options( 'backend' );
194
- if ( isset( $_POST['options']['gadwp_hidden'] ) ) {
195
- $message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Settings saved.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
196
- if ( ! ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) ) {
197
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
198
- }
199
- }
200
- if ( ! $gadwp->config->options['tableid_jail'] || ! $gadwp->config->options['token'] ) {
201
- $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
202
- }
203
- ?>
204
- <form name="gadwp_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
205
- <div class="wrap">
206
- <?php echo "<h2>" . __( "Google Analytics Backend Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
207
- </div>
208
- <div id="poststuff" class="gadwp">
209
- <div id="post-body" class="metabox-holder columns-2">
210
- <div id="post-body-content">
211
- <div class="settings-wrapper">
212
- <div class="inside">
213
- <?php if (isset($message)) echo $message; ?>
214
- <table class="gadwp-settings-options">
215
- <tr>
216
- <td colspan="2"><?php echo "<h2>" . __( "Permissions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
217
- </tr>
218
- <tr>
219
- <td class="roles gadwp-settings-title">
220
- <label for="access_back"><?php _e("Show stats to:", 'google-analytics-dashboard-for-wp' ); ?>
221
- </label>
222
- </td>
223
- <td class="gadwp-settings-roles">
224
- <table>
225
- <tr>
226
- <?php if ( ! isset( $wp_roles ) ) : ?>
227
- <?php $wp_roles = new WP_Roles(); ?>
228
- <?php endif; ?>
229
- <?php $i = 0; ?>
230
- <?php foreach ( $wp_roles->role_names as $role => $name ) : ?>
231
- <?php if ( 'subscriber' != $role ) : ?>
232
- <?php $i++; ?>
233
- <td>
234
- <label>
235
- <input type="checkbox" name="options[access_back][]" value="<?php echo $role; ?>" <?php if ( in_array($role,$options['access_back']) || 'administrator' == $role ) echo 'checked="checked"'; if ( 'administrator' == $role ) echo 'disabled="disabled"';?> /> <?php echo $name; ?>
236
- </label>
237
- </td>
238
- <?php endif; ?>
239
- <?php if ( 0 == $i % 4 ) : ?>
240
- </tr>
241
- <tr>
242
- <?php endif; ?>
243
- <?php endforeach; ?>
244
-
245
-
246
-
247
-
248
-
249
-
250
- </table>
251
- </td>
252
- </tr>
253
- <tr>
254
- <td colspan="2" class="gadwp-settings-title">
255
- <div class="button-primary gadwp-settings-switchoo">
256
- <input type="checkbox" name="options[switch_profile]" value="1" class="gadwp-settings-switchoo-checkbox" id="switch_profile" <?php checked( $options['switch_profile'], 1 ); ?>>
257
- <label class="gadwp-settings-switchoo-label" for="switch_profile">
258
- <div class="gadwp-settings-switchoo-inner"></div>
259
- <div class="gadwp-settings-switchoo-switch"></div>
260
- </label>
261
- </div>
262
- <div class="switch-desc"><?php _e ( "enable Switch View functionality", 'google-analytics-dashboard-for-wp' );?></div>
263
- </td>
264
- </tr>
265
- <tr>
266
- <td colspan="2" class="gadwp-settings-title">
267
- <div class="button-primary gadwp-settings-switchoo">
268
- <input type="checkbox" name="options[backend_item_reports]" value="1" class="gadwp-settings-switchoo-checkbox" id="backend_item_reports" <?php checked( $options['backend_item_reports'], 1 ); ?>>
269
- <label class="gadwp-settings-switchoo-label" for="backend_item_reports">
270
- <div class="gadwp-settings-switchoo-inner"></div>
271
- <div class="gadwp-settings-switchoo-switch"></div>
272
- </label>
273
- </div>
274
- <div class="switch-desc"><?php _e ( "enable reports on Posts List and Pages List", 'google-analytics-dashboard-for-wp' );?></div>
275
- </td>
276
- </tr>
277
- <tr>
278
- <td colspan="2" class="gadwp-settings-title">
279
- <div class="button-primary gadwp-settings-switchoo">
280
- <input type="checkbox" name="options[dashboard_widget]" value="1" class="gadwp-settings-switchoo-checkbox" id="dashboard_widget" <?php checked( $options['dashboard_widget'], 1 ); ?>>
281
- <label class="gadwp-settings-switchoo-label" for="dashboard_widget">
282
- <div class="gadwp-settings-switchoo-inner"></div>
283
- <div class="gadwp-settings-switchoo-switch"></div>
284
- </label>
285
- </div>
286
- <div class="switch-desc"><?php _e ( "enable the main Dashboard Widget", 'google-analytics-dashboard-for-wp' );?></div>
287
- </td>
288
- </tr>
289
- <tr>
290
- <td colspan="2">
291
- <hr><?php echo "<h2>" . __( "Real-Time Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
292
- </tr>
293
- <?php if ( $options['user_api'] ) : ?>
294
- <tr>
295
- <td colspan="2" class="gadwp-settings-title">
296
- <div class="button-primary gadwp-settings-switchoo">
297
- <input type="checkbox" name="options[backend_realtime_report]" value="1" class="gadwp-settings-switchoo-checkbox" id="backend_realtime_report" <?php checked( $options['backend_realtime_report'], 1 ); ?>>
298
- <label class="gadwp-settings-switchoo-label" for="backend_realtime_report">
299
- <div class="gadwp-settings-switchoo-inner"></div>
300
- <div class="gadwp-settings-switchoo-switch"></div>
301
- </label>
302
- </div>
303
- <div class="switch-desc"><?php _e ( "enable Real-Time report (requires access to Real-Time Reporting API)", 'google-analytics-dashboard-for-wp' );?></div>
304
- </td>
305
- </tr>
306
- <?php endif; ?>
307
- <tr>
308
- <td colspan="2" class="gadwp-settings-title"> <?php _e("Maximum number of pages to display on real-time tab:", 'google-analytics-dashboard-for-wp'); ?>
309
- <input type="number" name="options[ga_realtime_pages]" id="ga_realtime_pages" value="<?php echo (int)$options['ga_realtime_pages']; ?>" size="3">
310
- </td>
311
- </tr>
312
- <tr>
313
- <td colspan="2">
314
- <hr><?php echo "<h2>" . __( "Location Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
315
- </tr>
316
- <tr>
317
- <td colspan="2" class="gadwp-settings-title">
318
- <?php echo __("Target Geo Map to country:", 'google-analytics-dashboard-for-wp'); ?>
319
- <input type="text" style="text-align: center;" name="options[ga_target_geomap]" value="<?php echo esc_attr($options['ga_target_geomap']); ?>" size="3">
320
- </td>
321
- </tr>
322
- <tr>
323
- <td colspan="2" class="gadwp-settings-title">
324
- <?php echo __("Maps API Key:", 'google-analytics-dashboard-for-wp'); ?>
325
- <input type="text" style="text-align: center;" name="options[maps_api_key]" value="<?php echo esc_attr($options['maps_api_key']); ?>" size="50">
326
- </td>
327
- </tr>
328
- <tr>
329
- <td colspan="2">
330
- <hr><?php echo "<h2>" . __( "404 Errors Report", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
331
- </tr>
332
- <tr>
333
- <td colspan="2" class="gadwp-settings-title">
334
- <?php echo __("404 Page Title contains:", 'google-analytics-dashboard-for-wp'); ?>
335
- <input type="text" style="text-align: center;" name="options[pagetitle_404]" value="<?php echo esc_attr($options['pagetitle_404']); ?>" size="20">
336
- </td>
337
- </tr>
338
- <tr>
339
- <td colspan="2">
340
- <hr>
341
- </td>
342
- </tr>
343
- <tr>
344
- <td colspan="2" class="submit">
345
- <input type="submit" name="Submit" class="button button-primary" value="<?php _e('Save Changes', 'google-analytics-dashboard-for-wp' ) ?>" />
346
- </td>
347
- </tr>
348
- </table>
349
- <input type="hidden" name="options[gadwp_hidden]" value="Y">
350
- <?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
351
-
352
-
353
-
354
-
355
-
356
-
357
- </form>
358
- <?php
359
- self::output_sidebar();
360
- }
361
-
362
- public static function tracking_settings() {
363
- $gadwp = GADWP();
364
-
365
- if ( ! current_user_can( 'manage_options' ) ) {
366
- return;
367
- }
368
- $options = self::update_options( 'tracking' );
369
- if ( isset( $_POST['options']['gadwp_hidden'] ) ) {
370
- $message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Settings saved.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
371
- if ( ! ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) ) {
372
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
373
- }
374
- }
375
- if ( ! $gadwp->config->options['tableid_jail'] ) {
376
- $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
377
- }
378
- ?>
379
- <form name="gadwp_form" method="post" action="<?php esc_url($_SERVER['REQUEST_URI']); ?>">
380
- <div class="wrap">
381
- <?php echo "<h2>" . __( "Google Analytics Tracking Code", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
382
- </div>
383
- <div id="poststuff" class="gadwp">
384
- <div id="post-body" class="metabox-holder columns-2">
385
- <div id="post-body-content">
386
- <div class="settings-wrapper">
387
- <div class="inside">
388
- <?php if ( 'universal' == $options['tracking_type'] ) :?>
389
- <?php $tabs = array( 'basic' => __( "Basic Settings", 'google-analytics-dashboard-for-wp' ), 'events' => __( "Events Tracking", 'google-analytics-dashboard-for-wp' ), 'custom' => __( "Custom Definitions", 'google-analytics-dashboard-for-wp' ), 'exclude' => __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ), 'advanced' => __( "Advanced Settings", 'google-analytics-dashboard-for-wp' ), 'integration' => __( "Integration", 'google-analytics-dashboard-for-wp' ) );?>
390
- <?php elseif ( 'tagmanager' == $options['tracking_type'] ) :?>
391
- <?php $tabs = array( 'basic' => __( "Basic Settings", 'google-analytics-dashboard-for-wp' ), 'tmdatalayervars' => __( "DataLayer Variables", 'google-analytics-dashboard-for-wp' ), 'exclude' => __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ), 'tmintegration' => __( "Integration", 'google-analytics-dashboard-for-wp' ) );?>
392
- <?php else :?>
393
- <?php $tabs = array( 'basic' => __( "Basic Settings", 'google-analytics-dashboard-for-wp' ) );?>
394
- <?php endif; ?>
395
- <?php self::navigation_tabs( $tabs ); ?>
396
- <?php if ( isset( $message ) ) : ?>
397
- <?php echo $message; ?>
398
- <?php endif; ?>
399
- <div id="gadwp-basic">
400
- <table class="gadwp-settings-options">
401
- <tr>
402
- <td colspan="2"><?php echo "<h2>" . __( "Tracking Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
403
- </tr>
404
- <tr>
405
- <td class="gadwp-settings-title">
406
- <label for="tracking_type"><?php _e("Tracking Type:", 'google-analytics-dashboard-for-wp' ); ?>
407
- </label>
408
- </td>
409
- <td>
410
- <select id="tracking_type" name="options[tracking_type]" onchange="this.form.submit()">
411
- <option value="universal" <?php selected( $options['tracking_type'], 'universal' ); ?>><?php _e("Analytics", 'google-analytics-dashboard-for-wp');?></option>
412
- <option value="tagmanager" <?php selected( $options['tracking_type'], 'tagmanager' ); ?>><?php _e("Tag Manager", 'google-analytics-dashboard-for-wp');?></option>
413
- <option value="disabled" <?php selected( $options['tracking_type'], 'disabled' ); ?>><?php _e("Disabled", 'google-analytics-dashboard-for-wp');?></option>
414
- </select>
415
- </td>
416
- </tr>
417
- <?php if ( 'universal' == $options['tracking_type'] ) : ?>
418
- <tr>
419
- <td class="gadwp-settings-title"></td>
420
- <td>
421
- <?php $profile_info = GADWP_Tools::get_selected_profile($gadwp->config->options['ga_profiles_list'], $gadwp->config->options['tableid_jail']); ?>
422
- <?php echo '<pre>' . __("View Name:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[0]) . "<br />" . __("Tracking ID:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[2]) . "<br />" . __("Default URL:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[3]) . "<br />" . __("Time Zone:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[5]) . '</pre>';?>
423
- </td>
424
- </tr>
425
- <tr>
426
- <td colspan="2" class="gadwp-settings-title">
427
- <div class="button-primary gadwp-settings-switchoo">
428
- <input type="checkbox" name="options[ga_with_gtag]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_with_gtag" <?php checked( $options['ga_with_gtag'], 1 ); ?>>
429
- <label class="gadwp-settings-switchoo-label" for="ga_with_gtag">
430
- <div class="gadwp-settings-switchoo-inner"></div>
431
- <div class="gadwp-settings-switchoo-switch"></div>
432
- </label>
433
- </div>
434
- <div class="switch-desc"><?php echo " ".__("use global site tag gtag.js (not recommended)", 'google-analytics-dashboard-for-wp' );?></div>
435
- </td>
436
- </tr>
437
- <?php elseif ( 'tagmanager' == $options['tracking_type'] ) : ?>
438
- <tr>
439
- <td class="gadwp-settings-title">
440
- <label for="tracking_type"><?php _e("Web Container ID:", 'google-analytics-dashboard-for-wp' ); ?>
441
- </label>
442
- </td>
443
- <td>
444
- <input type="text" name="options[web_containerid]" value="<?php echo esc_attr($options['web_containerid']); ?>" size="15">
445
- </td>
446
- </tr>
447
- <?php endif; ?>
448
- <tr>
449
- <td class="gadwp-settings-title">
450
- <label for="trackingcode_infooter"><?php _e("Code Placement:", 'google-analytics-dashboard-for-wp' ); ?>
451
- </label>
452
- </td>
453
- <td>
454
- <select id="trackingcode_infooter" name="options[trackingcode_infooter]">
455
- <option value="0" <?php selected( $options['trackingcode_infooter'], 0 ); ?>><?php _e("HTML Head", 'google-analytics-dashboard-for-wp');?></option>
456
- <option value="1" <?php selected( $options['trackingcode_infooter'], 1 ); ?>><?php _e("HTML Body", 'google-analytics-dashboard-for-wp');?></option>
457
- </select>
458
- </td>
459
- </tr>
460
- </table>
461
- </div>
462
- <div id="gadwp-events">
463
- <table class="gadwp-settings-options">
464
- <tr>
465
- <td colspan="2"><?php echo "<h2>" . __( "Events Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
466
- </tr>
467
- <tr>
468
- <td colspan="2" class="gadwp-settings-title">
469
- <div class="button-primary gadwp-settings-switchoo">
470
- <input type="checkbox" name="options[ga_event_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_event_tracking" <?php checked( $options['ga_event_tracking'], 1 ); ?>>
471
- <label class="gadwp-settings-switchoo-label" for="ga_event_tracking">
472
- <div class="gadwp-settings-switchoo-inner"></div>
473
- <div class="gadwp-settings-switchoo-switch"></div>
474
- </label>
475
- </div>
476
- <div class="switch-desc"><?php echo " ".__("track downloads, mailto, telephone and outbound links", 'google-analytics-dashboard-for-wp' ); ?></div>
477
- </td>
478
- </tr>
479
- <tr>
480
- <td colspan="2" class="gadwp-settings-title">
481
- <div class="button-primary gadwp-settings-switchoo">
482
- <input type="checkbox" name="options[ga_aff_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_aff_tracking" <?php checked( $options['ga_aff_tracking'], 1 ); ?>>
483
- <label class="gadwp-settings-switchoo-label" for="ga_aff_tracking">
484
- <div class="gadwp-settings-switchoo-inner"></div>
485
- <div class="gadwp-settings-switchoo-switch"></div>
486
- </label>
487
- </div>
488
- <div class="switch-desc"><?php echo " ".__("track affiliate links", 'google-analytics-dashboard-for-wp' ); ?></div>
489
- </td>
490
- </tr>
491
- <tr>
492
- <td colspan="2" class="gadwp-settings-title">
493
- <div class="button-primary gadwp-settings-switchoo">
494
- <input type="checkbox" name="options[ga_hash_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_hash_tracking" <?php checked( $options['ga_hash_tracking'], 1 ); ?>>
495
- <label class="gadwp-settings-switchoo-label" for="ga_hash_tracking">
496
- <div class="gadwp-settings-switchoo-inner"></div>
497
- <div class="gadwp-settings-switchoo-switch"></div>
498
- </label>
499
- </div>
500
- <div class="switch-desc"><?php echo " ".__("track fragment identifiers, hashmarks (#) in URI links", 'google-analytics-dashboard-for-wp' ); ?></div>
501
- </td>
502
- </tr>
503
- <tr>
504
- <td colspan="2" class="gadwp-settings-title">
505
- <div class="button-primary gadwp-settings-switchoo">
506
- <input type="checkbox" name="options[ga_formsubmit_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_formsubmit_tracking" <?php checked( $options['ga_formsubmit_tracking'], 1 ); ?>>
507
- <label class="gadwp-settings-switchoo-label" for="ga_formsubmit_tracking">
508
- <div class="gadwp-settings-switchoo-inner"></div>
509
- <div class="gadwp-settings-switchoo-switch"></div>
510
- </label>
511
- </div>
512
- <div class="switch-desc"><?php echo " ".__("track form submit actions", 'google-analytics-dashboard-for-wp' ); ?></div>
513
- </td>
514
- </tr>
515
- <tr>
516
- <td colspan="2" class="gadwp-settings-title">
517
- <div class="button-primary gadwp-settings-switchoo">
518
- <input type="checkbox" name="options[ga_pagescrolldepth_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_pagescrolldepth_tracking" <?php checked( $options['ga_pagescrolldepth_tracking'], 1 ); ?>>
519
- <label class="gadwp-settings-switchoo-label" for="ga_pagescrolldepth_tracking">
520
- <div class="gadwp-settings-switchoo-inner"></div>
521
- <div class="gadwp-settings-switchoo-switch"></div>
522
- </label>
523
- </div>
524
- <div class="switch-desc"><?php echo " ".__("track page scrolling depth", 'google-analytics-dashboard-for-wp' ); ?></div>
525
- </td>
526
- </tr>
527
- <tr>
528
- <td class="gadwp-settings-title">
529
- <label for="ga_event_downloads"><?php _e("Downloads Regex:", 'google-analytics-dashboard-for-wp'); ?>
530
- </label>
531
- </td>
532
- <td>
533
- <input type="text" id="ga_event_downloads" name="options[ga_event_downloads]" value="<?php echo esc_attr($options['ga_event_downloads']); ?>" size="50">
534
- </td>
535
- </tr>
536
- <tr>
537
- <td class="gadwp-settings-title">
538
- <label for="ga_event_affiliates"><?php _e("Affiliates Regex:", 'google-analytics-dashboard-for-wp'); ?>
539
- </label>
540
- </td>
541
- <td>
542
- <input type="text" id="ga_event_affiliates" name="options[ga_event_affiliates]" value="<?php echo esc_attr($options['ga_event_affiliates']); ?>" size="50">
543
- </td>
544
- </tr>
545
- <tr>
546
- <td class="gadwp-settings-title">
547
- <label for="trackingevents_infooter"><?php _e("Code Placement:", 'google-analytics-dashboard-for-wp' ); ?>
548
- </label>
549
- </td>
550
- <td>
551
- <select id="trackingevents_infooter" name="options[trackingevents_infooter]">
552
- <option value="0" <?php selected( $options['trackingevents_infooter'], 0 ); ?>><?php _e("HTML Head", 'google-analytics-dashboard-for-wp');?></option>
553
- <option value="1" <?php selected( $options['trackingevents_infooter'], 1 ); ?>><?php _e("HTML Body", 'google-analytics-dashboard-for-wp');?></option>
554
- </select>
555
- </td>
556
- </tr>
557
- </table>
558
- </div>
559
- <div id="gadwp-custom">
560
- <table class="gadwp-settings-options">
561
- <tr>
562
- <td colspan="2"><?php echo "<h2>" . __( "Custom Dimensions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
563
- </tr>
564
- <tr>
565
- <td class="gadwp-settings-title">
566
- <label for="ga_author_dimindex"><?php _e("Authors:", 'google-analytics-dashboard-for-wp' ); ?>
567
- </label>
568
- </td>
569
- <td>
570
- <select id="ga_author_dimindex" name="options[ga_author_dimindex]">
571
- <?php for ($i=0;$i<21;$i++) : ?>
572
- <option value="<?php echo $i;?>" <?php selected( $options['ga_author_dimindex'], $i ); ?>><?php echo 0 == $i ?'Disabled':'dimension '.$i; ?></option>
573
- <?php endfor; ?>
574
- </select>
575
- </td>
576
- </tr>
577
- <tr>
578
- <td class="gadwp-settings-title">
579
- <label for="ga_pubyear_dimindex"><?php _e("Publication Year:", 'google-analytics-dashboard-for-wp' ); ?>
580
- </label>
581
- </td>
582
- <td>
583
- <select id="ga_pubyear_dimindex" name="options[ga_pubyear_dimindex]">
584
- <?php for ($i=0;$i<21;$i++) : ?>
585
- <option value="<?php echo $i;?>" <?php selected( $options['ga_pubyear_dimindex'], $i ); ?>><?php echo 0 == $i ?'Disabled':'dimension '.$i; ?></option>
586
- <?php endfor; ?>
587
- </select>
588
- </td>
589
- </tr>
590
- <tr>
591
- <td class="gadwp-settings-title">
592
- <label for="ga_pubyearmonth_dimindex"><?php _e("Publication Month:", 'google-analytics-dashboard-for-wp' ); ?>
593
- </label>
594
- </td>
595
- <td>
596
- <select id="ga_pubyearmonth_dimindex" name="options[ga_pubyearmonth_dimindex]">
597
- <?php for ($i=0;$i<21;$i++) : ?>
598
- <option value="<?php echo $i;?>" <?php selected( $options['ga_pubyearmonth_dimindex'], $i ); ?>><?php echo 0 == $i ?'Disabled':'dimension '.$i; ?></option>
599
- <?php endfor; ?>
600
- </select>
601
- </td>
602
- </tr>
603
- <tr>
604
- <td class="gadwp-settings-title">
605
- <label for="ga_category_dimindex"><?php _e("Categories:", 'google-analytics-dashboard-for-wp' ); ?>
606
- </label>
607
- </td>
608
- <td>
609
- <select id="ga_category_dimindex" name="options[ga_category_dimindex]">
610
- <?php for ($i=0;$i<21;$i++) : ?>
611
- <option value="<?php echo $i;?>" <?php selected( $options['ga_category_dimindex'], $i ); ?>><?php echo 0 == $i ? 'Disabled':'dimension '.$i; ?></option>
612
- <?php endfor; ?>
613
- </select>
614
- </td>
615
- </tr>
616
- <tr>
617
- <td class="gadwp-settings-title">
618
- <label for="ga_user_dimindex"><?php _e("User Type:", 'google-analytics-dashboard-for-wp' ); ?>
619
- </label>
620
- </td>
621
- <td>
622
- <select id="ga_user_dimindex" name="options[ga_user_dimindex]">
623
- <?php for ($i=0;$i<21;$i++) : ?>
624
- <option value="<?php echo $i;?>" <?php selected( $options['ga_user_dimindex'], $i ); ?>><?php echo 0 == $i ? 'Disabled':'dimension '.$i; ?></option>
625
- <?php endfor; ?>
626
- </select>
627
- </td>
628
- </tr>
629
- <tr>
630
- <td class="gadwp-settings-title">
631
- <label for="ga_tag_dimindex"><?php _e("Tags:", 'google-analytics-dashboard-for-wp' ); ?>
632
- </label>
633
- </td>
634
- <td>
635
- <select id="ga_tag_dimindex" name="options[ga_tag_dimindex]">
636
- <?php for ($i=0;$i<21;$i++) : ?>
637
- <option value="<?php echo $i;?>" <?php selected( $options['ga_tag_dimindex'], $i ); ?>><?php echo 0 == $i ? 'Disabled':'dimension '.$i; ?></option>
638
- <?php endfor; ?>
639
- </select>
640
- </td>
641
- </tr>
642
- </table>
643
- </div>
644
- <div id="gadwp-tmdatalayervars">
645
- <table class="gadwp-settings-options">
646
- <tr>
647
- <td colspan="2"><?php echo "<h2>" . __( "Main Variables", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
648
- </tr>
649
- <tr>
650
- <td class="gadwp-settings-title">
651
- <label for="tm_author_var"><?php _e("Authors:", 'google-analytics-dashboard-for-wp' ); ?>
652
- </label>
653
- </td>
654
- <td>
655
- <select id="tm_author_var" name="options[tm_author_var]">
656
- <option value="1" <?php selected( $options['tm_author_var'], 1 ); ?>>gadwpAuthor</option>
657
- <option value="0" <?php selected( $options['tm_author_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
658
- </select>
659
- </td>
660
- </tr>
661
- <tr>
662
- <td class="gadwp-settings-title">
663
- <label for="tm_pubyear_var"><?php _e("Publication Year:", 'google-analytics-dashboard-for-wp' ); ?>
664
- </label>
665
- </td>
666
- <td>
667
- <select id="tm_pubyear_var" name="options[tm_pubyear_var]">
668
- <option value="1" <?php selected( $options['tm_pubyear_var'], 1 ); ?>>gadwpPublicationYear</option>
669
- <option value="0" <?php selected( $options['tm_pubyear_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
670
- </select>
671
- </td>
672
- </tr>
673
- <tr>
674
- <td class="gadwp-settings-title">
675
- <label for="tm_pubyearmonth_var"><?php _e("Publication Month:", 'google-analytics-dashboard-for-wp' ); ?>
676
- </label>
677
- </td>
678
- <td>
679
- <select id="tm_pubyearmonth_var" name="options[tm_pubyearmonth_var]">
680
- <option value="1" <?php selected( $options['tm_pubyearmonth_var'], 1 ); ?>>gadwpPublicationYearMonth</option>
681
- <option value="0" <?php selected( $options['tm_pubyearmonth_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
682
- </select>
683
- </td>
684
- </tr>
685
- <tr>
686
- <td class="gadwp-settings-title">
687
- <label for="tm_category_var"><?php _e("Categories:", 'google-analytics-dashboard-for-wp' ); ?>
688
- </label>
689
- </td>
690
- <td>
691
- <select id="tm_category_var" name="options[tm_category_var]">
692
- <option value="1" <?php selected( $options['tm_category_var'], 1 ); ?>>gadwpCategory</option>
693
- <option value="0" <?php selected( $options['tm_category_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
694
- </select>
695
- </td>
696
- </tr>
697
- <tr>
698
- <td class="gadwp-settings-title">
699
- <label for="tm_user_var"><?php _e("User Type:", 'google-analytics-dashboard-for-wp' ); ?>
700
- </label>
701
- </td>
702
- <td>
703
- <select id="tm_user_var" name="options[tm_user_var]">
704
- <option value="1" <?php selected( $options['tm_user_var'], 1 ); ?>>gadwpUser</option>
705
- <option value="0" <?php selected( $options['tm_user_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
706
- </select>
707
- </td>
708
- </tr>
709
- <tr>
710
- <td class="gadwp-settings-title">
711
- <label for="tm_tag_var"><?php _e("Tags:", 'google-analytics-dashboard-for-wp' ); ?>
712
- </label>
713
- </td>
714
- <td>
715
- <select id="tm_tag_var" name="options[tm_tag_var]">
716
- <option value="1" <?php selected( $options['tm_tag_var'], 1 ); ?>>gadwpTag</option>
717
- <option value="0" <?php selected( $options['tm_tag_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
718
- </select>
719
- </td>
720
- </tr>
721
- </table>
722
- </div>
723
- <div id="gadwp-advanced">
724
- <table class="gadwp-settings-options">
725
- <tr>
726
- <td colspan="2"><?php echo "<h2>" . __( "Advanced Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
727
- </tr>
728
- <tr>
729
- <td class="gadwp-settings-title">
730
- <label for="ga_speed_samplerate"><?php _e("Speed Sample Rate:", 'google-analytics-dashboard-for-wp'); ?>
731
- </label>
732
- </td>
733
- <td>
734
- <input type="number" id="ga_speed_samplerate" name="options[ga_speed_samplerate]" value="<?php echo (int)($options['ga_speed_samplerate']); ?>" max="100" min="1">
735
- %
736
- </td>
737
- </tr>
738
- <tr>
739
- <td class="gadwp-settings-title">
740
- <label for="ga_user_samplerate"><?php _e("User Sample Rate:", 'google-analytics-dashboard-for-wp'); ?>
741
- </label>
742
- </td>
743
- <td>
744
- <input type="number" id="ga_user_samplerate" name="options[ga_user_samplerate]" value="<?php echo (int)($options['ga_user_samplerate']); ?>" max="100" min="1">
745
- %
746
- </td>
747
- </tr>
748
- <tr>
749
- <td colspan="2" class="gadwp-settings-title">
750
- <div class="button-primary gadwp-settings-switchoo">
751
- <input type="checkbox" name="options[ga_anonymize_ip]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_anonymize_ip" <?php checked( $options['ga_anonymize_ip'], 1 ); ?>>
752
- <label class="gadwp-settings-switchoo-label" for="ga_anonymize_ip">
753
- <div class="gadwp-settings-switchoo-inner"></div>
754
- <div class="gadwp-settings-switchoo-switch"></div>
755
- </label>
756
- </div>
757
- <div class="switch-desc"><?php echo " ".__("anonymize IPs while tracking", 'google-analytics-dashboard-for-wp' );?></div>
758
- </td>
759
- </tr>
760
- <tr>
761
- <td colspan="2" class="gadwp-settings-title">
762
- <div class="button-primary gadwp-settings-switchoo">
763
- <input type="checkbox" name="options[ga_optout]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_optout" <?php checked( $options['ga_optout'], 1 ); ?>>
764
- <label class="gadwp-settings-switchoo-label" for="ga_optout">
765
- <div class="gadwp-settings-switchoo-inner"></div>
766
- <div class="gadwp-settings-switchoo-switch"></div>
767
- </label>
768
- </div>
769
- <div class="switch-desc"><?php echo " ".__("enable support for user opt-out", 'google-analytics-dashboard-for-wp' );?></div>
770
- </td>
771
- </tr>
772
- <tr>
773
- <td colspan="2" class="gadwp-settings-title">
774
- <div class="button-primary gadwp-settings-switchoo">
775
- <input type="checkbox" name="options[ga_dnt_optout]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_dnt_optout" <?php checked( $options['ga_dnt_optout'], 1 ); ?>>
776
- <label class="gadwp-settings-switchoo-label" for="ga_dnt_optout">
777
- <div class="gadwp-settings-switchoo-inner"></div>
778
- <div class="gadwp-settings-switchoo-switch"></div>
779
- </label>
780
- </div>
781
- <div class="switch-desc"> <?php _e( 'exclude tracking for users sending Do Not Track header', 'google-analytics-dashboard-for-wp' ); ?></div>
782
- </td>
783
- </tr>
784
- <tr>
785
- <td colspan="2" class="gadwp-settings-title">
786
- <div class="button-primary gadwp-settings-switchoo">
787
- <input type="checkbox" name="options[ga_remarketing]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_remarketing" <?php checked( $options['ga_remarketing'], 1 ); ?>>
788
- <label class="gadwp-settings-switchoo-label" for="ga_remarketing">
789
- <div class="gadwp-settings-switchoo-inner"></div>
790
- <div class="gadwp-settings-switchoo-switch"></div>
791
- </label>
792
- </div>
793
- <div class="switch-desc"><?php echo " ".__("enable remarketing, demographics and interests reports", 'google-analytics-dashboard-for-wp' );?></div>
794
- </td>
795
- </tr>
796
- <tr>
797
- <td colspan="2" class="gadwp-settings-title">
798
- <div class="button-primary gadwp-settings-switchoo">
799
- <input type="checkbox" name="options[ga_event_bouncerate]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_event_bouncerate" <?php checked( $options['ga_event_bouncerate'], 1 ); ?>>
800
- <label class="gadwp-settings-switchoo-label" for="ga_event_bouncerate">
801
- <div class="gadwp-settings-switchoo-inner"></div>
802
- <div class="gadwp-settings-switchoo-switch"></div>
803
- </label>
804
- </div>
805
- <div class="switch-desc"><?php echo " ".__("exclude events from bounce-rate and time on page calculation", 'google-analytics-dashboard-for-wp' );?></div>
806
- </td>
807
- </tr>
808
- <tr>
809
- <td colspan="2" class="gadwp-settings-title">
810
- <div class="button-primary gadwp-settings-switchoo">
811
- <input type="checkbox" name="options[ga_enhanced_links]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_enhanced_links" <?php checked( $options['ga_enhanced_links'], 1 ); ?>>
812
- <label class="gadwp-settings-switchoo-label" for="ga_enhanced_links">
813
- <div class="gadwp-settings-switchoo-inner"></div>
814
- <div class="gadwp-settings-switchoo-switch"></div>
815
- </label>
816
- </div>
817
- <div class="switch-desc"><?php echo " ".__("enable enhanced link attribution", 'google-analytics-dashboard-for-wp' );?></div>
818
- </td>
819
- </tr>
820
- <tr>
821
- <td colspan="2" class="gadwp-settings-title">
822
- <div class="button-primary gadwp-settings-switchoo">
823
- <input type="checkbox" name="options[ga_event_precision]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_event_precision" <?php checked( $options['ga_event_precision'], 1 ); ?>>
824
- <label class="gadwp-settings-switchoo-label" for="ga_event_precision">
825
- <div class="gadwp-settings-switchoo-inner"></div>
826
- <div class="gadwp-settings-switchoo-switch"></div>
827
- </label>
828
- </div>
829
- <div class="switch-desc"><?php echo " ".__("use hitCallback to increase event tracking accuracy", 'google-analytics-dashboard-for-wp' );?></div>
830
- </td>
831
- </tr>
832
- <tr>
833
- <td colspan="2" class="gadwp-settings-title">
834
- <div class="button-primary gadwp-settings-switchoo">
835
- <input type="checkbox" name="options[ga_force_ssl]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_force_ssl" <?php checked( $options['ga_force_ssl'] || $options['ga_with_gtag'], 1 ); ?> <?php disabled( $options['ga_with_gtag'], true );?>>
836
- <label class="gadwp-settings-switchoo-label" for="ga_force_ssl">
837
- <div class="gadwp-settings-switchoo-inner"></div>
838
- <div class="gadwp-settings-switchoo-switch"></div>
839
- </label>
840
- </div>
841
- <div class="switch-desc"><?php echo " ".__("enable Force SSL", 'google-analytics-dashboard-for-wp' );?></div>
842
- </td>
843
- </tr>
844
- <tr>
845
- <td colspan="2"><?php echo "<h2>" . __( "Cross-domain Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
846
- </tr>
847
- <tr>
848
- <td colspan="2" class="gadwp-settings-title">
849
- <div class="button-primary gadwp-settings-switchoo">
850
- <input type="checkbox" name="options[ga_crossdomain_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_crossdomain_tracking" <?php checked( $options['ga_crossdomain_tracking'], 1 ); ?>>
851
- <label class="gadwp-settings-switchoo-label" for="ga_crossdomain_tracking">
852
- <div class="gadwp-settings-switchoo-inner"></div>
853
- <div class="gadwp-settings-switchoo-switch"></div>
854
- </label>
855
- </div>
856
- <div class="switch-desc"><?php echo " ".__("enable cross domain tracking", 'google-analytics-dashboard-for-wp' ); ?></div>
857
- </td>
858
- </tr>
859
- <tr>
860
- <td class="gadwp-settings-title">
861
- <label for="ga_crossdomain_list"><?php _e("Cross Domains:", 'google-analytics-dashboard-for-wp'); ?>
862
- </label>
863
- </td>
864
- <td>
865
- <input type="text" id="ga_crossdomain_list" name="options[ga_crossdomain_list]" value="<?php echo esc_attr($options['ga_crossdomain_list']); ?>" size="50">
866
- </td>
867
- </tr>
868
- <tr>
869
- <td colspan="2"><?php echo "<h2>" . __( "Cookie Customization", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
870
- </tr>
871
- <tr>
872
- <td class="gadwp-settings-title">
873
- <label for="ga_cookiedomain"><?php _e("Cookie Domain:", 'google-analytics-dashboard-for-wp'); ?>
874
- </label>
875
- </td>
876
- <td>
877
- <input type="text" id="ga_cookiedomain" name="options[ga_cookiedomain]" value="<?php echo esc_attr($options['ga_cookiedomain']); ?>" size="50">
878
- </td>
879
- </tr>
880
- <tr>
881
- <td class="gadwp-settings-title">
882
- <label for="ga_cookiename"><?php _e("Cookie Name:", 'google-analytics-dashboard-for-wp'); ?>
883
- </label>
884
- </td>
885
- <td>
886
- <input type="text" id="ga_cookiename" name="options[ga_cookiename]" value="<?php echo esc_attr($options['ga_cookiename']); ?>" size="50">
887
- </td>
888
- </tr>
889
- <tr>
890
- <td class="gadwp-settings-title">
891
- <label for="ga_cookieexpires"><?php _e("Cookie Expires:", 'google-analytics-dashboard-for-wp'); ?>
892
- </label>
893
- </td>
894
- <td>
895
- <input type="text" id="ga_cookieexpires" name="options[ga_cookieexpires]" value="<?php echo esc_attr($options['ga_cookieexpires']); ?>" size="10">
896
- <?php _e("seconds", 'google-analytics-dashboard-for-wp' ); ?>
897
- </td>
898
- </tr>
899
- </table>
900
- </div>
901
- <div id="gadwp-integration">
902
- <table class="gadwp-settings-options">
903
- <tr>
904
- <td colspan="2"><?php echo "<h2>" . __( "Accelerated Mobile Pages (AMP)", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
905
- </tr>
906
- <tr>
907
- <td colspan="2" class="gadwp-settings-title">
908
- <div class="button-primary gadwp-settings-switchoo">
909
- <input type="checkbox" name="options[amp_tracking_analytics]" value="1" class="gadwp-settings-switchoo-checkbox" id="amp_tracking_analytics" <?php checked( $options['amp_tracking_analytics'], 1 ); ?>>
910
- <label class="gadwp-settings-switchoo-label" for="amp_tracking_analytics">
911
- <div class="gadwp-settings-switchoo-inner"></div>
912
- <div class="gadwp-settings-switchoo-switch"></div>
913
- </label>
914
- </div>
915
- <div class="switch-desc"><?php echo " ".__("enable tracking for Accelerated Mobile Pages (AMP)", 'google-analytics-dashboard-for-wp' );?></div>
916
- </td>
917
- </tr>
918
- <tr>
919
- <td colspan="2" class="gadwp-settings-title">
920
- <div class="button-primary gadwp-settings-switchoo">
921
- <input type="checkbox" name="options[amp_tracking_clientidapi]" value="1" class="gadwp-settings-switchoo-checkbox" id="amp_tracking_clientidapi" <?php checked( $options['amp_tracking_clientidapi'] && !$options['ga_with_gtag'], 1 ); ?> <?php disabled( $options['ga_with_gtag'], true );?>>
922
- <label class="gadwp-settings-switchoo-label" for="amp_tracking_clientidapi">
923
- <div class="gadwp-settings-switchoo-inner"></div>
924
- <div class="gadwp-settings-switchoo-switch"></div>
925
- </label>
926
- </div>
927
- <div class="switch-desc"><?php echo " ".__("enable Google AMP Client Id API", 'google-analytics-dashboard-for-wp' );?></div>
928
- </td>
929
- </tr>
930
- <tr>
931
- <td colspan="2"><?php echo "<h2>" . __( "Ecommerce", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
932
- </tr>
933
- <tr>
934
- <td class="gadwp-settings-title">
935
- <label for="tracking_type"><?php _e("Ecommerce Tracking:", 'google-analytics-dashboard-for-wp' ); ?>
936
- </label>
937
- </td>
938
- <td>
939
- <select id="ecommerce_mode" name="options[ecommerce_mode]" <?php disabled( $options['ga_with_gtag'], true );?>>
940
- <option value="disabled" <?php selected( $options['ecommerce_mode'], 'disabled' ); ?>><?php _e("Disabled", 'google-analytics-dashboard-for-wp');?></option>
941
- <option value="standard" <?php selected( $options['ecommerce_mode'], 'standard' ); ?>><?php _e("Ecommerce Plugin", 'google-analytics-dashboard-for-wp');?></option>
942
- <option value="enhanced" <?php selected( $options['ecommerce_mode'], 'enhanced' ); selected( $options['ga_with_gtag'], true );?>><?php _e("Enhanced Ecommerce Plugin", 'google-analytics-dashboard-for-wp');?></option>
943
- </select>
944
- </td>
945
- </tr>
946
- <tr>
947
- <td colspan="2"><?php echo "<h2>" . __( "Optimize", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
948
- </tr>
949
- <tr>
950
- <td colspan="2" class="gadwp-settings-title">
951
- <div class="button-primary gadwp-settings-switchoo">
952
- <input type="checkbox" name="options[optimize_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="optimize_tracking" <?php checked( $options['optimize_tracking'], 1 ); ?>>
953
- <label class="gadwp-settings-switchoo-label" for="optimize_tracking">
954
- <div class="gadwp-settings-switchoo-inner"></div>
955
- <div class="gadwp-settings-switchoo-switch"></div>
956
- </label>
957
- </div>
958
- <div class="switch-desc"><?php echo " ".__("enable Optimize tracking", 'google-analytics-dashboard-for-wp' );?></div>
959
- </td>
960
- </tr>
961
- <tr>
962
- <td colspan="2" class="gadwp-settings-title">
963
- <div class="button-primary gadwp-settings-switchoo">
964
- <input type="checkbox" name="options[optimize_pagehiding]" value="1" class="gadwp-settings-switchoo-checkbox" id="optimize_pagehiding" <?php checked( $options['optimize_pagehiding'], 1 ); ?>>
965
- <label class="gadwp-settings-switchoo-label" for="optimize_pagehiding">
966
- <div class="gadwp-settings-switchoo-inner"></div>
967
- <div class="gadwp-settings-switchoo-switch"></div>
968
- </label>
969
- </div>
970
- <div class="switch-desc"><?php echo " ".__("enable Page Hiding support", 'google-analytics-dashboard-for-wp' );?></div>
971
- </td>
972
- </tr>
973
- <tr>
974
- <td class="gadwp-settings-title">
975
- <label for="tracking_type"><?php _e("Container ID:", 'google-analytics-dashboard-for-wp' ); ?>
976
- </label>
977
- </td>
978
- <td>
979
- <input type="text" name="options[optimize_containerid]" value="<?php echo esc_attr($options['optimize_containerid']); ?>" size="15">
980
- </td>
981
- </tr>
982
- </table>
983
- </div>
984
- <div id="gadwp-tmintegration">
985
- <table class="gadwp-settings-options">
986
- <tr>
987
- <td colspan="2"><?php echo "<h2>" . __( "Accelerated Mobile Pages (AMP)", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
988
- </tr>
989
- <tr>
990
- <td colspan="2" class="gadwp-settings-title">
991
- <div class="button-primary gadwp-settings-switchoo">
992
- <input type="checkbox" name="options[amp_tracking_tagmanager]" value="1" class="gadwp-settings-switchoo-checkbox" id="amp_tracking_tagmanager" <?php checked( $options['amp_tracking_tagmanager'], 1 ); ?>>
993
- <label class="gadwp-settings-switchoo-label" for="amp_tracking_tagmanager">
994
- <div class="gadwp-settings-switchoo-inner"></div>
995
- <div class="gadwp-settings-switchoo-switch"></div>
996
- </label>
997
- </div>
998
- <div class="switch-desc"><?php echo " ".__("enable tracking for Accelerated Mobile Pages (AMP)", 'google-analytics-dashboard-for-wp' );?></div>
999
- </td>
1000
- </tr>
1001
- <tr>
1002
- <td class="gadwp-settings-title">
1003
- <label for="tracking_type"><?php _e("AMP Container ID:", 'google-analytics-dashboard-for-wp' ); ?>
1004
- </label>
1005
- </td>
1006
- <td>
1007
- <input type="text" name="options[amp_containerid]" value="<?php echo esc_attr($options['amp_containerid']); ?>" size="15">
1008
- </td>
1009
- </tr>
1010
- </table>
1011
- </div>
1012
- <div id="gadwp-exclude">
1013
- <table class="gadwp-settings-options">
1014
- <tr>
1015
- <td colspan="2"><?php echo "<h2>" . __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1016
- </tr>
1017
- <tr>
1018
- <td class="roles gadwp-settings-title">
1019
- <label for="track_exclude"><?php _e("Exclude tracking for:", 'google-analytics-dashboard-for-wp' ); ?></label>
1020
- </td>
1021
- <td class="gadwp-settings-roles">
1022
- <table>
1023
- <tr>
1024
- <?php if ( ! isset( $wp_roles ) ) : ?>
1025
- <?php $wp_roles = new WP_Roles(); ?>
1026
- <?php endif; ?>
1027
- <?php $i = 0; ?>
1028
- <?php foreach ( $wp_roles->role_names as $role => $name ) : ?>
1029
- <?php if ( 'subscriber' != $role ) : ?>
1030
- <?php $i++; ?>
1031
- <td>
1032
- <label>
1033
- <input type="checkbox" name="options[track_exclude][]" value="<?php echo $role; ?>" <?php if (in_array($role,$options['track_exclude'])) echo 'checked="checked"'; ?> /> <?php echo $name; ?>
1034
- </label>
1035
- </td>
1036
- <?php endif; ?>
1037
- <?php if ( 0 == $i % 4 ) : ?>
1038
- </tr>
1039
- <tr>
1040
- <?php endif; ?>
1041
- <?php endforeach; ?>
1042
-
1043
-
1044
-
1045
-
1046
-
1047
-
1048
- </table>
1049
- </td>
1050
- </tr>
1051
- </table>
1052
- </div>
1053
- <table class="gadwp-settings-options">
1054
- <tr>
1055
- <td colspan="2">
1056
- <hr>
1057
- </td>
1058
- </tr>
1059
- <tr>
1060
- <td colspan="2" class="submit">
1061
- <input type="submit" name="Submit" class="button button-primary" value="<?php _e('Save Changes', 'google-analytics-dashboard-for-wp' ) ?>" />
1062
- </td>
1063
- </tr>
1064
- </table>
1065
- <input type="hidden" name="options[gadwp_hidden]" value="Y">
1066
- <?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
1067
-
1068
-
1069
-
1070
-
1071
-
1072
-
1073
- </form>
1074
- <?php
1075
- self::output_sidebar();
1076
- }
1077
-
1078
- public static function errors_debugging() {
1079
-
1080
- $gadwp = GADWP();
1081
-
1082
- if ( ! current_user_can( 'manage_options' ) ) {
1083
- return;
1084
- }
1085
-
1086
- $anonim = GADWP_Tools::anonymize_options( $gadwp->config->options );
1087
-
1088
- $options = self::update_options( 'frontend' );
1089
- if ( ! $gadwp->config->options['tableid_jail'] || ! $gadwp->config->options['token'] ) {
1090
- $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
1091
- }
1092
- ?>
1093
- <div class="wrap">
1094
- <?php echo "<h2>" . __( "Google Analytics Errors & Debugging", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
1095
- </div>
1096
- <div id="poststuff" class="gadwp">
1097
- <div id="post-body" class="metabox-holder columns-2">
1098
- <div id="post-body-content">
1099
- <div class="settings-wrapper">
1100
- <div class="inside">
1101
- <?php if (isset($message)) echo $message; ?>
1102
- <?php $tabs = array( 'errors' => __( "Errors & Details", 'google-analytics-dashboard-for-wp' ), 'config' => __( "Plugin Settings", 'google-analytics-dashboard-for-wp' ), 'sysinfo' => __( "System", 'google-analytics-dashboard-for-wp' ) ); ?>
1103
- <?php self::navigation_tabs( $tabs ); ?>
1104
- <div id="gadwp-errors">
1105
- <table class="gadwp-settings-logdata">
1106
- <tr>
1107
- <td>
1108
- <?php echo "<h2>" . __( "Error Details", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
1109
- </td>
1110
- </tr>
1111
- <tr>
1112
- <td>
1113
- <?php $errors_count = GADWP_Tools::get_cache( 'errors_count' ); ?>
1114
- <pre class="gadwp-settings-logdata"><?php echo '<span>' . __("Count: ", 'google-analytics-dashboard-for-wp') . '</span>' . (int)$errors_count;?></pre>
1115
- <?php $errors = print_r( GADWP_Tools::get_cache( 'last_error' ), true ) ? esc_html( print_r( GADWP_Tools::get_cache( 'last_error' ), true ) ) : ''; ?>
1116
- <?php $errors = str_replace( 'Deconf_', 'Google_', $errors); ?>
1117
- <pre class="gadwp-settings-logdata"><?php echo '<span>' . __("Last Error: ", 'google-analytics-dashboard-for-wp') . '</span>' . "\n" . $errors;?></pre>
1118
- <pre class="gadwp-settings-logdata"><?php echo '<span>' . __("GAPI Error: ", 'google-analytics-dashboard-for-wp') . '</span>'; echo "\n" . esc_html( print_r( GADWP_Tools::get_cache( 'gapi_errors' ), true ) ) ?></pre>
1119
- <br />
1120
- <hr>
1121
- </td>
1122
- </tr>
1123
- <tr>
1124
- <td>
1125
- <?php echo "<h2>" . __( "Sampled Data", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
1126
- </td>
1127
- </tr>
1128
- <tr>
1129
- <td>
1130
- <?php $sampling = GADWP_TOOLS::get_cache( 'sampleddata' ); ?>
1131
- <?php if ( $sampling ) :?>
1132
- <?php printf( __( "Last Detected on %s.", 'google-analytics-dashboard-for-wp' ), '<strong>'. $sampling['date'] . '</strong>' );?>
1133
- <br />
1134
- <?php printf( __( "The report was based on %s of sessions.", 'google-analytics-dashboard-for-wp' ), '<strong>'. $sampling['percent'] . '</strong>' );?>
1135
- <br />
1136
- <?php printf( __( "Sessions ratio: %s.", 'google-analytics-dashboard-for-wp' ), '<strong>'. $sampling['sessions'] . '</strong>' ); ?>
1137
- <?php else :?>
1138
- <?php _e( "None", 'google-analytics-dashboard-for-wp' ); ?>
1139
- <?php endif;?>
1140
- </td>
1141
- </tr>
1142
- </table>
1143
- </div>
1144
- <div id="gadwp-config">
1145
- <table class="gadwp-settings-options">
1146
- <tr>
1147
- <td><?php echo "<h2>" . __( "Plugin Configuration", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1148
- </tr>
1149
- <tr>
1150
- <td>
1151
- <pre class="gadwp-settings-logdata"><?php echo esc_html(print_r($anonim, true));?></pre>
1152
- <br />
1153
- <hr>
1154
- </td>
1155
- </tr>
1156
- </table>
1157
- </div>
1158
- <div id="gadwp-sysinfo">
1159
- <table class="gadwp-settings-options">
1160
- <tr>
1161
- <td><?php echo "<h2>" . __( "System Information", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1162
- </tr>
1163
- <tr>
1164
- <td>
1165
- <pre class="gadwp-settings-logdata"><?php echo esc_html(GADWP_Tools::system_info());?></pre>
1166
- <br />
1167
- <hr>
1168
- </td>
1169
- </tr>
1170
- </table>
1171
- </div>
1172
- <?php
1173
- self::output_sidebar();
1174
- }
1175
-
1176
- public static function general_settings() {
1177
- $gadwp = GADWP();
1178
-
1179
- if ( ! current_user_can( 'manage_options' ) ) {
1180
- return;
1181
- }
1182
- $options = self::update_options( 'general' );
1183
- printf( '<div id="gapi-warning" class="updated"><p>%1$s <a href="https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=general_screen&utm_campaign=gadwp">%2$s</a></p></div>', __( 'Loading the required libraries. If this results in a blank screen or a fatal error, try this solution:', 'google-analytics-dashboard-for-wp' ), __( 'Library conflicts between WordPress plugins', 'google-analytics-dashboard-for-wp' ) );
1184
- if ( null === $gadwp->gapi_controller ) {
1185
- $gadwp->gapi_controller = new GADWP_GAPI_Controller();
1186
- }
1187
- echo '<script type="text/javascript">jQuery("#gapi-warning").hide()</script>';
1188
- if ( isset( $_POST['gadwp_access_code'] ) ) {
1189
- if ( 1 == ! stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) && $_POST['gadwp_access_code'] != get_option( 'gadwp_redeemed_code' ) ) {
1190
- try {
1191
- $gadwp_access_code = $_POST['gadwp_access_code'];
1192
- update_option( 'gadwp_redeemed_code', $gadwp_access_code );
1193
- GADWP_Tools::delete_cache( 'gapi_errors' );
1194
- GADWP_Tools::delete_cache( 'last_error' );
1195
- $gadwp->gapi_controller->client->authenticate( $_POST['gadwp_access_code'] );
1196
- $gadwp->config->options['token'] = $gadwp->gapi_controller->client->getAccessToken();
1197
- $gadwp->config->options['automatic_updates_minorversion'] = 1;
1198
- $gadwp->config->set_plugin_options();
1199
- $options = self::update_options( 'general' );
1200
- $message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Plugin authorization succeeded.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1201
- if ( $gadwp->config->options['token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
1202
- $profiles = $gadwp->gapi_controller->refresh_profiles();
1203
- if ( is_array ( $profiles ) && ! empty( $profiles ) ) {
1204
- $gadwp->config->options['ga_profiles_list'] = $profiles;
1205
- if ( ! $gadwp->config->options['tableid_jail'] ) {
1206
- $profile = GADWP_Tools::guess_default_domain( $profiles );
1207
- $gadwp->config->options['tableid_jail'] = $profile;
1208
- }
1209
- $gadwp->config->set_plugin_options();
1210
- $options = self::update_options( 'general' );
1211
- }
1212
- }
1213
- } catch ( Deconf_IO_Exception $e ) {
1214
- $timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
1215
- GADWP_Tools::set_error( $e, $timeout );
1216
- } catch ( Deconf_Service_Exception $e ) {
1217
- $timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
1218
- GADWP_Tools::set_error( $e, $timeout );
1219
- } catch ( Exception $e ) {
1220
- $timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
1221
- GADWP_Tools::set_error( $e, $timeout );
1222
- $gadwp->gapi_controller->reset_token();
1223
- }
1224
- } else {
1225
- if ( 1 == stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) ) {
1226
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "The access code is <strong>not</strong> your <strong>Tracking ID</strong> (UA-XXXXX-X) <strong>nor</strong> your <strong>email address</strong>!", 'google-analytics-dashboard-for-wp' ) . ".</p></div>";
1227
- } else {
1228
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You can only use the access code <strong>once</strong>, please generate a <strong>new access</strong> code following the instructions!", 'google-analytics-dashboard-for-wp' ) . ".</p></div>";
1229
- }
1230
- }
1231
- }
1232
- if ( isset( $_POST['Clear'] ) ) {
1233
- if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
1234
- GADWP_Tools::clear_cache();
1235
- $message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Cleared Cache.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1236
- } else {
1237
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1238
- }
1239
- }
1240
- if ( isset( $_POST['Reset'] ) ) {
1241
- if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
1242
- $gadwp->gapi_controller->reset_token();
1243
- GADWP_Tools::clear_cache();
1244
- $message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Token Reseted and Revoked.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1245
- $options = self::update_options( 'Reset' );
1246
- } else {
1247
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1248
- }
1249
- }
1250
- if ( isset( $_POST['Reset_Err'] ) ) {
1251
- if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
1252
-
1253
- if ( GADWP_Tools::get_cache( 'gapi_errors' ) || GADWP_Tools::get_cache( 'last_error' ) ) {
1254
-
1255
- $info = GADWP_Tools::system_info();
1256
- $info .= 'GADWP Version: ' . GADWP_CURRENT_VERSION;
1257
-
1258
- $sep = "\n---------------------------\n";
1259
- $error_report = GADWP_Tools::get_cache( 'last_error' );
1260
- $error_report .= $sep . print_r( GADWP_Tools::get_cache( 'gapi_errors' ), true );
1261
- $error_report .= $sep . GADWP_Tools::get_cache( 'errors_count' );
1262
- $error_report .= $sep . $info;
1263
-
1264
- $error_report = urldecode( $error_report );
1265
-
1266
- $url = GADWP_ENDPOINT_URL . 'gadwp-report.php';
1267
- /* @formatter:off */
1268
- $response = wp_remote_post( $url, array(
1269
- 'method' => 'POST',
1270
- 'timeout' => 45,
1271
- 'redirection' => 5,
1272
- 'httpversion' => '1.0',
1273
- 'blocking' => true,
1274
- 'headers' => array(),
1275
- 'body' => array( 'error_report' => $error_report ),
1276
- 'cookies' => array()
1277
- )
1278
- );
1279
- }
1280
-
1281
- /* @formatter:on */
1282
- GADWP_Tools::delete_cache( 'last_error' );
1283
- GADWP_Tools::delete_cache( 'gapi_errors' );
1284
- delete_option( 'gadwp_got_updated' );
1285
- $message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "All errors reseted.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1286
- } else {
1287
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1288
- }
1289
- }
1290
- if ( isset( $_POST['options']['gadwp_hidden'] ) && ! isset( $_POST['Clear'] ) && ! isset( $_POST['Reset'] ) && ! isset( $_POST['Reset_Err'] ) ) {
1291
- $message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Settings saved.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1292
- if ( ! ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) ) {
1293
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1294
- }
1295
- }
1296
- if ( isset( $_POST['Hide'] ) ) {
1297
- if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
1298
- $message = "<div class='updated' id='gadwp-action'><p>" . __( "All other domains/properties were removed.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1299
- $lock_profile = GADWP_Tools::get_selected_profile( $gadwp->config->options['ga_profiles_list'], $gadwp->config->options['tableid_jail'] );
1300
- $gadwp->config->options['ga_profiles_list'] = array( $lock_profile );
1301
- $options = self::update_options( 'general' );
1302
- } else {
1303
- $message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
1304
- }
1305
- }
1306
- ?>
1307
- <div class="wrap">
1308
- <?php echo "<h2>" . __( "Google Analytics Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
1309
- <hr>
1310
- </div>
1311
- <div id="poststuff" class="gadwp">
1312
- <div id="post-body" class="metabox-holder columns-2">
1313
- <div id="post-body-content">
1314
- <div class="settings-wrapper">
1315
- <div class="inside">
1316
- <?php if ( $gadwp->gapi_controller->gapi_errors_handler() || GADWP_Tools::get_cache( 'last_error' ) ) : ?>
1317
- <?php $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );?>
1318
- <?php endif;?>
1319
- <?php if ( isset( $_POST['Authorize'] ) ) : ?>
1320
- <?php GADWP_Tools::clear_cache(); ?>
1321
- <?php $gadwp->gapi_controller->token_request(); ?>
1322
- <div class="updated">
1323
- <p><?php _e( "Use the red link (see below) to generate and get your access code! You need to generate a new code each time you authorize!", 'google-analytics-dashboard-for-wp' )?></p>
1324
- </div>
1325
- <?php else : ?>
1326
- <?php if ( isset( $message ) ) :?>
1327
- <?php echo $message;?>
1328
- <?php endif; ?>
1329
- <form name="gadwp_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
1330
- <input type="hidden" name="options[gadwp_hidden]" value="Y">
1331
- <?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
1332
- <table class="gadwp-settings-options">
1333
- <tr>
1334
- <td colspan="2">
1335
- <?php echo "<h2>" . __( "Plugin Authorization", 'google-analytics-dashboard-for-wp' ) . "</h2>";?>
1336
- </td>
1337
- </tr>
1338
- <tr>
1339
- <td colspan="2" class="gadwp-settings-info">
1340
- <?php printf(__('You need to create a %1$s and watch this %2$s before proceeding to authorization.', 'google-analytics-dashboard-for-wp'), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/creating-a-google-analytics-account/?utm_source=gadwp_config&utm_medium=link&utm_content=top_tutorial&utm_campaign=gadwp', __("free analytics account", 'google-analytics-dashboard-for-wp')), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=top_video&utm_campaign=gadwp', __("video tutorial", 'google-analytics-dashboard-for-wp')));?>
1341
- </td>
1342
- </tr>
1343
- <?php if (! $options['token'] || ($options['user_api'] && ! $options['network_mode'])) : ?>
1344
- <tr>
1345
- <td colspan="2" class="gadwp-settings-info">
1346
- <input name="options[user_api]" type="checkbox" id="user_api" value="1" <?php checked( $options['user_api'], 1 ); ?> onchange="this.form.submit()" <?php echo ($options['network_mode'])?'disabled="disabled"':''; ?> /><?php echo " ".__("developer mode (requires advanced API knowledge)", 'google-analytics-dashboard-for-wp' );?>
1347
- </td>
1348
- </tr>
1349
- <?php endif; ?>
1350
- <?php if ($options['user_api'] && ! $options['network_mode']) : ?>
1351
- <tr>
1352
- <td class="gadwp-settings-title">
1353
- <label for="options[client_id]"><?php _e("Client ID:", 'google-analytics-dashboard-for-wp'); ?></label>
1354
- </td>
1355
- <td>
1356
- <input type="text" name="options[client_id]" value="<?php echo esc_attr($options['client_id']); ?>" size="40" required="required">
1357
- </td>
1358
- </tr>
1359
- <tr>
1360
- <td class="gadwp-settings-title">
1361
- <label for="options[client_secret]"><?php _e("Client Secret:", 'google-analytics-dashboard-for-wp'); ?></label>
1362
- </td>
1363
- <td>
1364
- <input type="text" name="options[client_secret]" value="<?php echo esc_attr($options['client_secret']); ?>" size="40" required="required">
1365
- <input type="hidden" name="options[gadwp_hidden]" value="Y">
1366
- <?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
1367
- </td>
1368
- </tr>
1369
- <?php endif; ?>
1370
- <?php if ( $options['token'] ) : ?>
1371
- <tr>
1372
- <td colspan="2">
1373
- <input type="submit" name="Reset" class="button button-secondary" value="<?php _e( "Clear Authorization", 'google-analytics-dashboard-for-wp' ); ?>" <?php echo $options['network_mode']?'disabled="disabled"':''; ?> />
1374
- <input type="submit" name="Clear" class="button button-secondary" value="<?php _e( "Clear Cache", 'google-analytics-dashboard-for-wp' ); ?>" />
1375
- <input type="submit" name="Reset_Err" class="button button-secondary" value="<?php _e( "Report & Reset Errors", 'google-analytics-dashboard-for-wp' ); ?>" />
1376
- </td>
1377
- </tr>
1378
- <tr>
1379
- <td colspan="2">
1380
- <hr>
1381
- </td>
1382
- </tr>
1383
- <tr>
1384
- <td colspan="2"><?php echo "<h2>" . __( "General Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1385
- </tr>
1386
- <tr>
1387
- <td class="gadwp-settings-title">
1388
- <label for="tableid_jail"><?php _e("Select View:", 'google-analytics-dashboard-for-wp' ); ?></label>
1389
- </td>
1390
- <td>
1391
- <select id="tableid_jail" <?php disabled(empty($options['ga_profiles_list']) || 1 == count($options['ga_profiles_list']), true); ?> name="options[tableid_jail]">
1392
- <?php if ( ! empty( $options['ga_profiles_list'] ) ) : ?>
1393
- <?php foreach ( $options['ga_profiles_list'] as $items ) : ?>
1394
- <?php if ( $items[3] ) : ?>
1395
- <option value="<?php echo esc_attr( $items[1] ); ?>" <?php selected( $items[1], $options['tableid_jail'] ); ?> title="<?php _e( "View Name:", 'google-analytics-dashboard-for-wp' ); ?> <?php echo esc_attr( $items[0] ); ?>">
1396
- <?php echo esc_html( GADWP_Tools::strip_protocol( $items[3] ) )?> &#8658; <?php echo esc_attr( $items[0] ); ?>
1397
- </option>
1398
- <?php endif; ?>
1399
- <?php endforeach; ?>
1400
- <?php else : ?>
1401
- <option value=""><?php _e( "Property not found", 'google-analytics-dashboard-for-wp' ); ?></option>
1402
- <?php endif; ?>
1403
- </select>
1404
- <?php if ( count( $options['ga_profiles_list'] ) > 1 ) : ?>
1405
- &nbsp;<input type="submit" name="Hide" class="button button-secondary" value="<?php _e( "Lock Selection", 'google-analytics-dashboard-for-wp' ); ?>" />
1406
- <?php endif; ?>
1407
- </td>
1408
- </tr>
1409
- <?php if ( $options['tableid_jail'] ) : ?>
1410
- <tr>
1411
- <td class="gadwp-settings-title"></td>
1412
- <td>
1413
- <?php $profile_info = GADWP_Tools::get_selected_profile( $gadwp->config->options['ga_profiles_list'], $gadwp->config->options['tableid_jail'] ); ?>
1414
- <pre><?php echo __( "View Name:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[0] ) . "<br />" . __( "Tracking ID:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[2] ) . "<br />" . __( "Default URL:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[3] ) . "<br />" . __( "Time Zone:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[5] );?></pre>
1415
- </td>
1416
- </tr>
1417
- <?php endif; ?>
1418
- <tr>
1419
- <td class="gadwp-settings-title">
1420
- <label for="theme_color"><?php _e("Theme Color:", 'google-analytics-dashboard-for-wp' ); ?></label>
1421
- </td>
1422
- <td>
1423
- <input type="text" id="theme_color" class="theme_color" name="options[theme_color]" value="<?php echo esc_attr($options['theme_color']); ?>" size="10">
1424
- </td>
1425
- </tr>
1426
- <tr>
1427
- <td colspan="2">
1428
- <hr>
1429
- </td>
1430
- </tr>
1431
- <?php if ( !is_multisite()) :?>
1432
- <tr>
1433
- <td colspan="2"><?php echo "<h2>" . __( "Automatic Updates", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1434
- </tr>
1435
- <tr>
1436
- <td colspan="2" class="gadwp-settings-title">
1437
- <div class="button-primary gadwp-settings-switchoo">
1438
- <input type="checkbox" name="options[automatic_updates_minorversion]" value="1" class="gadwp-settings-switchoo-checkbox" id="automatic_updates_minorversion" <?php checked( $options['automatic_updates_minorversion'], 1 ); ?>>
1439
- <label class="gadwp-settings-switchoo-label" for="automatic_updates_minorversion">
1440
- <div class="gadwp-settings-switchoo-inner"></div>
1441
- <div class="gadwp-settings-switchoo-switch"></div>
1442
- </label>
1443
- </div>
1444
- <div class="switch-desc"><?php echo " ".__( "automatic updates for minor versions (security and maintenance releases only)", 'google-analytics-dashboard-for-wp' );?></div>
1445
- </td>
1446
- </tr>
1447
- <tr>
1448
- <td colspan="2">
1449
- <hr>
1450
- </td>
1451
- </tr>
1452
- <?php endif; ?>
1453
- <tr>
1454
- <td colspan="2" class="submit">
1455
- <input type="submit" name="Submit" class="button button-primary" value="<?php _e('Save Changes', 'google-analytics-dashboard-for-wp' ) ?>" />
1456
- </td>
1457
- </tr>
1458
- <?php else : ?>
1459
- <tr>
1460
- <td colspan="2">
1461
- <hr>
1462
- </td>
1463
- </tr>
1464
- <tr>
1465
- <td colspan="2">
1466
- <input type="submit" name="Authorize" class="button button-secondary" id="authorize" value="<?php _e( "Authorize Plugin", 'google-analytics-dashboard-for-wp' ); ?>" <?php echo $options['network_mode']?'disabled="disabled"':''; ?> />
1467
- <input type="submit" name="Clear" class="button button-secondary" value="<?php _e( "Clear Cache", 'google-analytics-dashboard-for-wp' ); ?>" />
1468
- </td>
1469
- </tr>
1470
- <tr>
1471
- <td colspan="2">
1472
- <hr>
1473
- </td>
1474
- </tr>
1475
- </table>
1476
- </form>
1477
- <?php self::output_sidebar(); ?>