Analytics - Version 1.0.0

Version Description

Download this release

Release Info

Developer tms_gac
Plugin Icon 128x128 Analytics
Version 1.0.0
Comparing to
See all releases

Code changes from version 1.2.1 to 1.0.0

analytics-code-notice.css DELETED
@@ -1,329 +0,0 @@
1
- @-webkit-keyframes fadeIt {
2
- 0% { background-color: #ffd89f; }
3
- 100% { background-color: #FFFFFF; }
4
- }
5
- @-moz-keyframes fadeIt {
6
- 0% { background-color: #ffd89f }
7
- 100% { background-color: #FFFFFF; }
8
- }
9
- @-o-keyframes fadeIt {
10
- 0% { background-color: #ffd89f }
11
- 100% { background-color: #FFFFFF; }
12
- }
13
- @keyframes fadeIt {
14
- 0% { background-color: #ffd89f }
15
- 100% { background-color: #FFFFFF; }
16
- }
17
-
18
- .acp_pro_backgroundAnimated{
19
- background-image:none !important;
20
- -webkit-animation: fadeIt 3s ease;
21
- -moz-animation: fadeIt 3s ease;
22
- -o-animation: fadeIt 3s ease;
23
- animation: fadeIt 3s ease;
24
- background-color: white !important;
25
- }
26
-
27
- .acp_notice_get_pro_btn {
28
- -moz-box-shadow:inset 0px 1px 0px 0px #9acc85;
29
- -webkit-box-shadow:inset 0px 1px 0px 0px #9acc85;
30
- box-shadow:inset 0px 1px 0px 0px #9acc85;
31
- background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #74ad5a), color-stop(1, #68a54b));
32
- background:-moz-linear-gradient(top, #74ad5a 5%, #68a54b 100%);
33
- background:-webkit-linear-gradient(top, #74ad5a 5%, #68a54b 100%);
34
- background:-o-linear-gradient(top, #74ad5a 5%, #68a54b 100%);
35
- background:-ms-linear-gradient(top, #74ad5a 5%, #68a54b 100%);
36
- background:linear-gradient(to bottom, #74ad5a 5%, #68a54b 100%);
37
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#74ad5a', endColorstr='#68a54b',GradientType=0);
38
- background-color:#74ad5a;
39
- border:1px solid #3b6e22;
40
- display:inline-block;
41
- cursor:pointer;
42
- color:#ffffff;
43
- font-family:Arial;
44
- font-size:18px;
45
- font-weight:bold;
46
- padding:10px 20px 10px 20px;
47
- text-decoration:none;
48
- border-radius: 5px;
49
- }
50
- .acp_notice_get_pro_btn:hover {
51
- background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #68a54b), color-stop(1, #74ad5a));
52
- background:-moz-linear-gradient(top, #68a54b 5%, #74ad5a 100%);
53
- background:-webkit-linear-gradient(top, #68a54b 5%, #74ad5a 100%);
54
- background:-o-linear-gradient(top, #68a54b 5%, #74ad5a 100%);
55
- background:-ms-linear-gradient(top, #68a54b 5%, #74ad5a 100%);
56
- background:linear-gradient(to bottom, #68a54b 5%, #74ad5a 100%);
57
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#68a54b', endColorstr='#74ad5a',GradientType=0);
58
- background-color:#68a54b;
59
- }
60
-
61
- .acp_notice_get_pro_btn:active {
62
- position:relative;
63
- top:1px;
64
- }
65
-
66
- #ga_tc_notice_get_pro .notice-dismiss {
67
- background-color: #ffd89f;
68
- padding-left: 20px;
69
- }
70
-
71
- #ga_tc_notice_get_pro .notice-dismiss-opened {
72
- background-color: white;
73
- }
74
-
75
-
76
- #ga_tc_notice_get_pro .notice-dismiss:before {
77
- position: inherit;
78
- margin-left: -20px;
79
-
80
- }
81
- #ga_tc_notice_get_pro .notice-dismiss:after {
82
- /*content: "close";*/
83
- /*position: relative;*/
84
- top: -4px;
85
- left: 1px;
86
- color: #4f73bc;
87
- }
88
-
89
- .acp_pro_banner {
90
- padding-left: 16px;
91
- height: 47px;
92
- /*min-width: 340px;*/
93
- overflow-y: hidden;
94
- margin-lefT: -5px;
95
- cursor: pointer;
96
- }
97
- #ga_tc_notice_get_pro {
98
- margin-left: 0px;
99
- padding-right: 0px;
100
- padding: 10px 0px 0px 0px;
101
- background-color: #ffd89f;
102
- overflow-y: hidden;
103
- height: 97px;
104
- }
105
-
106
- #ga_tc_notice_get_pro .opened {
107
- background-color: white;
108
- }
109
-
110
- .acp_pro_banner_title {
111
- font-weight: bold;
112
- font-size: 28px;
113
- font-family: "open sans",arial,sans-serif;
114
- text-shadow: 1px 1px 15px #929292;
115
- float: left;
116
- padding: 3px 10px 14px 80px;
117
- margin-right: 15px;
118
- }
119
-
120
- .acp_pro_banner_features {
121
- margin-left: 100px;
122
- }
123
-
124
- .acp_pro_banner_feature {
125
- font-size: 16px;
126
- font-family: "open sans",arial,sans-serif;
127
- text-shadow: 1px 1px 15px #929292;
128
- font-weight: bold;
129
- float: left;
130
- border-radius: 15px;
131
- margin-right: 25px;
132
- margin-top: -5px;
133
- }
134
-
135
- .acp_pro_banner_buttons, .acp_pro_banner_buttons2 {
136
- text-align: center;
137
- width: 100%;
138
- float: left;
139
- background-color: transparent;
140
- }
141
- .acp_pro_banner_buttons a, .acp_pro_banner_buttons2 a {
142
- line-height: 30px;
143
- font-weight: bold;
144
- text-decoration: none;
145
- }
146
-
147
- #acp_pro_banner_screenshots {
148
- max-width: 780px;
149
- margin-left: 20px;
150
- }
151
-
152
- #acp_pro_banner_screenshots div.screenshot {
153
- float: left;
154
- max-width: 30%;
155
- width: 130px;
156
- height: 50px;
157
- margin-right: 10px;
158
- overflow-y: hidden;
159
- margin-bottom: -1px;
160
- }
161
-
162
- #acp_pro_banner_screenshots div.screenshot_opened {
163
- background-color: white;
164
- height: 130px;
165
- overflow: hidden;
166
- margin-top: 5px;
167
- border: 2px solid #bababa;
168
- }
169
-
170
- #acp_pro_banner_screenshots div.screenshot_opened:hover {
171
- border: 2px solid gray;
172
- }
173
-
174
- #acp_pro_banner_screenshots div.screenshot_opened img {
175
- margin-top: 0px !important;
176
- }
177
-
178
- .screenshot_opened img:hover {
179
-
180
- }
181
-
182
- #acp_pro_banner_screenshots div.screenshot2 {
183
- float: left;
184
- max-width: 30%;
185
- width: 230px;
186
- max-height: 127px;
187
- margin-right: 10px;
188
- overflow-y: hidden;
189
- border: 1px solid #bdbdbd;
190
- background-color: white;
191
- }
192
-
193
-
194
- .screenshot_shadow {
195
- -webkit-box-shadow: 0 8px 8px -6px #727272;
196
- -moz-box-shadow: 0 8px 8px -6px #727272;
197
- box-shadow: 0 8px 8px -6px #727272;
198
- border-bottom: 1px solid #dbdbdb;
199
- }
200
-
201
- #acp_pro_banner_screenshots div.screenshot img {
202
- margin-top: 10px;
203
- cursor: pointer;
204
- }
205
- #acp_pro_banner_screenshots div.screenshot img:hover {
206
- margin-top: 0px;
207
- }
208
-
209
-
210
- #acp_pro_banner_enjoy {
211
- position: absolute;
212
- margin-top: -33px;
213
- margin-left: 5px;
214
- }
215
-
216
-
217
-
218
-
219
- #acp_pro_banner_list_features {
220
- display: none;
221
- /*max-width: 780px;*/
222
- background-color: white;
223
- padding: 0px 10px 60px 20px;
224
- /*margin-left: 0px;*/
225
- }
226
- #acp_pro_banner_list_features li {
227
- /*list-style-type: inherit;*/
228
- list-style-image: url("checkbox.gif");
229
- margin-left: 30px;
230
- font-size: 16px;
231
- font-family: "open sans",arial,sans-serif;
232
- }
233
-
234
- #acp_pro_banner_list_features h2 {
235
- margin-top: 5px;
236
- }
237
-
238
-
239
- .acp_pro_banner_feature_cont {
240
- margin-left: 10px;
241
- }
242
-
243
- @media only screen and (max-width: 780px) {
244
- .acp_pro_banner_feature {
245
- font-size: 13px;
246
- margin-bottom: 10px;
247
- margin-left:0px;
248
- margin-right: 15px;
249
- /*font-weight: normal;*/
250
- margin-top: -13px;
251
- }
252
- }
253
-
254
- @media only screen and (max-width: 780px) {
255
- #acp_pro_banner_enjoy {
256
- display: none;
257
- }
258
- .acp_pro_banner_title {
259
- padding-left: 0px;
260
- }
261
- }
262
-
263
-
264
- @media only screen and (max-width: 580px) {
265
- #ga_tc_notice_get_pro {
266
- padding-right: 0px;
267
- }
268
- .acp_pro_banner_title {
269
- font-size: 23px;
270
- padding: 0px 5px 15px 0px;
271
- }
272
- #ga_tc_notice_get_pro .notice-dismiss {
273
- padding-left: 0px;
274
- }
275
-
276
-
277
- #ga_tc_notice_get_pro .notice-dismiss:before {
278
- /*position: inherit;*/
279
- /*margin-left: 0px;*/
280
-
281
- }
282
- #ga_tc_notice_get_pro .notice-dismiss:after {
283
- content: "";
284
- }
285
-
286
- .acp_pro_banner_features {
287
- margin-left: 0px;
288
- }
289
- }
290
-
291
- @media only screen and (max-width: 480px) {
292
- .acp_pro_banner_title {
293
- font-size: 18px;
294
- }
295
- }
296
-
297
-
298
- @media only screen and (max-width: 440px) {
299
- .acp_pro_banner_title {
300
- padding: 0px 5px 5px 0px;
301
- line-height: 20px;
302
- }
303
- .acp_pro_banner_buttons a {
304
- line-height: 20px;
305
- }
306
-
307
- .acp_pro_banner_feature_cont {
308
- margin-left: 0px;
309
- }
310
- .acp_pro_banner_feature {
311
- margin-top: auto;
312
- }
313
-
314
- }
315
-
316
- @media only screen and (max-width: 380px) {
317
- .acp_pro_banner_features {
318
- display: none;
319
- }
320
-
321
- }
322
-
323
- @media only screen and (max-width: 280px) {
324
- #ga_tc_notice_get_pro .notice-dismiss:before {
325
- color:red;
326
- background: rgba(255, 255, 255, 0.80);
327
- }
328
-
329
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
analytics-code-notice.js DELETED
@@ -1,10 +0,0 @@
1
- jQuery( document ).ready(function() {
2
- jQuery('#ga_tc_notice_get_pro').find('button.notice-dismiss').click(function() {
3
- var data = {
4
- 'action': 'ga_tc_stop_notice_pro_get',
5
- }
6
- jQuery.post(ajaxurl, data, function (response) {
7
- });
8
-
9
- })
10
- });
 
 
 
 
 
 
 
 
 
 
analytics-code.css DELETED
@@ -1,158 +0,0 @@
1
- .acp_logo {
2
- margin-right: 10px;
3
- margin-bottom: -2px;
4
- }
5
-
6
- #ga_tc_id_options {
7
- margin-bottom: 40px;
8
- }
9
-
10
- .ga_tc_pro_chart {
11
- background-color: white;
12
- padding: 20px;
13
- border: 1px solid #e5e5e5;
14
- }
15
-
16
- .acp_get_pro h2 {
17
- font-family: "Open Sans";
18
- font-weight: bold;
19
- font-size: 35px !important;
20
- font-family: "open sans",arial,sans-serif;
21
- text-shadow: 1px 1px 15px #929292;
22
- margin-bottom: 20px;
23
- line-height: 30px;;
24
- }
25
-
26
- .acp_get_pro .slogan {
27
- font-family: "Open Sans";
28
- font-weight: bold;
29
- font-size: 14px !important;
30
- font-family: "open sans",arial,sans-serif;
31
- text-shadow: 1px 1px 5px #929292;
32
- margin-bottom: 20px;
33
- max-width: 550px;
34
- }
35
-
36
- .acp_get_pro ul {
37
- list-style-type: disc;
38
- list-style-position: inside;
39
- margin-left: 20px;
40
- margin-top: 10px;
41
- }
42
- .acp_get_pro ul ul,
43
- .acp_get_pro ol ul {
44
- list-style-type: circle;
45
- list-style-position: inside;
46
- margin-left: 15px;
47
- }
48
-
49
-
50
-
51
- .acp_get_pro_btn {
52
- -moz-box-shadow:inset 0px 1px 0px 0px #9acc85;
53
- -webkit-box-shadow:inset 0px 1px 0px 0px #9acc85;
54
- box-shadow:inset 0px 1px 0px 0px #9acc85;
55
- background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #74ad5a), color-stop(1, #68a54b));
56
- background:-moz-linear-gradient(top, #74ad5a 5%, #68a54b 100%);
57
- background:-webkit-linear-gradient(top, #74ad5a 5%, #68a54b 100%);
58
- background:-o-linear-gradient(top, #74ad5a 5%, #68a54b 100%);
59
- background:-ms-linear-gradient(top, #74ad5a 5%, #68a54b 100%);
60
- background:linear-gradient(to bottom, #74ad5a 5%, #68a54b 100%);
61
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#74ad5a', endColorstr='#68a54b',GradientType=0);
62
- background-color:#74ad5a;
63
- border:1px solid #3b6e22;
64
- display:inline-block;
65
- cursor:pointer;
66
- color:#ffffff;
67
- font-family:Arial;
68
- font-size:18px;
69
- font-weight:bold;
70
- padding:10px 20px 10px 20px;
71
- text-decoration:none;
72
- border-radius: 5px;
73
- }
74
- .acp_get_pro_btn:hover {
75
- background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #68a54b), color-stop(1, #74ad5a));
76
- background:-moz-linear-gradient(top, #68a54b 5%, #74ad5a 100%);
77
- background:-webkit-linear-gradient(top, #68a54b 5%, #74ad5a 100%);
78
- background:-o-linear-gradient(top, #68a54b 5%, #74ad5a 100%);
79
- background:-ms-linear-gradient(top, #68a54b 5%, #74ad5a 100%);
80
- background:linear-gradient(to bottom, #68a54b 5%, #74ad5a 100%);
81
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#68a54b', endColorstr='#74ad5a',GradientType=0);
82
- background-color:#68a54b;
83
- }
84
-
85
- .acp_get_pro_btn:active {
86
- position:relative;
87
- top:1px;
88
- }
89
-
90
- .acp_get_pro .info {
91
- float: left;
92
- margin-right: 40px;
93
- }
94
-
95
- .acp_purchased p{
96
- font-size: 16px !important;
97
- }
98
-
99
-
100
- #acp_pro_description {
101
- font-size: 16px;
102
- margin-top: 10px;
103
- max-width: 550px;
104
- /*float:left;*/
105
- }
106
-
107
- #acp_pro_description li{
108
- list-style-image: url("check_small.png");
109
- margin-left: 40px;
110
- font-size: 16px;
111
- font-family: "open sans",arial,sans-serif;
112
- list-style-position: outside;
113
- line-height: 20px;
114
- }
115
-
116
-
117
- .ga_tc_pro_chart {
118
- display: table-cell;
119
- }
120
-
121
- .info {
122
- min-width: 600px;
123
- }
124
-
125
-
126
- .acp_pro_button {
127
- max-width: 550px;
128
- text-align: center;
129
- }
130
-
131
-
132
- @media only screen and (max-width: 750px) {
133
- .ga_tc_pro_chart {
134
- }
135
-
136
- #acp_get_pro_btn {
137
- margin-top: 0px !important;
138
- }
139
-
140
- .info {
141
- min-width: auto;
142
- }
143
-
144
-
145
- }
146
-
147
- @media only screen and (max-width: 400px) {
148
- #acp_pro_description li{
149
- margin-left: 5px;
150
- margin-right: 5px;
151
- }
152
- #acp_pro_banner_screenshots div.screenshot_opened {
153
- height: 80px;
154
- }
155
-
156
-
157
- }
158
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
analytics-code.php CHANGED
@@ -2,94 +2,18 @@
2
  /*
3
  Plugin Name: Analytics Code Integration
4
  Description: Easy integrate the Google Analytics Code on any WordPress website.
5
- Version: 1.2.1
6
  License: GPLv2 or later
7
- Domain Path: /languages
8
- Text Domain: analytics-code
9
  Author: tms_gac
10
  */
11
 
12
  define("GA_TC_TITLE", 'Google Analytics Code');
13
  define("GA_TC_PLUGIN_NAME", basename(dirname(__FILE__)));
14
  define("GA_TC_MENU_PREFIX", 'ga_tc_');
15
- define("GA_TC_SERVER", 'http://www.toolsanalytics.com');
16
 
17
  add_action('admin_menu', 'ga_tc_action_add_menu');
18
 
19
- $ga_tc_code = get_option('ga_tc_code', '');
20
- $ga_tc_id = get_option( 'ga_tc_id', '' );
21
- $ga_tc_place = get_option( 'ga_tc_place', false);
22
-
23
- if (!$ga_tc_place) {
24
- if (empty($ga_tc_code) && empty($ga_tc_id)) {
25
- $ga_tc_place = 'head';
26
- } else {
27
- $ga_tc_place = 'footer';
28
- }
29
- }
30
-
31
-
32
- if ($ga_tc_place == 'footer') {
33
- add_action('wp_footer', 'ga_tc_insert_code');
34
- } else {
35
- add_action('wp_head', 'ga_tc_insert_code');
36
- }
37
-
38
-
39
-
40
- add_action('wp_ajax_ga_tc_stop_notice_pro_get', 'ga_tc_stop_notice_pro_get');
41
-
42
- $v = get_option('ga_tc_stop_notice_pro_get', 0);
43
- if( $v != ga_tc_get_plugin_version() && !get_option('ga_tc_pro')) {
44
- add_action( 'admin_notices', 'ga_tc_notice_pro_get' );
45
- }
46
-
47
- if(get_option('ga_tc_pro')) {
48
- add_action( 'admin_notices', 'ga_tc_notice_pro_update' );
49
- }
50
-
51
- function ga_tc_load_scripts() {
52
- wp_register_style( 'analytics-code-notice', plugins_url('analytics-code-notice.css' , __FILE__) );
53
- wp_enqueue_style( 'analytics-code-notice' );
54
-
55
- wp_register_script( 'analytics-code-notice', plugins_url('analytics-code-notice.js' , __FILE__) );
56
- wp_enqueue_script( 'analytics-code-notice' );
57
-
58
- wp_register_style( 'responsive-lightbox', plugins_url('assets/responsive-lightbox/jquery.lightbox.min.css' , __FILE__) );
59
- wp_enqueue_style( 'responsive-lightbox' );
60
-
61
- wp_register_script( 'responsive-lightbox', plugins_url('assets/responsive-lightbox/jquery.lightbox.min.js' , __FILE__) );
62
- wp_enqueue_script( 'responsive-lightbox' );
63
- }
64
-
65
- function ga_tc_notice_pro_get() {
66
- ga_tc_load_scripts();
67
- require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'notice_pro_get.php';
68
- }
69
-
70
- function ga_tc_notice_pro_update() {
71
- wp_register_style( 'analytics-code-notice', plugins_url('analytics-code-notice.css' , __FILE__) );
72
- wp_enqueue_style( 'analytics-code-notice' );
73
-
74
- wp_register_script( 'analytics-code-notice', plugins_url('analytics-code-notice.js' , __FILE__) );
75
- wp_enqueue_script( 'analytics-code-notice' );
76
-
77
- require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'notice_pro_update.php';
78
- }
79
-
80
- function ga_tc_stop_notice_pro_get() {
81
- $version = ga_tc_get_plugin_version();
82
- update_option('ga_tc_stop_notice_pro_get', $version);
83
- }
84
-
85
-
86
- function ga_tc_get_plugin_version() {
87
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
88
- $slug = 'analytics-code/analytics-code.php';
89
- $plugins = get_plugins();
90
- $info = $plugins[$slug];
91
- return $info['Version'];
92
- }
93
 
94
  if(!function_exists('ga_tc_action_add_menu')) {
95
  function ga_tc_action_add_menu() {
@@ -106,21 +30,12 @@ if(!function_exists('ga_tc_action_add_menu')) {
106
 
107
  if(!function_exists('ga_tc_pageOptions')) {
108
  function ga_tc_pageOptions() {
109
-
110
- wp_register_style( 'analytics-code', plugins_url('analytics-code.css' , __FILE__) );
111
- wp_enqueue_style( 'analytics-code' );
112
-
113
- wp_register_style( 'analytics-code-fonts', '//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|Slabo+27px' );
114
- wp_enqueue_style( 'analytics-code-fonts' );
115
-
116
- ga_tc_load_scripts();
117
-
118
  require 'page_options.php';
119
  }
120
  }
121
 
122
- if(!function_exists('ga_tc_insert_code')) {
123
- function ga_tc_insert_code() {
124
  $ga_tc_type = get_option( 'ga_tc_type', 'id' );
125
  $ga_tc_code = get_option('ga_tc_code', '');
126
  $ga_tc_id = get_option( 'ga_tc_id', '' );
@@ -137,24 +52,3 @@ if(!function_exists('ga_tc_insert_code')) {
137
  }
138
  }
139
 
140
-
141
-
142
- if (get_option('ga_tc_pro')) {
143
- add_action( 'init', 'ga_tc_activate_au' );
144
- function ga_tc_activate_au()
145
- {
146
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
147
- $my_plugin = str_replace('.php', '', basename(__FILE__));
148
- $plugins = get_plugins('/' . $my_plugin);
149
- $info = $plugins[basename(__FILE__)];
150
-
151
- require_once ( dirname(__FILE__) . DIRECTORY_SEPARATOR . 'update.php' );
152
- $plugin_current_version = $info['Version'];
153
- $plugin_remote_path = GA_TC_SERVER . '/api/';
154
- $plugin_slug = plugin_basename( __FILE__ );
155
- new ga_tc_update($plugin_current_version, $plugin_remote_path, $plugin_slug);
156
- }
157
-
158
-
159
-
160
- }
2
  /*
3
  Plugin Name: Analytics Code Integration
4
  Description: Easy integrate the Google Analytics Code on any WordPress website.
5
+ Version: 1.0
6
  License: GPLv2 or later
 
 
7
  Author: tms_gac
8
  */
9
 
10
  define("GA_TC_TITLE", 'Google Analytics Code');
11
  define("GA_TC_PLUGIN_NAME", basename(dirname(__FILE__)));
12
  define("GA_TC_MENU_PREFIX", 'ga_tc_');
 
13
 
14
  add_action('admin_menu', 'ga_tc_action_add_menu');
15
 
16
+ add_action('wp_footer', 'ga_tc_insert_code');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  if(!function_exists('ga_tc_action_add_menu')) {
19
  function ga_tc_action_add_menu() {
30
 
31
  if(!function_exists('ga_tc_pageOptions')) {
32
  function ga_tc_pageOptions() {
 
 
 
 
 
 
 
 
 
33
  require 'page_options.php';
34
  }
35
  }
36
 
37
+ if(!function_exists('ga_tc_action_wp_footer')) {
38
+ function ga_tc_action_wp_footer() {
39
  $ga_tc_type = get_option( 'ga_tc_type', 'id' );
40
  $ga_tc_code = get_option('ga_tc_code', '');
41
  $ga_tc_id = get_option( 'ga_tc_id', '' );
52
  }
53
  }
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/responsive-lightbox/close.png DELETED
Binary file
assets/responsive-lightbox/jquery.lightbox.min.css DELETED
@@ -1 +0,0 @@
1
- .lightbox{cursor:pointer;position:fixed;width:100%;height:100%;top:0;left:0;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIElEQVQ4T2NkYGDYDMRkA8ZRAxhGw4BhNAyA+WAYpAMAIFgLQfO9BoEAAAAASUVORK5CYII=);background:rgba(0,0,0,.7);-webkit-filter:none!important;z-index:9997}.lightbox img{display:block;position:absolute;border:5px solid #fff;box-shadow:0 0 20px #000;border-radius:1px}body.blurred>*{-webkit-filter:blur(2px);-webkit-transform:translate3d(0,0,0)}.lightbox__loading{background:url(loading.gif) center center no-repeat;width:32px;height:32px;margin:-16px 0 0 -16px;position:absolute;top:50%;left:50%}.lightbox__caption{display:none;position:absolute;left:0;bottom:0;width:100%;text-align:center;z-index:9998;background:#000;background:rgba(0,0,0,.7)}.lightbox__caption p{margin:0 auto;max-width:70%;display:inline-block;padding:10px;color:#fff;font-size:12px;line-height:18px}.lightbox__button{position:absolute;z-index:9999;background:center center no-repeat;width:32px;height:32px;opacity:.4;-webkit-transition:all .3s;-moz-transition:all .3s;-ms-transition:all .3s;transition:all .3s}.lightbox__button:focus,.lightbox__button:hover{opacity:1;-webkit-transform:scale(1.4);-moz-transform:scale(1.4);-ms-transform:scale(1.4);transform:scale(1.4)}.lightbox__close{right:10px;top:10px;background-image:url(close.png)}.lightbox__nav{top:50%;margin-top:-16px}.lightbox__nav--next{right:10px;background-image:url(next.png)}.lightbox__nav--prev{left:10px;background-image:url(previous.png)}
 
assets/responsive-lightbox/jquery.lightbox.min.js DELETED
@@ -1,13 +0,0 @@
1
- /*!
2
- * jquery.lightbox.js v1.3
3
- * https://github.com/duncanmcdougall/Responsive-Lightbox
4
- * Copyright 2015 Duncan McDougall and other contributors; @license Creative Commons Attribution 2.5
5
- *
6
- * Options:
7
- * margin - int - default 50. Minimum margin around the image
8
- * nav - bool - default true. enable navigation
9
- * blur - bool - default true. Blur other content when open using css filter
10
- * minSize - int - default 0. Min window width or height to open lightbox. Below threshold will open image in a new tab.
11
- *
12
- */
13
- !function(a){"use strict";a.fn.lightbox=function(b){var c={margin:50,nav:!0,blur:!0,minSize:0},d={items:[],lightbox:null,image:null,current:null,locked:!1,caption:null,init:function(b){d.items=b;var e="lightbox-"+Math.floor(1e5*Math.random()+1);a("body").append('<div id="'+e+'" class="lightbox" style="display:none;"><a href="#" class="lightbox__close lightbox__button"></a><a href="#" class="lightbox__nav lightbox__nav--prev lightbox__button"></a><a href="#" class="lightbox__nav lightbox__nav--next lightbox__button"></a><div href="#" class="lightbox__caption"><p></p></div></div>'),d.lightbox=a("#"+e),d.caption=a(".lightbox__caption",d.lightbox),d.items.length>1&&c.nav?a(".lightbox__nav",d.lightbox).show():a(".lightbox__nav",d.lightbox).hide(),d.bindEvents()},loadImage:function(){c.blur&&a("body").addClass("blurred"),a("img",d.lightbox).remove(),d.lightbox.fadeIn("fast").append('<span class="lightbox__loading"></span>');var b=a('<img src="'+a(d.current).attr("href")+'" draggable="false">');a(b).on("load",function(){a(".lightbox__loading").remove(),d.lightbox.append(b),d.image=a("img",d.lightbox).hide(),d.resizeImage(),d.setCaption()})},setCaption:function(){var b=a(d.current).data("caption");b&&b.length>0?(d.caption.fadeIn(),a("p",d.caption).text(b)):d.caption.hide()},resizeImage:function(){var b,e,f,g,h;e=a(window).height()-c.margin,f=a(window).outerWidth(!0)-c.margin,d.image.width("").height(""),g=d.image.height(),h=d.image.width(),h>f&&(b=f/h,h=f,g=Math.round(g*b)),g>e&&(b=e/g,g=e,h=Math.round(h*b)),d.image.width(h).height(g).css({top:(a(window).height()-d.image.outerHeight())/2+"px",left:(a(window).width()-d.image.outerWidth())/2+"px"}).show(),d.locked=!1},getCurrentIndex:function(){return a.inArray(d.current,d.items)},next:function(){return d.locked?!1:(d.locked=!0,void(d.getCurrentIndex()>=d.items.length-1?a(d.items[0]).click():a(d.items[d.getCurrentIndex()+1]).click()))},previous:function(){return d.locked?!1:(d.locked=!0,void(d.getCurrentIndex()<=0?a(d.items[d.items.length-1]).click():a(d.items[d.getCurrentIndex()-1]).click()))},bindEvents:function(){a(d.items).click(function(b){if(!d.lightbox.is(":visible")&&(a(window).width()<c.minSize||a(window).height()<c.minSize))return void a(this).attr("target","_blank");var e=a(this)[0];b.preventDefault(),d.current=e,d.loadImage(),a(document).on("keydown",function(a){27===a.keyCode&&d.close(),39===a.keyCode&&d.next(),37===a.keyCode&&d.previous()})}),d.lightbox.on("click",function(a){this===a.target&&d.close()}),a(d.lightbox).on("click",".lightbox__nav--prev",function(){return d.previous(),!1}),a(d.lightbox).on("click",".lightbox__nav--next",function(){return d.next(),!1}),a(d.lightbox).on("click",".lightbox__close",function(){return d.close(),!1}),a(window).resize(function(){d.image&&d.resizeImage()})},close:function(){a(document).off("keydown"),a(d.lightbox).fadeOut("fast"),a("body").removeClass("blurred")}};a.extend(c,b),d.init(this)}}(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/responsive-lightbox/loading.gif DELETED
Binary file
assets/responsive-lightbox/next.png DELETED
Binary file
assets/responsive-lightbox/previous.png DELETED
Binary file
assets/screenshots/1.png DELETED
Binary file
assets/screenshots/2.png DELETED
Binary file
assets/screenshots/3.png DELETED
Binary file
assets/screenshots/4.png DELETED
Binary file
assets/screenshots/5.png DELETED
Binary file
check_small.png DELETED
Binary file
checkbox.gif DELETED
Binary file
down.png DELETED
Binary file
enjoy.png DELETED
Binary file
logo-18x18_transparent.png DELETED
Binary file
logo-24x24_transparent.png DELETED
Binary file
notice_pro_get.php DELETED
@@ -1,115 +0,0 @@
1
- <?php
2
- if(strpos($_SERVER['QUERY_STRING'], 'ga_tc_settings')) {
3
- return;
4
- }
5
-
6
- ?>
7
- <style type="text/css">
8
- #ga_tc_notice_get_pro .notice-dismiss:after {
9
- content: "<?php _e('Close'); ?>";
10
- }
11
-
12
- </style>
13
-
14
- <div class="notice notice-info is-dismissible" id="ga_tc_notice_get_pro">
15
- <div style="float:left" class="acp_pro_banner" onclick="acp_pro_banner_show_description();">
16
- <div class="acp_pro_banner_title" style="float: left">
17
- <?php _e( 'Google Analytics Professional&nbsp;plugin', 'analytics-code'); ?>
18
- </div>
19
- <div style="clear: both;"></div>
20
- <div class="acp_pro_banner_features">
21
- <div class="acp_pro_banner_feature">
22
- Analytics/Statistics
23
- </div>
24
- <div class="acp_pro_banner_feature">
25
- Data exports
26
- </div>
27
- <div class="acp_pro_banner_feature">
28
- White-label reports
29
- </div>
30
- </div>
31
- </div>
32
-
33
- <div style="clear: both;"></div>
34
-
35
- <?php require dirname(__FILE__) . DIRECTORY_SEPARATOR . "notice_pro_screenshots.php"; ?>
36
-
37
-
38
-
39
- <div style="clear: both"></div>
40
-
41
-
42
-
43
- <div id="acp_pro_banner_list_features">
44
-
45
- <div style="margin-top: 10px; margin-bottom: 10px;">
46
-
47
- <form method="post" action="<?php echo GA_TC_SERVER . '/billing/getPro';?>">
48
-
49
- <input type="hidden" name="user_email" value="<?php echo get_option('admin_email'); ?>">
50
- <input type="hidden" name="user_site" value="<?php echo home_url(); ?>">
51
- <input type="hidden" name="refer" value="<?php echo 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . rtrim($_SERVER['HTTP_HOST'], '/')."/" . ltrim($_SERVER['REQUEST_URI'], '/'); ?>">
52
-
53
- <div class="acp_pro_banner_buttons2">
54
- <input type="submit" class="acp_notice_get_pro_btn" value="Get PRO" style="margin-left: 20px;">
55
- <a href="javascript:void(0)" style="visibility: hidden; margin: 20px 0px 0px 10px;" onclick="acp_pro_banner_hide_description()">Hide&nbsp;details <img style="margin-bottom: -5px;" src="<?php echo plugins_url('up.png', __FILE__); ?>"></a>
56
- </div>
57
- </form>
58
-
59
- </div>
60
-
61
- <div style="clear: both"></div>
62
-
63
- <h2>Make available many professional things in your own Google Analytics like: data tables, line/pie charts, reports, exports of data and much more...</h2>
64
-
65
-
66
- <?php require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pro_features.php'; ?>
67
- <div style="text-align: center; width: 100%">
68
- <form method="post" action="<?php echo GA_TC_SERVER . '/billing/getPro';?>">
69
-
70
- <input type="hidden" name="user_email" value="<?php echo get_option('admin_email'); ?>">
71
- <input type="hidden" name="user_site" value="<?php echo home_url(); ?>">
72
- <input type="hidden" name="refer" value="<?php echo 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . rtrim($_SERVER['HTTP_HOST'], '/')."/" . ltrim($_SERVER['REQUEST_URI'], '/'); ?>">
73
-
74
- <div class="acp_pro_banner_buttons2">
75
- <input type="submit" class="acp_notice_get_pro_btn" value="Get PRO" style="margin-left: 20px;">
76
- <a href="javascript:void(0)" style="; margin: 20px 0px 0px 10px;" onclick="acp_pro_banner_hide_description()">Hide&nbsp;details <img style="margin-bottom: -5px;" src="<?php echo plugins_url('up.png', __FILE__); ?>"></a>
77
- </div>
78
- </form>
79
- </div>
80
- </div>
81
- </div>
82
-
83
- <script >
84
- function acp_pro_banner_show_description() {
85
- jQuery('#acp_pro_banner_list_features').show('slow');
86
- jQuery('.acp_pro_banner_buttons').hide('slow');
87
-
88
- jQuery('#ga_tc_notice_get_pro').css('overflow-y', 'none');
89
- jQuery('#ga_tc_notice_get_pro').css('height', 'auto');
90
-
91
- jQuery('#acp_pro_banner_screenshots div.screenshot').addClass("screenshot_opened");
92
-
93
- jQuery('.screenshot a').attr('href', jQuery('.screenshot a').attr('data-href'));
94
-
95
- jQuery('#acp_pro_banner_screenshots a').lightbox();
96
-
97
- jQuery('#ga_tc_notice_get_pro').addClass('acp_pro_backgroundAnimated');
98
- jQuery('#ga_tc_notice_get_pro .notice-dismiss').addClass('acp_pro_backgroundAnimated');
99
-
100
-
101
- }
102
-
103
- function acp_pro_banner_hide_description() {
104
- jQuery('#acp_pro_banner_list_features').hide('slow');
105
- jQuery('.acp_pro_banner_buttons').show('s8low');
106
- jQuery('#ga_tc_notice_get_pro').css('overflow-y', 'hidden');
107
- jQuery('#ga_tc_notice_get_pro').css('height', '97px');
108
-
109
- jQuery('#acp_pro_banner_screenshots div.screenshot').removeClass("screenshot_opened");
110
- jQuery('#ga_tc_notice_get_pro').addClass('acp_pro_backgroundAnimated');
111
- jQuery('#ga_tc_notice_get_pro .notice-dismiss').addClass('acp_pro_backgroundAnimated');
112
-
113
- }
114
-
115
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
notice_pro_screenshots.php DELETED
@@ -1,18 +0,0 @@
1
- <img src="<?php echo plugins_url("enjoy.png", __FILE__); ?>" id="acp_pro_banner_enjoy" style="cursor: pointer;" onclick="acp_pro_banner_show_description()">
2
- <div id="acp_pro_banner_screenshots">
3
-
4
- <?php
5
- $screenshots = array(
6
- plugins_url("assets/screenshots/1.png", __FILE__),
7
- plugins_url("assets/screenshots/2.png", __FILE__),
8
- plugins_url("assets/screenshots/3.png", __FILE__),
9
- plugins_url("assets/screenshots/4.png", __FILE__),
10
- plugins_url("assets/screenshots/5.png", __FILE__),
11
- );
12
-
13
- foreach($screenshots as $s): ?>
14
- <div class="screenshot"><a href="<?php echo $s; ?>" onclick="acp_pro_banner_show_description(); return false;"><img src="<?php echo $s; ?>" style="width: 100%"></a></div>
15
- <?php endforeach; ?>
16
-
17
- </div>
18
- <div style="clear: both"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
notice_pro_screenshots2.php DELETED
@@ -1,32 +0,0 @@
1
- <div id="acp_pro_banner_screenshots">
2
-
3
- <?php
4
- $screenshots = array(
5
- plugins_url("assets/screenshots/1.png", __FILE__),
6
- plugins_url("assets/screenshots/3.png", __FILE__),
7
- plugins_url("assets/screenshots/4.png", __FILE__),
8
- plugins_url("assets/screenshots/5.png", __FILE__),
9
- );
10
- foreach($screenshots as $s):?>
11
- <div class="screenshot screenshot_opened"><a href="<?php echo $s; ?>" onclick="acp_pro_banner_show_description()"><img src="<?php echo $s; ?>" style="width: 100%"></a></div>
12
- <?php endforeach;?>
13
-
14
- <?php
15
- $screenshots = array(
16
- plugins_url("assets/screenshots/2.png", __FILE__),
17
-
18
- );
19
- foreach($screenshots as $s):?>
20
- <div class="screenshot2" style="display: none"><a href="<?php echo $s; ?>" onclick="acp_pro_banner_show_description()"><img src="<?php echo $s; ?>" style="width: 100%"></a></div>
21
- <?php endforeach;?>
22
-
23
- </div>
24
- <div style="clear: both"></div>
25
-
26
-
27
- <script>
28
-
29
- jQuery( document ).ready(function($) {
30
- $('#acp_pro_banner_screenshots a').lightbox();
31
- });
32
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
notice_pro_update.php DELETED
@@ -1,12 +0,0 @@
1
- <div class="notice notice-success is-dismissible" id="ga_tc_notice_get_pro">
2
- <div style="float:left">
3
- <p>
4
- <?php
5
- echo '<b>' . __( 'Professional version of Google Analytics Code plugin was purchased successfully!') . '</b><br>';
6
- echo '<a href="'.admin_url('options-general.php?page=ga_tc_settings&description') . '" style="margin-left: 10px;">[ show description ]</a>';
7
- ?>
8
- </p>
9
- </div>
10
-
11
- <div style="clear: both"></div>
12
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
page_options.php CHANGED
@@ -9,16 +9,6 @@
9
  $ga_tc_type = get_option( 'ga_tc_type', 'id' );
10
 
11
 
12
- $ga_tc_place = get_option( 'ga_tc_place', false);
13
- if (!$ga_tc_place) {
14
- if (empty($ga_tc_code) && empty($ga_tc_id)) {
15
- $ga_tc_place = 'head';
16
- } else {
17
- $ga_tc_place = 'footer';
18
- }
19
- }
20
-
21
-
22
  if((mb_strtolower($_SERVER['REQUEST_METHOD']) == 'post')) {
23
  check_admin_referer( GA_TC_PLUGIN_NAME );
24
  }
@@ -28,21 +18,17 @@
28
  update_option( 'ga_tc_id', '' );
29
  update_option( 'ga_tc_code', '' );
30
  update_option( 'ga_tc_type', 'id' );
31
- update_option( 'ga_tc_place', 'head' );
32
  $ga_tc_deactivated = true;;
33
  }
34
 
35
 
36
  if (isset($_POST['ga_tc_submit_id']) && isset( $_POST['ga_tc_id'] )) {
37
  $ga_tc_id = trim(filter_input( INPUT_POST, 'ga_tc_id', FILTER_SANITIZE_STRING ));
38
- $ga_tc_place = trim(filter_input( INPUT_POST, 'ga_tc_place', FILTER_SANITIZE_STRING ));
39
- $ga_tc_place = ($ga_tc_place == 'footer') ? 'footer' : 'header';
40
  $ga_tc_type = 'id';
41
 
42
  if (empty($ga_tc_id) || preg_match( "/^UA\-[0-9]+\-[0-9]+$/i", $ga_tc_id)) {
43
  update_option('ga_tc_id', $ga_tc_id);
44
  update_option('ga_tc_type', 'id');
45
- update_option('ga_tc_place', $ga_tc_place);
46
  if (empty($ga_tc_id)) {
47
  $ga_tc_deactivated = true;
48
  } else {
@@ -56,16 +42,12 @@
56
  if (isset($_POST['ga_tc_submit_code']) && isset($_POST['ga_tc_code'])) {
57
  $ga_tc_code = trim((strval($_POST['ga_tc_code'])));
58
 
59
- $ga_tc_place = trim(filter_input( INPUT_POST, 'ga_tc_place', FILTER_SANITIZE_STRING ));
60
- $ga_tc_place = ($ga_tc_place == 'footer') ? 'footer' : 'header';
61
-
62
  $regex = "/^\<script(.*?)?\>(.|\\n)*?\<\/script\>$/i";
63
  $ga_tc_type = 'code';
64
 
65
  if (empty($ga_tc_code) || preg_match( $regex, $ga_tc_code)) {
66
  update_option('ga_tc_code', $ga_tc_code);
67
  update_option('ga_tc_type', 'code');
68
- update_option('ga_tc_place', $ga_tc_place);
69
 
70
  if (empty($ga_tc_code)) {
71
  $ga_tc_deactivated = true;
@@ -79,8 +61,9 @@
79
 
80
  ?>
81
 
82
- <h1><img class="acp_logo" src="<?php echo plugins_url("logo-24x24_transparent.png", __FILE__); ?>"><?php echo GA_TC_TITLE; ?></h1>
83
- <div class="postbox-container" style="float:left; margin-right: 30px;">
 
84
  <?php if($ga_tc_activated): ?>
85
  <div id="message" class="updated notice" style="margin-left: 0px; margin-right: 0px; background-color: #d6ffcb">
86
  <p>Google analitycs tracking code <strong>activated</strong>.</p>
@@ -102,25 +85,12 @@
102
  <div id="ga_tc_id_options" <?php if ($ga_tc_type == 'code') {echo 'style="display: none"';}?>>
103
  <div class="postbox">
104
  <div style="padding-left: 10px; border-bottom: 1px solid #e5e5e5">
105
-
106
  <h2>Automatically generate Google Analytics Code</h2>
107
  </div>
108
  <div style="padding: 10px;">
109
  <form method="post">
110
  <?php wp_nonce_field( GA_TC_PLUGIN_NAME ); ?>
111
  <table>
112
- <tr>
113
- <td style="text-align: right">
114
- <b>Please, select the place to insert the code:</b>
115
- </td>
116
- <td>
117
- <select style="width: 100%;" name="ga_tc_place">
118
- <option value="head">Page header (recommended)</option>
119
- <option value="footer" <?php if($ga_tc_place == 'footer'){echo 'selected';} ?>>Page footer</option>
120
- </select>
121
-
122
- </td>
123
- </tr>
124
  <tr>
125
  <td>
126
  <b>Please, past your Google Analytics Tracking ID here:</b>
@@ -145,33 +115,20 @@
145
  </div>
146
  </div>
147
 
148
- <a href="javascript: void(0)" onclick="ga_tc_showSettings('code')" style="margin-left: 15px; font-weight: bold;">Manually past Google Analytics Code</a>
149
  </div>
150
 
151
  <div id="ga_tc_code_options" <?php if ($ga_tc_type == 'id') {echo 'style="display: none"';}?>>
152
  <div class="postbox">
153
  <div style="padding-left: 10px; border-bottom: 1px solid #e5e5e5">
154
- <h2>Manually paste Google Analytics Code</h2>
155
  </div>
156
  <div style="padding: 10px;">
157
  <form method="post">
158
  <?php wp_nonce_field( GA_TC_PLUGIN_NAME ); ?>
159
  <table>
160
- <tr>
161
- <td style="width: 50px; white-space: nowrap">
162
- <b>Please, select the place to insert the code:</b>
163
- </td>
164
- <td>
165
- <select style="width: 100%;" name="ga_tc_place">
166
- <option value="head">Page header (recommended)</option>
167
- <option value="footer" <?php if($ga_tc_place == 'footer'){echo 'selected';} ?>>Page footer</option>
168
- </select>
169
-
170
- </td>
171
- </tr>
172
-
173
  <tr>
174
- <td colspan="2" style="padding-top:10px;"><b>Please, past your Google Analytics code here:</b></td>
175
  </tr>
176
  <tr>
177
  <td colspan="2">
@@ -191,7 +148,7 @@
191
  </td>
192
  </tr>
193
  <tr>
194
- <td colspan="2">
195
  <p>More information about tracking code you can read on <a href="https://support.google.com/analytics/answer/1008080">Google Analytics support</a> pages.</p>
196
  If you have not yet created a google analytics account for this site, <a href='https://analytics.google.com/analytics/web/#management/Settings//%3Fm.page%3DNewAccount/' class='btn btn-xs btn-success'>create it</a>.
197
  </td>
@@ -201,16 +158,10 @@
201
  </div>
202
  </div>
203
 
204
- <a href="javascript: void(0)" onclick="ga_tc_showSettings('id')" style="margin-left: 15px; font-weight: bold;">Automatically generate Google Analytics Code</a>
205
  </div>
206
  </div>
207
 
208
- <!--<div style="clear: both"></div>-->
209
- <div class="acp_pro_container">
210
- <?php require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pro.php'; ?>
211
- </div>
212
-
213
-
214
  <script type="text/javascript">
215
  function ga_tc_showSettings(type) {
216
  if (type == 'id') {
9
  $ga_tc_type = get_option( 'ga_tc_type', 'id' );
10
 
11
 
 
 
 
 
 
 
 
 
 
 
12
  if((mb_strtolower($_SERVER['REQUEST_METHOD']) == 'post')) {
13
  check_admin_referer( GA_TC_PLUGIN_NAME );
14
  }
18
  update_option( 'ga_tc_id', '' );
19
  update_option( 'ga_tc_code', '' );
20
  update_option( 'ga_tc_type', 'id' );
 
21
  $ga_tc_deactivated = true;;
22
  }
23
 
24
 
25
  if (isset($_POST['ga_tc_submit_id']) && isset( $_POST['ga_tc_id'] )) {
26
  $ga_tc_id = trim(filter_input( INPUT_POST, 'ga_tc_id', FILTER_SANITIZE_STRING ));
 
 
27
  $ga_tc_type = 'id';
28
 
29
  if (empty($ga_tc_id) || preg_match( "/^UA\-[0-9]+\-[0-9]+$/i", $ga_tc_id)) {
30
  update_option('ga_tc_id', $ga_tc_id);
31
  update_option('ga_tc_type', 'id');
 
32
  if (empty($ga_tc_id)) {
33
  $ga_tc_deactivated = true;
34
  } else {
42
  if (isset($_POST['ga_tc_submit_code']) && isset($_POST['ga_tc_code'])) {
43
  $ga_tc_code = trim((strval($_POST['ga_tc_code'])));
44
 
 
 
 
45
  $regex = "/^\<script(.*?)?\>(.|\\n)*?\<\/script\>$/i";
46
  $ga_tc_type = 'code';
47
 
48
  if (empty($ga_tc_code) || preg_match( $regex, $ga_tc_code)) {
49
  update_option('ga_tc_code', $ga_tc_code);
50
  update_option('ga_tc_type', 'code');
 
51
 
52
  if (empty($ga_tc_code)) {
53
  $ga_tc_deactivated = true;
61
 
62
  ?>
63
 
64
+ <div class="postbox-container">
65
+ <h1><?php echo GA_TC_TITLE; ?></h1>
66
+
67
  <?php if($ga_tc_activated): ?>
68
  <div id="message" class="updated notice" style="margin-left: 0px; margin-right: 0px; background-color: #d6ffcb">
69
  <p>Google analitycs tracking code <strong>activated</strong>.</p>
85
  <div id="ga_tc_id_options" <?php if ($ga_tc_type == 'code') {echo 'style="display: none"';}?>>
86
  <div class="postbox">
87
  <div style="padding-left: 10px; border-bottom: 1px solid #e5e5e5">
 
88
  <h2>Automatically generate Google Analytics Code</h2>
89
  </div>
90
  <div style="padding: 10px;">
91
  <form method="post">
92
  <?php wp_nonce_field( GA_TC_PLUGIN_NAME ); ?>
93
  <table>
 
 
 
 
 
 
 
 
 
 
 
 
94
  <tr>
95
  <td>
96
  <b>Please, past your Google Analytics Tracking ID here:</b>
115
  </div>
116
  </div>
117
 
118
+ <a href="javascript: void(0)" onclick="ga_tc_showSettings('code')" style="margin-left: 15px;">Manually past Google Analytics Code</a>
119
  </div>
120
 
121
  <div id="ga_tc_code_options" <?php if ($ga_tc_type == 'id') {echo 'style="display: none"';}?>>
122
  <div class="postbox">
123
  <div style="padding-left: 10px; border-bottom: 1px solid #e5e5e5">
124
+ <h2>Manually past Google Analytics Code</h2>
125
  </div>
126
  <div style="padding: 10px;">
127
  <form method="post">
128
  <?php wp_nonce_field( GA_TC_PLUGIN_NAME ); ?>
129
  <table>
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  <tr>
131
+ <td colspan="2"><b>Please, past your Google Analytics code here:</b></td>
132
  </tr>
133
  <tr>
134
  <td colspan="2">
148
  </td>
149
  </tr>
150
  <tr>
151
+ <td>
152
  <p>More information about tracking code you can read on <a href="https://support.google.com/analytics/answer/1008080">Google Analytics support</a> pages.</p>
153
  If you have not yet created a google analytics account for this site, <a href='https://analytics.google.com/analytics/web/#management/Settings//%3Fm.page%3DNewAccount/' class='btn btn-xs btn-success'>create it</a>.
154
  </td>
158
  </div>
159
  </div>
160
 
161
+ <a href="javascript: void(0)" onclick="ga_tc_showSettings('id')" style="margin-left: 15px;">Automatically generate Google Analytics Code</a>
162
  </div>
163
  </div>
164
 
 
 
 
 
 
 
165
  <script type="text/javascript">
166
  function ga_tc_showSettings(type) {
167
  if (type == 'id') {
pro.php DELETED
@@ -1,41 +0,0 @@
1
- <div class="acp_get_pro">
2
- <?php
3
- if (isset($_GET['pay']) && $_GET['pay'] == 'success') {
4
- ga_tc_check_license();
5
- }
6
-
7
- if (get_option('ga_tc_pro')):
8
- require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pro_info.php';
9
- else:
10
- require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pro_get.php';
11
- endif;
12
-
13
- function ga_tc_check_license() {
14
- $params = array(
15
- 'method' => 'POST',
16
- 'timeout' => 45,
17
- 'redirection' => 5,
18
- 'httpversion' => '1.0',
19
- 'blocking' => true,
20
- 'headers' => array(),
21
- 'body' => array( 'url' => home_url() ),
22
- 'cookies' => array(),
23
- );
24
-
25
- $pro = 0;
26
- $request = wp_remote_post(GA_TC_SERVER . '/api/plugin-info', $params);
27
- if ( !is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
28
- $answer = json_decode($request['body'], true);
29
- if (is_array($answer) && isset($answer['data']['info'])) {
30
- $info = json_decode($answer['data']['info'], true);
31
- if (isset($info['license']) && !empty($info['license'])) {
32
- $pro = 1;
33
- }
34
- }
35
- }
36
-
37
- update_option('ga_tc_pro', $pro);
38
- }
39
-
40
- ?>
41
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pro_charts.png DELETED
Binary file
pro_features.php DELETED
@@ -1,21 +0,0 @@
1
- <ul>
2
- <li>General analytics (Users, Keywords, Sessions, Durations, Bounce Rate, etc.)</li>
3
- <li>General statistics (Pageviews, User Sessions, Pages/Session, Avg. Session Duration, Bounce Rate of visitor, etc.)</li>
4
- <li>Line charts of sessions, pageviews and users, etc.</li>
5
- <li>Ratings of popular pages, popular keywords</li>
6
- <li>Rating of countries and cities</li>
7
- <li>Pie charts of device categories, operation systems, browsers, screen resolutions and others...</li>
8
- <li>Any data exports in text format, for example to CSV, etc.</li>
9
- <li>Pie charts data reports</li>
10
- <li>Line chart data reports</li>
11
- <li>Export of analytics data in PDF</li>
12
- <li>Export of statistics and analytics data in TXT</li>
13
- <li>The ability to print you own reports</li>
14
- <li>Analytics reports with your Logo</li>
15
- <li>Analytics reports with your signature</li>
16
- <li>White-label reports</li>
17
- <li>All data reports don't contain our copyrights</li>
18
- <li>One Year Free Updates</li>
19
- <li>One Year Priority support</li>
20
- <li>etc.</li>
21
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pro_get.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- $show_description = isset($_GET['description'])
3
- ?>
4
- <div class="ga_tc_pro_chart">
5
- <div >
6
- <h1 style="margin-top: 0px; text-shadow: 1px 1px 5px #929292;"> Use Professional Google Analytics Code plugin</h1>
7
-
8
-
9
-
10
- <div class="slogan">Make available many professional things in your own Google Analytics like: data tables, line/pie charts, reports, exports of data and much more...</div>
11
-
12
- <div style="margin-top: 10px; margin-bottom: 10px;">
13
- <?php require dirname(__FILE__) . DIRECTORY_SEPARATOR . "notice_pro_screenshots2.php"; ?>
14
- </div>
15
-
16
-
17
-
18
- <div class="info" style=" width: 100%">
19
- <div class="acp_pro_button">
20
- <form method="post" action="<?php echo GA_TC_SERVER . '/billing/getPro';?>">
21
- <input type="hidden" name="user_email" value="<?php echo get_option('admin_email'); ?>">
22
- <input type="hidden" name="user_site" value="<?php echo home_url(); ?>">
23
- <input type="hidden" name="refer" value="<?php echo 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . rtrim($_SERVER['HTTP_HOST'], '/')."/" . ltrim($_SERVER['REQUEST_URI'], '/'); ?>">
24
- <input type="submit" class="acp_get_pro_btn" id="acp_get_pro_btn" value="Get PRO" style="margin-right: 20px;">
25
-
26
- </form>
27
- </div>
28
-
29
-
30
- <div id="acp_pro_description">
31
- <b>The following features are available in the Google Analytics PRO plugin:</b>
32
- <?php require dirname(__FILE__) . DIRECTORY_SEPARATOR .'pro_features.php'; ?>
33
- </div>
34
- <div class="acp_pro_button">
35
- <form method="post" action="<?php echo GA_TC_SERVER . '/billing/getPro';?>">
36
- <input type="hidden" name="user_email" value="<?php echo get_option('admin_email'); ?>">
37
- <input type="hidden" name="user_site" value="<?php echo home_url(); ?>">
38
- <input type="hidden" name="refer" value="<?php echo 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . rtrim($_SERVER['HTTP_HOST'], '/')."/" . ltrim($_SERVER['REQUEST_URI'], '/'); ?>">
39
- <input type="submit" class="acp_get_pro_btn" id="acp_get_pro_btn" value="Get PRO" style="margin-right: 20px;">
40
-
41
- </form>
42
- </div>
43
- </div>
44
- </div>
45
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pro_info.php DELETED
@@ -1,11 +0,0 @@
1
- <div id="message" class="updated notice acp_purchased" style="display: table-cell; min-width: 300px; margin-left: 20px; margin-right: 0px; background-color: #d6ffcb">
2
- <div>
3
- <p><b>Professional version of Google Analytics Code plugin was purchased successfully!</b></p>
4
- <p>
5
- You can get the Google Analytics PRO plugin through WordPress plugin update.<br>
6
- There are two ways to get the PRO version of Google Analytics:<br>
7
- &nbsp;&nbsp;1. Just wait till WordPress will check for plugin updates (several times a day);<br>
8
- &nbsp;&nbsp;2. Push the "<a href="<?php echo home_url() . '/wp-admin/update-core.php'; ?>">WordPress plugin update</a>" manually, to get GA installed directly;<br><br>
9
- Please, do not forget to activate Professional Google Analytics Code plugin after installation/update.<br>
10
- </p>
11
- </div>
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,13 +1,11 @@
1
  === Analytics ===
2
- Version: 1.2.1
3
- Plugin Name: Analytics Code Integration
4
  Tags: Google Analytics, Analytics, Google Code, Code Integration, Analytics Code, Google Tracker Code, Tracker, Counter, website, web, page, Google, analytic, id, WordPress, site, automatic
5
  Requires at least: 3.9
6
- Tested up to: 4.7.2
7
  Stable tag: trunk
8
- License: GPLv2 or later
9
- Author: http://www.toolsanalytics.com/
10
  Contributors: tms_gac
 
11
 
12
  Analytics of Google: analytics code integration on WordPress website
13
 
@@ -28,12 +26,10 @@ Analytics of Google: analytics code integration on WordPress website
28
  2. Activate the plugin through the 'Plugins' menu in WordPress;
29
  3. In your WordPress go to "Settings" -> "Google Analytics Code" and enter your Google Analytics Code there.
30
 
 
 
31
  == Changelog ==
32
 
33
- = Google Analytics Version 1.2.1 =
34
- * Added the ability to select the place of the code on the page
35
- * Bug fixes
36
 
37
- = Google Analytics Version 1.1.0 =
38
- * Tested up to 4.7.2
39
- * Bug fixes
1
  === Analytics ===
2
+
 
3
  Tags: Google Analytics, Analytics, Google Code, Code Integration, Analytics Code, Google Tracker Code, Tracker, Counter, website, web, page, Google, analytic, id, WordPress, site, automatic
4
  Requires at least: 3.9
5
+ Tested up to: 4.4.1
6
  Stable tag: trunk
 
 
7
  Contributors: tms_gac
8
+ License: GPLv2 or later
9
 
10
  Analytics of Google: analytics code integration on WordPress website
11
 
26
  2. Activate the plugin through the 'Plugins' menu in WordPress;
27
  3. In your WordPress go to "Settings" -> "Google Analytics Code" and enter your Google Analytics Code there.
28
 
29
+ == Screenshots ==
30
+
31
  == Changelog ==
32
 
33
+ Google Analytics Version 1.0.0
 
 
34
 
35
+ == Frequently Asked Questions ==
 
 
up.png DELETED
Binary file
update.php DELETED
@@ -1,161 +0,0 @@
1
- <?php
2
- class ga_tc_update {
3
- /**
4
- * The plugin current version
5
- * @var string
6
- */
7
- private $current_version;
8
-
9
- /**
10
- * The plugin remote update path
11
- * @var string
12
- */
13
- private $update_path;
14
-
15
- /**
16
- * Plugin Slug (plugin_directory/plugin_file.php)
17
- * @var string
18
- */
19
- private $plugin_slug;
20
-
21
- /**
22
- * Plugin name (plugin_file)
23
- * @var string
24
- */
25
- private $slug;
26
-
27
- /**
28
- * Initialize a new instance of the WordPress Auto-Update class
29
- * @param string $current_version
30
- * @param string $update_path
31
- * @param string $plugin_slug
32
- */
33
- public function __construct( $current_version, $update_path, $plugin_slug )
34
- {
35
- // Set the class public variables
36
- $this->current_version = $current_version;
37
- $this->update_path = $update_path;
38
-
39
- // Set the Plugin Slug
40
- $this->plugin_slug = $plugin_slug;
41
- list ($t1, $t2) = explode( '/', $plugin_slug );
42
- $this->slug = str_replace( '.php', '', $t2 );
43
-
44
- // define the alternative API for updating checking
45
- add_filter( 'pre_set_site_transient_update_plugins', array( &$this, 'check_update' ) );
46
-
47
- // Define the alternative response for information checking
48
- add_filter( 'plugins_api', array( &$this, 'check_info' ), 11, 3 );
49
- }
50
-
51
- /**
52
- * Add our self-hosted autoupdate plugin to the filter transient
53
- *
54
- * @param $transient
55
- * @return object $ transient
56
- */
57
- public function check_update( $transient )
58
- {
59
- if ( empty( $transient->checked ) ) {
60
- return $transient;
61
- }
62
-
63
- // Get the remote version
64
- $remote_version = $this->getRemote_version();
65
-
66
- // If a newer version is available, add the update
67
- if ( version_compare( $this->current_version, $remote_version->new_version, '<' ) ) {
68
- $obj = new stdClass();
69
- $obj->slug = $this->slug;
70
- $obj->new_version = $remote_version->new_version;
71
- $obj->url = $remote_version->url;
72
- $obj->plugin = $this->plugin_slug;
73
- $obj->package = $remote_version->package;
74
- $obj->testes = $remote_version->tested;
75
- $transient->response[$this->plugin_slug] = $obj;
76
- }
77
- return $transient;
78
- }
79
-
80
- /**
81
- * Add our self-hosted description to the filter
82
- *
83
- * @param boolean $false
84
- * @param array $action
85
- * @param object $arg
86
- * @return bool|object
87
- */
88
- public function check_info($false, $action, $arg)
89
- {
90
- if (isset($arg->slug) && $arg->slug === $this->slug) {
91
- $information = $this->getRemote_information();
92
-
93
-
94
- return $information;
95
- }
96
- return false;
97
- }
98
-
99
- /**
100
- * Return the remote version
101
- * @return string $remote_version
102
- */
103
- public function getRemote_version()
104
- {
105
- return $this->getRemote('plugin-version');
106
- }
107
-
108
- /**
109
- * Get information about the remote version
110
- * @return bool|object
111
- */
112
- public function getRemote_information()
113
- {
114
-
115
- return $this->getRemote('plugin-info');
116
- }
117
-
118
- protected function getRemote($method) {
119
- $params = array(
120
- 'method' => 'POST',
121
- 'timeout' => 45,
122
- 'redirection' => 5,
123
- 'httpversion' => '1.0',
124
- 'blocking' => true,
125
- 'headers' => array(),
126
- 'body' => array( 'url' => home_url() ),
127
- 'cookies' => array(),
128
- );
129
-
130
- $pro = 0;
131
- $request = wp_remote_post(GA_TC_SERVER . '/api/'.$method, $params);
132
- if ( !is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
133
- $answer = json_decode($request['body'], true);
134
- if (is_array($answer) && isset($answer['data']['info'])) {
135
- return (object)json_decode($answer['data']['info'], true);
136
- }
137
- }
138
- return false;
139
- }
140
-
141
- /**
142
- * Return the status of the plugin licensing
143
- * @return boolean $remote_license
144
- */
145
- public function getRemote_license()
146
- {
147
- $params = array(
148
- 'body' => array(
149
- 'action' => 'license',
150
- 'license_user' => $this->license_user,
151
- 'license_key' => $this->license_key,
152
- ),
153
- );
154
- $request = wp_remote_post( $this->update_path . 'pluginLicense', $params );
155
- if ( !is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
156
- $answer = json_decode($request['body'], true);
157
- return (object)json_decode($answer['data']['info'], true);
158
- }
159
- return false;
160
- }
161
- }