Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 2.1.0

Version Description

  • 19/07/2018 =
    • New User Interface
    • Minor Bug Fixes
Download this release

Release Info

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

Code changes from version 2.0.3 to 2.1.0

Files changed (37) hide show
  1. LICENSE.txt +339 -0
  2. admin/class-enhanced-ecommerce-google-analytics-admin.php +177 -0
  3. admin/class-enhanced-ecommerce-google-analytics-settings.php +71 -0
  4. admin/css/enhanced-ecommerce-google-analytics-admin.css +72 -0
  5. admin/images/adwords.png +0 -0
  6. admin/images/banner.png +0 -0
  7. admin/images/facebook.jpg +0 -0
  8. admin/images/google_optimize.png +0 -0
  9. admin/images/m1.png +0 -0
  10. admin/images/m2.png +0 -0
  11. admin/images/plugin_bk.png +0 -0
  12. admin/images/shopify_new.png +0 -0
  13. admin/images/tatvic_logo.png +0 -0
  14. admin/index.php +1 -0
  15. admin/js/enhanced-ecommerce-google-analytics-admin.js +33 -0
  16. admin/partials/about-plugin.php +154 -0
  17. admin/partials/enhanced-ecommerce-google-analytics-admin-display.php +46 -0
  18. admin/partials/general-fields.php +113 -0
  19. admin/partials/sidebar.php +29 -0
  20. enhanced-ecommerce-google-analytics.php +83 -0
  21. includes/aga_premium.png +0 -0
  22. includes/class-enhanced-ecommerce-google-analytics-activator.php +38 -0
  23. includes/class-enhanced-ecommerce-google-analytics-deactivator.php +37 -0
  24. includes/class-enhanced-ecommerce-google-analytics-i18n.php +47 -0
  25. includes/class-enhanced-ecommerce-google-analytics-loader.php +128 -0
  26. includes/class-enhanced-ecommerce-google-analytics.php +251 -0
  27. includes/index.php +1 -0
  28. index.php +1 -0
  29. languages/enhanced-ecommerce-google-analytics.pot +0 -0
  30. includes/class-wc-enhanced-ecommerce-google-analytics-integration.php → public/class-enhanced-ecommerce-google-analytics-public.php +77 -195
  31. public/css/enhanced-ecommerce-google-analytics-public.css +4 -0
  32. public/index.php +1 -0
  33. public/js/enhanced-ecommerce-google-analytics-public.js +32 -0
  34. public/partials/class-enhanced-ecommerce-google-analytics-public-display.php +16 -0
  35. readme.txt +321 -301
  36. uninstall.php +31 -0
  37. woocommerce-enhanced-ecommerce-google-analytics-integration.php +0 -59
LICENSE.txt ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ <one line to give the program's name and a brief idea of what it does.>
294
+ Copyright (C) <year> <name of author>
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ <signature of Ty Coon>, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
admin/class-enhanced-ecommerce-google-analytics-admin.php ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The admin-specific functionality of the plugin.
5
+ *
6
+ * @link tatvic.com
7
+ * @since 1.0.0
8
+ *
9
+ * @package Enhanced_Ecommerce_Google_Analytics
10
+ * @subpackage Enhanced_Ecommerce_Google_Analytics/admin
11
+ */
12
+
13
+ /**
14
+ * The admin-specific functionality of the plugin.
15
+ *
16
+ * Defines the plugin name, version, and two examples hooks for how to
17
+ * enqueue the admin-specific stylesheet and JavaScript.
18
+ *
19
+ * @package Enhanced_Ecommerce_Google_Analytics
20
+ * @subpackage Enhanced_Ecommerce_Google_Analytics/admin
21
+ * @author Chiranjiv Pathak <chiranjiv@tatvic.com>
22
+ */
23
+ class Enhanced_Ecommerce_Google_Analytics_Admin {
24
+
25
+ /**
26
+ * The ID of this plugin.
27
+ *
28
+ * @since 1.0.0
29
+ * @access private
30
+ * @var string $plugin_name The ID of this plugin.
31
+ */
32
+ private $plugin_name;
33
+
34
+ /**
35
+ * The version of this plugin.
36
+ *
37
+ * @since 1.0.0
38
+ * @access private
39
+ * @var string $version The current version of this plugin.
40
+ */
41
+ private $version;
42
+
43
+ /**
44
+ * Initialize the class and set its properties.
45
+ *
46
+ * @since 1.0.0
47
+ * @param string $plugin_name The name of this plugin.
48
+ * @param string $version The version of this plugin.
49
+ */
50
+ protected $ga_id;
51
+
52
+ protected $ga_LC;
53
+
54
+ protected $ga_eeT;
55
+
56
+ public function __construct( $plugin_name, $version ) {
57
+
58
+ $this->plugin_name = $plugin_name;
59
+ $this->version = $version;
60
+
61
+ }
62
+
63
+ /**
64
+ * Register the stylesheets for the admin area.
65
+ *
66
+ * @since 1.0.0
67
+ */
68
+ public function enqueue_styles() {
69
+
70
+ $screen = get_current_screen();
71
+ if ( $screen->id == 'tatvic-ee-plugin_page_enhanced-ecommerce-google-analytics-admin-display'){
72
+ wp_register_style('font_awesome','//use.fontawesome.com/releases/v5.0.13/css/all.css');
73
+ wp_enqueue_style('font_awesome');
74
+ wp_register_style('aga_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css');
75
+ wp_enqueue_style('aga_bootstrap');
76
+ wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/enhanced-ecommerce-google-analytics-admin.css', array(), $this->version, 'all' );
77
+ }
78
+
79
+
80
+ }
81
+ /**
82
+ * Register the JavaScript for the admin area.
83
+ *
84
+ * @since 1.0.0
85
+ */
86
+ public function enqueue_scripts() {
87
+
88
+ $screen = get_current_screen();
89
+ if ( $screen->id == 'tatvic-ee-plugin_page_enhanced-ecommerce-google-analytics-admin-display' ||(isset($_GET['page']) && $_GET['page'] == 'enhanced-ecommerce-google-analytics-admin-display')){
90
+ wp_register_script('popper_bootstrap', '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js');
91
+ wp_enqueue_script('popper_bootstrap');
92
+ wp_register_script('aga_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js');
93
+ wp_enqueue_script('aga_bootstrap');
94
+ wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/enhanced-ecommerce-google-analytics-admin.js', array( 'jquery' ), $this->version, false );
95
+ }
96
+
97
+ }
98
+
99
+ /**
100
+ * Display Admin Page.
101
+ *
102
+ * @since 1.0.0
103
+ */
104
+ public function display_admin_page() {
105
+ add_menu_page(
106
+ 'Tatvic EE Plugin',
107
+ 'Tatvic EE Plugin',
108
+ 'NULL',
109
+ 'ee',
110
+ '',
111
+ plugin_dir_url(__FILE__) . 'images/tatvic_logo.png',
112
+ 26
113
+ );
114
+ }
115
+
116
+ /**
117
+ * Display Tab page.
118
+ *
119
+ * @since 1.0.0
120
+ */
121
+ public function add_new_menu(){
122
+ add_submenu_page("ee",
123
+ "Enhanced Ecommerce Google Analytics for Woocommerce",
124
+ "Enhanced Ecommerce Google Analytics for Woocommerce",
125
+ "manage_options",
126
+ "enhanced-ecommerce-google-analytics-admin-display",
127
+ array($this,'showPage'),
128
+ 99);
129
+ }
130
+ public function showPage() {
131
+ require_once( 'partials/enhanced-ecommerce-google-analytics-admin-display.php');
132
+ if(!empty($_GET['tab'])){
133
+ $get_action = $_GET['tab'];
134
+ }
135
+ else{
136
+ $get_action = "general_settings";
137
+ }
138
+ if(method_exists($this, $get_action)) {
139
+ $this->$get_action();
140
+ }
141
+
142
+ }
143
+
144
+ public function general_settings() {
145
+ require_once( 'partials/general-fields.php');
146
+ }
147
+
148
+ public function conversion_tracking() {
149
+ require_once( 'partials/conversion-tracking.php');
150
+ }
151
+
152
+ public function google_optimize() {
153
+ require_once( 'partials/google-optimize.php');
154
+ }
155
+
156
+ public function about_plugin() {
157
+ require_once( 'partials/about-plugin.php');
158
+ }
159
+
160
+ /**
161
+ * Plugin Activation Notice.
162
+ *
163
+ * @since 1.0.0
164
+ */
165
+ public function ee_check_activation_notice() {
166
+ if( get_transient( 'ee-admin-notice-activation' ) ) {
167
+ $setting_url = 'admin.php?page=enhanced-ecommerce-google-analytics-admin-display';
168
+ ?>
169
+ <div class="notice notice-warning is-dismissible">
170
+ <p>Due to the major updates with the latest version, Kindly verify all the <a href="<?php echo $setting_url; ?>" >Settings</a> again.</p>
171
+ </div>
172
+ <?php
173
+ delete_transient( 'ee-admin-notice-activation' );
174
+ }
175
+ }
176
+
177
+ }
admin/class-enhanced-ecommerce-google-analytics-settings.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The admin-setting functionality of the plugin.
4
+ *
5
+ * @link tatvic.com
6
+ * @since 1.0.0
7
+ *
8
+ * @package Enhanced_Ecommerce_Google_Analytics
9
+ * @subpackage Enhanced_Ecommerce_Google_Analytics/admin
10
+ */
11
+
12
+ /**
13
+ * The admin-setting functionality of the plugin.
14
+ *
15
+ * Defines the plugin name, version, and two examples hooks for how to
16
+ * enqueue the admin-specific stylesheet and JavaScript.
17
+ *
18
+ * @package Enhanced_Ecommerce_Google_Analytics
19
+ * @subpackage Enhanced_Ecommerce_Google_Analytics/admin
20
+ * @author Chiranjiv Pathak <chiranjiv@tatvic.com>
21
+ */
22
+ if ( ! defined( 'ABSPATH' ) ) {
23
+ exit();
24
+ }
25
+
26
+ class Enhanced_Ecommerce_Google_Settings {
27
+
28
+ public static function add_update_settings($settings) {
29
+ if ( !get_option($settings)) {
30
+ $ee_options = array();
31
+ foreach ($_POST as $key => $value) {
32
+ if(!isset($_POST[$key])){
33
+ $_POST[$key] = '';
34
+ }
35
+ if(isset($_POST[$key])) {
36
+ $ee_options[$key] = $_POST[$key];
37
+ }
38
+ }
39
+ add_option( $settings, serialize( $ee_options ) );
40
+ }
41
+ else {
42
+ $get_ee_settings = unserialize(get_option($settings));
43
+ foreach ($get_ee_settings as $key => $value) {
44
+ if(!isset($_POST[$key])){
45
+ $_POST[$key] = '';
46
+ }
47
+ if( $_POST[$key] != $value ) {
48
+ $get_ee_settings[$key] = $_POST[$key];
49
+ }
50
+
51
+ }
52
+ foreach($_POST as $key=>$value){
53
+ if(!array_key_exists($key,$get_ee_settings)){
54
+ $get_ee_settings[$key] = $value;
55
+ }
56
+ }
57
+ update_option($settings, serialize( $get_ee_settings ));
58
+ }
59
+ self::admin_notice__success();
60
+ }
61
+
62
+ private static function admin_notice__success() {
63
+ $class = 'notice notice-success';
64
+ $message = __( 'Your settings have been saved.', 'sample-text-domain' );
65
+ printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
66
+
67
+ }
68
+
69
+ }
70
+
71
+ ?>
admin/css/enhanced-ecommerce-google-analytics-admin.css ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * All of the CSS for your admin-specific functionality should be
3
+ * included in this file.
4
+ */
5
+ *{
6
+ box-sizing: border-box;
7
+ margin:0px;
8
+ padding:0px;
9
+ }
10
+ body{
11
+ background: #f1f1f1 !important;
12
+ }
13
+ .nav-link.active{
14
+ color: #fff !important;
15
+ background-color: #2D73C5 !important;
16
+ }
17
+ a.aga-tab{
18
+ color:#4A4A4A !important;
19
+ line-height: 2em;
20
+ }
21
+ .table td{
22
+ vertical-align: middle !important;
23
+ }
24
+ td{
25
+ width:8%;
26
+ }
27
+ .popover{
28
+ max-width:500px !important;
29
+ }
30
+ .popover-body{
31
+ text-align: justify;
32
+ text-justify: inter-word;
33
+ }
34
+ input[type=text],input[type=email],input[type=number],textarea{
35
+ border:1.3px solid #b4b9be;
36
+ }
37
+ input[type=checkbox]{
38
+ border:1.2px solid #b4b9be;
39
+ background:#fff;
40
+ -webkit-transition: all 1.5s ease;
41
+ -moz-transition: all 1.5s ease;
42
+ -o-transition: all 1.5s ease;
43
+ -ms-transition: all 1.5s ease;
44
+ transition: all 1.5s ease;
45
+ }
46
+ input[type=checkbox]:checked::before {
47
+ height:16px;
48
+ width:16px;
49
+ background:#2D73C5;
50
+ color:white;
51
+ font:100 16px/1 dashicons !important;
52
+ margin:-1px;
53
+ }
54
+ h5{
55
+ margin-top: 5px;
56
+ }
57
+ @media only screen and (min-width: 1200px){
58
+ .container{
59
+ margin-left: 8% !important;
60
+ width:auto;
61
+ }
62
+ .banner{
63
+ width:100%;
64
+ }
65
+ }
66
+ @media only screen and (min-width: 1920px){
67
+ .container{
68
+ margin-left: 6% !important;
69
+ width:auto;
70
+ }
71
+
72
+ }
admin/images/adwords.png ADDED
Binary file
admin/images/banner.png ADDED
Binary file
admin/images/facebook.jpg ADDED
Binary file
admin/images/google_optimize.png ADDED
Binary file
admin/images/m1.png ADDED
Binary file
admin/images/m2.png ADDED
Binary file
admin/images/plugin_bk.png ADDED
Binary file
admin/images/shopify_new.png ADDED
Binary file
admin/images/tatvic_logo.png ADDED
Binary file
admin/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
admin/js/enhanced-ecommerce-google-analytics-admin.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $ ) {
2
+ 'use strict';
3
+
4
+ /**
5
+ * All of the code for your admin-facing JavaScript source
6
+ * should reside in this file.
7
+ *
8
+ * Note: It has been assumed you will write jQuery code here, so the
9
+ * $ function reference has been prepared for usage within the scope
10
+ * of this function.
11
+ *
12
+ * This enables you to define handlers, for when the DOM is ready:
13
+ *
14
+ * $(function() {
15
+ *
16
+ * });
17
+ *
18
+ * When the window is loaded:
19
+ *
20
+ * $( window ).load(function() {
21
+ *
22
+ * });
23
+ *
24
+ * ...and/or other possibilities.
25
+ *
26
+ * Ideally, it is not considered best practise to attach more than a
27
+ * single DOM-ready or window-load handler for a particular page.
28
+ * Although scripts in the WordPress core, Plugins and Themes may be
29
+ * practising this, we should strive to set a better example in our own work.
30
+ */
31
+
32
+
33
+ })( jQuery );
admin/partials/about-plugin.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style>
2
+ td{
3
+ text-align: center !important;
4
+ }
5
+ th{
6
+ text-align: center !important;
7
+ }
8
+ .fa-times{
9
+ color:red;
10
+ }
11
+ .fa-check{
12
+ color:green;
13
+ }
14
+ </style>
15
+ <div class="container">
16
+ <div class="row" style="margin-left:-11%; !important;">
17
+ <div class= "col col-9">
18
+ <div class="card mw-100" style="padding:0;">
19
+ <div class="card-header">
20
+ <h5>Feature difference between <span style="font-weight: 800;">Free & Premium</span> Plugin</h5>
21
+ </div>
22
+ <div class="card-body">
23
+ <div class="row">
24
+ <div class="col-md-10 my-4 mx-auto">
25
+ <div class="row">
26
+ <div class="col-lg-12">
27
+ <div class="table-responsve">
28
+ <table class="table table-striped table-hover">
29
+ <thead class="thead-inverse">
30
+ <tr>
31
+ <th class="w-25" style="font-weight: 900;">Features</th>
32
+ <th class="" style="font-weight: 900;">Free</th>
33
+ <th class="" style="font-weight: 900;">Premium</th>
34
+ </tr>
35
+ </thead>
36
+ <tbody>
37
+ <tr>
38
+ <td class="w-25 option">Basic UA Tracking</td>
39
+ <td><i class="fa fa-check"></i></td>
40
+ <td><i class="fa fa-check"></i></td>
41
+ </tr>
42
+ <tr>
43
+ <td class="option">Enhanced Ecommerce</td>
44
+ <td><strong>Only 4 Reports</strong></td>
45
+ <td><strong>All reports</strong></td>
46
+ </tr>
47
+ <tr>
48
+ <td class="option">I.P. Anonymization</td>
49
+ <td><i class="fa fa-check"></i></td>
50
+ <td><i class="fa fa-check"></i></td>
51
+ </tr>
52
+ <tr>
53
+ <td class="option">Google Opt-Out</td>
54
+ <td><i class="fa fa-check"></i></td>
55
+ <td><i class="fa fa-check"></i></td>
56
+ </tr>
57
+ <tr>
58
+ <td class="option">Product List Performance</td>
59
+ <td><i class="fa fa-times"></i></td>
60
+ <td><i class="fa fa-check"></i></td>
61
+ </tr>
62
+ <tr>
63
+ <td class="option">Display Feature</td>
64
+ <td><i class="fa fa-times"></i></td>
65
+ <td><i class="fa fa-check"></i></td>
66
+ </tr>
67
+ <tr>
68
+ <td class="option">Product Variation</td>
69
+ <td><i class="fa fa-times"></i></td>
70
+ <td><i class="fa fa-check"></i></td>
71
+ </tr>
72
+ <tr>
73
+ <td class="option">Automated Product Refund</td>
74
+ <td><i class="fa fa-times"></i></td>
75
+ <td><i class="fa fa-check"></i></td>
76
+ </tr>
77
+ <tr>
78
+ <td class="option">Google Adwords Conversion Tracking</td>
79
+ <td><i class="fa fa-times"></i></td>
80
+ <td><i class="fa fa-check"></i></td>
81
+ </tr>
82
+ <tr>
83
+ <td class="option">Facebook Pixel Implementation</td>
84
+ <td><i class="fa fa-times"></i></td>
85
+ <td><i class="fa fa-check"></i></td>
86
+ </tr>
87
+ <tr>
88
+ <td class="option">Add Google Optimize Snippet</td>
89
+ <td><i class="fa fa-times"></i></td>
90
+ <td><i class="fa fa-check"></i></td>
91
+ </tr>
92
+ <tr>
93
+ <td class="option">User ID Tracking</td>
94
+ <td><i class="fa fa-times"></i></td>
95
+ <td><i class="fa fa-check"></i></td>
96
+ </tr>
97
+ <tr>
98
+ <td class="option">Form Field Tracking</td>
99
+ <td><i class="fa fa-times"></i></td>
100
+ <td><i class="fa fa-check"></i></td>
101
+ </tr>
102
+ <tr>
103
+ <td class="option">Content Grouping</td>
104
+ <td><i class="fa fa-times"></i></td>
105
+ <td><i class="fa fa-check"></i></td>
106
+ </tr>
107
+
108
+ <tr>
109
+ <td class="option">Internal Promotion</td>
110
+ <td><i class="fa fa-times"></i></td>
111
+ <td><i class="fa fa-check"></i></td>
112
+ </tr>
113
+ <tr>
114
+ <td class="option">15+ Ready to Use Custom Dimensions/ Metrics</td>
115
+ <td><i class="fa fa-times"></i></td>
116
+ <td><i class="fa fa-check"></i></td>
117
+ </tr>
118
+ <tr>
119
+ <td class="option">Child / Custom Theme Support</td>
120
+ <td><i class="fa fa-times"></i></td>
121
+ <td><i class="fa fa-check"></i></td>
122
+ </tr>
123
+ <tr>
124
+ <td class="option">Quick Expert Support ( Query Support)</td>
125
+ <td><i class="fa fa-times"></i></td>
126
+ <td><i class="fa fa-check"></i></td>
127
+ </tr>
128
+ <tr>
129
+ <td class="option">Paid Customization</td>
130
+ <td><i class="fa fa-times"></i></td>
131
+ <td><i class="fa fa-check"></i></td>
132
+ </tr>
133
+ </tbody>
134
+ <tfoot class="thead-inverse">
135
+ <tr>
136
+ <th class="w-25"></th>
137
+ <th class=""></th>
138
+ <th class=""><a href="https://codecanyon.net/item/actionable-google-analytics-for-woocommerce/9899552?ref=tatvic" target="_blank"><button class="btn btn-primary">Upgrade to Premium</button></a></th>
139
+ </tr>
140
+ </tfoot>
141
+ </table>
142
+ <p class="description" style="font-size: 15px;"><strong>For more information on Premium Version, feel free to reach out to us at analytics2@tatvic.com</strong></p>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ <hr>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ <?php require_once('sidebar.php');?>
153
+ </div>
154
+ </div>
admin/partials/enhanced-ecommerce-google-analytics-admin-display.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Provide a admin area view for the plugin
5
+ *
6
+ * This file is used to markup the admin-facing aspects of the plugin.
7
+ *
8
+ * @link tatvic.com
9
+ * @since 1.0.0
10
+ *
11
+ * @package Enhanced_Ecommerce_Google_Analytics
12
+ * @subpackage Enhanced_Ecommerce_Google_Analytics/admin/partials
13
+ *
14
+ */
15
+ if (!defined('ABSPATH')) {
16
+ exit;
17
+ }
18
+
19
+ $site_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=";
20
+
21
+ if(isset($_GET['tab']) && $_GET['tab'] == 'general_settings'){
22
+ $general_class_active = "active";
23
+ }
24
+ else{
25
+ $general_class_active = "";
26
+ }
27
+ if(isset($_GET['tab']) && $_GET['tab'] == 'about_plugin'){
28
+ $advanced_class_active = "active";
29
+ }
30
+ else{
31
+ $advanced_class_active = "";
32
+ }
33
+ if(empty($_GET['tab'])){
34
+ $general_class_active = "active";
35
+ }
36
+
37
+ ?>
38
+ <header class='background-color:#E8E8E8;height:500px;width:auto;margin-top:100px;margin-left:20px;'>
39
+ <img class ="banner" src='<?php echo plugins_url('../images/banner.png', __FILE__ ) ?>' style="margin-left:10px;">
40
+ </header>
41
+ <ul class="nav nav-tabs nav-pills" style="margin-left: 10px;margin-top:20px;">
42
+ <li class="nav-item">
43
+ <a href="<?php echo $site_url.'general_settings'; ?>" class="border-left aga-tab nav-link <?php echo $general_class_active; ?>">General Setting</a>
44
+ </li>
45
+ <li class="nav-item"><a href="<?php echo $site_url.'about_plugin'; ?>" class="border-left aga-tab nav-link <?php echo $advanced_class_active; ?>">Premium Plugin</a></li>
46
+ </ul>
admin/partials/general-fields.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(isset($_POST['ee_submit_plugin'])){
3
+ Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
4
+ }
5
+ $data = unserialize(get_option('ee_options'));
6
+ ?>
7
+ <div class="container">
8
+ <div class="row" style="margin-left:-11%; !important;">
9
+ <div class= "col col-9" >
10
+ <div class="card mw-100" style="padding:0px;">
11
+ <div class="card-header">
12
+ <h5>Enhanced Ecommerce Google Analytics</h5>
13
+ </div>
14
+ <div class="card-body">
15
+ <form id="ee_plugin_form" method="post" action="" enctype="multipart/form-data" >
16
+ <table class="table table-bordered">
17
+ <tbody>
18
+
19
+ <tr>
20
+ <td>
21
+ <label class="align-middle" for="woocommerce_ee_google_analytics_ga_id">Google Analytics ID</label>
22
+ </td>
23
+ <td>
24
+ <input type="text" id="ga_id" name = "ga_id" required = "required" value="<?php echo $data['ga_id'];?>">
25
+ <i style="cursor: help;" class="fas fa-question-circle" title="Enter your Google Analytics ID here. You can login into your Google Analytics account to find your ID. e.g. UA-XXXXXX-XX"></i>
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <td>
30
+ <label class="align-middle" for="tracking_code">Tracking Code</label>
31
+ </td>
32
+ <td>
33
+ <label class = "align-middle" for="ga_code">
34
+ <?php $ga_ST = !empty($data['ga_ST'])? 'checked' : ''; ?>
35
+ <input type="checkbox" name="ga_ST" id="ga_ST" <?php echo $ga_ST; ?> >
36
+ Add Global Site Tracking Code 'gtag.js' (Optional)
37
+ <p class="description">This feature adds New gtag.js Tracking Code to your Store. You don't need to enable this if gtag.js implemented via a 3rd party analytics plugin.</p>
38
+ </label><br/>
39
+ <label class = "align-middle" for="ga_enhance_ecommerce">
40
+ <?php $ga_eeT = !empty($data['ga_eeT'])? 'checked' : ''; ?>
41
+ <input type="checkbox" name="ga_eeT" id="ga_eeT" <?php echo $ga_eeT; ?> >
42
+ Add Enhanced Ecommerce Tracking Code
43
+ <p class="description">This feature adds Enhanced Ecommerce Tracking Code to your Store</p>
44
+ </label><br/>
45
+ <label class = "align-middle" for="ga_login_step">
46
+ <?php $ga_gUser = !empty($data['ga_gUser'])? 'checked' : ''; ?>
47
+ <input type="checkbox" name="ga_gUser" id="ga_gUser" <?php echo $ga_gUser; ?> >
48
+ Add Code to Track the Login Step of Guest Users (Optional)
49
+ <p class="description">If you have Guest Check out enable, we recommend you to add this code</p>
50
+ </label><br/>
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <td>
55
+ <label for="ga_Impr">Impression Thresold</label>
56
+ </td>
57
+ <td>
58
+ <?php $ga_Impr = !empty($data['ga_Impr'])? $data['ga_Impr'] : 6; ?>
59
+ <input type="number" min="1" id="ga_Impr" name = "ga_Impr" value = "<?php echo $ga_Impr; ?>"><br/>
60
+ <p class="description">This feature sets Impression threshold for category page. It sends hit after these many numbers of products impressions.</p>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>
65
+ <label class = "align-middle" for="ga_IPA">I.P. Anoymization</label>
66
+ </td>
67
+ <td>
68
+ <label class = "align-middle" for="ga_IPA">
69
+ <?php $ga_IPA = !empty($data['ga_IPA'])? 'checked' : ''; ?>
70
+ <input class="" type="checkbox" name="ga_IPA" id="ga_IPA" <?php echo $ga_IPA; ?>>
71
+ Enable I.P. Anonymization
72
+ <p class="description">Use this feature to anonymize (or stop collecting) the I.P Address of your users in Google Analytics. Be in legal compliance by using I.P Anonymization which is important for EU countries As per the GDPR compliance</p>
73
+ </label>
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <td>
78
+ <label class = "align-middle" for="ga_OPTOUT">Google Analytics Opt Out</label>
79
+ </td>
80
+ <td>
81
+ <label class = "align-middle" for="ga_OPTOUT">
82
+ <?php $ga_OPTOUT = !empty($data['ga_OPTOUT'])? 'checked' : ''; ?>
83
+ <input class="" type="checkbox" name="ga_OPTOUT" id="ga_OPTOUT" <?php echo $ga_OPTOUT; ?>>
84
+ Enable Google Analytics Opt Out (Optional)
85
+ <p class="description">Use this feature to provide website visitors the ability to prevent their data from being used by Google Analytics As per the GDPR compliance.Go through the documentation to check the setup</p>
86
+ </label>
87
+ </td>
88
+ </tr>
89
+ <tr>
90
+ <td>
91
+ <label class = "align-middle" for="ga_PrivacyPolicy">Privacy Policy</label>
92
+ </td>
93
+ <td>
94
+ <label class = "align-middle" for="ga_PrivacyPolicy">
95
+ <?php $ga_PrivacyPolicy = !empty($data['ga_PrivacyPolicy'])? 'checked' : ''; ?>
96
+ <input type="checkbox" onchange="enableSubmit();" name="ga_PrivacyPolicy" id="ga_PrivacyPolicy" required="required" <?php echo $ga_PrivacyPolicy; ?>>
97
+ Accept Privacy Policy of Plugin
98
+ <p class="description">By using Tatvic Plugin, you agree to Tatvic plugin's <a href= "https://www.tatvic.com/privacy-policy/?ref=plugin_policy&utm_source=plugin_backend&utm_medium=woo_premium_plugin&utm_campaign=GDPR_complaince_ecomm_plugins" target="_blank">Privacy Policy</a></p>
99
+ </label>
100
+ </td>
101
+ </tr>
102
+ </tbody>
103
+ </table>
104
+ <p class="submit save-for-later" id="save-for-later">
105
+ <button type="submit" class="btn btn-primary btn-success" id="ee_submit_plugin" name="ee_submit_plugin">Submit</button>
106
+ </p>
107
+ </form>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ <?php require_once('sidebar.php');?>
112
+ </div>
113
+ </div>
admin/partials/sidebar.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="col col-xs-3">
2
+ <div class="card" style="padding: 0px;">
3
+ <div class="card-header">
4
+ <h5> Important Links</h5>
5
+ </div>
6
+ <div class="card-body">
7
+ <ul>
8
+ <li style="padding-bottom:5px;"><a href="http://plugins.tatvic.com/downloads/EE-Woocommerce-Plugin-Documentation.pdf" target="_blank">Installation Instructions</a></li>
9
+ <li style="padding-bottom:5px;"><a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" target="_blank">FAQ</a></li>
10
+ <li style="padding-bottom:5px;"><a href="https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store" target="_blank">Support</a></li>
11
+ <li style="padding-bottom:5px;"><a href="https://www.tatvic.com/privacy-policy/?ref=plugin_policy&utm_source=plugin_backend&utm_medium=woo_free_plugin&utm_campaign=GDPR_complaince_ecomm_plugins" target="_blank">Privacy Policy</a></li>
12
+ <li style="padding-bottom:5px;"><a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#developers" target="_blank">Change Logs</a></li>
13
+ </ul>
14
+ </div>
15
+ </div>
16
+ <div class="card" style="padding: 0px;">
17
+ <div class="card-header">
18
+ <h5>Tatvic also Offers</h5>
19
+ </div>
20
+ <div class="card-body">
21
+ <ul>
22
+ <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m1.png', __FILE__ ) ?>' />&nbsp;<a href="https://codecanyon.net/item/actionable-google-analytics-for-magento/9899649?ref=mage_tatvic" target="_blank">Actionable Google Analytics for Magento</a></li>
23
+ <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/m2.png', __FILE__ ) ?>' />&nbsp;<a href="https://marketplace.magento.com/tatvic-actionablegoogleanalytics.html" target="_blank">Actionable Google Analytics for Magento2</a></li>
24
+ <li style="padding-bottom:5px;"><img src='<?php echo plugins_url('../images/shopify_new.png', __FILE__ ) ?>' />&nbsp;<a href="https://apps.shopify.com/google-universal-analytics-enhanced-ecommerce" target="_blank">Actionable Google Analytics for Shopify</a></li>
25
+ <li style="padding-bottom:5px;"><img style="width:25px;height: 25px;" src='<?php echo plugins_url('../images/tatvic_logo.png', __FILE__ ) ?>' />&nbsp;<a href="https://www.tatvic.com/excel-add-in-google-analytics/?utm_source=excel_tool_signup&utm_medium=woo_free_plugin&utm_campaign=excel_free_trial" target="_blank">Tatvic Ninja Excel AddIn</a></li>
26
+ </ul>
27
+ </div>
28
+ </div>
29
+ </div>
enhanced-ecommerce-google-analytics.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The plugin bootstrap file
5
+ *
6
+ * This file is read by WordPress to generate the plugin information in the plugin
7
+ * admin area. This file also includes all of the dependencies used by the plugin,
8
+ * registers the activation and deactivation functions, and defines a function
9
+ * that starts the plugin.
10
+ *
11
+ * @link tatvic.com
12
+ * @since 1.0.0
13
+ * @package Enhanced E-commerce for Woocommerce store
14
+ *
15
+ * @wordpress-plugin
16
+ * Plugin Name: Enhanced E-commerce for Woocommerce store
17
+ * Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
18
+ * Description: Allows Enhanced E-commerce Google Analytics tracking code to be inserted into WooCommerce store pages.
19
+ * Version: 2.1.0
20
+ * Author: Tatvic
21
+ * Author URI: tatvic.com
22
+ * License: GPL-2.0+
23
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24
+ * Text Domain: tatvic.com
25
+ * Domain Path: /languages
26
+ * WC requires at least: 1.4.1
27
+ * WC tested up to: 3.4.0
28
+ */
29
+
30
+ // If this file is called directly, abort.
31
+ if ( ! defined( 'WPINC' ) ) {
32
+ die;
33
+ }
34
+
35
+ /**
36
+ * Currently plugin version.
37
+ * Start at version 1.0.0 and use SemVer - https://semver.org
38
+ * Rename this for your plugin and update it as you release new versions.
39
+ */
40
+ define( 'PLUGIN_NAME_VERSION', '2.1.0' );
41
+ /**
42
+ * The code that runs during plugin activation.
43
+ * This action is documented in includes/class-enhanced-ecommerce-google-analytics-activator.php
44
+ */
45
+ function activate_enhanced_ecommerce_google_analytics() {
46
+ require_once plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-analytics-activator.php';
47
+ Enhanced_Ecommerce_Google_Analytics_Activator::activate();
48
+ }
49
+
50
+ /**
51
+ * The code that runs during plugin deactivation.
52
+ * This action is documented in includes/class-enhanced-ecommerce-google-analytics-deactivator.php
53
+ */
54
+ function deactivate_enhanced_ecommerce_google_analytics() {
55
+ require_once plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-analytics-deactivator.php';
56
+ Enhanced_Ecommerce_Google_Analytics_Deactivator::deactivate();
57
+ }
58
+ register_activation_hook( __FILE__, 'activate_enhanced_ecommerce_google_analytics' );
59
+ register_deactivation_hook( __FILE__, 'deactivate_enhanced_ecommerce_google_analytics' );
60
+
61
+ /**
62
+ * The core plugin class that is used to define internationalization,
63
+ * admin-specific hooks, and public-facing site hooks.
64
+ */
65
+ require plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-analytics.php';
66
+
67
+ /**
68
+ * Begins execution of the plugin.
69
+ *
70
+ * Since everything within the plugin is registered via hooks,
71
+ * then kicking off the plugin from this point in the file does
72
+ * not affect the page life cycle.
73
+ *
74
+ * @since 1.0.0
75
+ */
76
+
77
+ function run_enhanced_ecommerce_google_analytics() {
78
+
79
+ $plugin = new Enhanced_Ecommerce_Google_Analytics();
80
+ $plugin->run();
81
+
82
+ }
83
+ run_enhanced_ecommerce_google_analytics();
includes/aga_premium.png DELETED
Binary file
includes/class-enhanced-ecommerce-google-analytics-activator.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Fired during plugin activation
5
+ *
6
+ * @link test.com
7
+ * @since 1.0.0
8
+ *
9
+ * @package Enhanced_Ecommerce_Google_Analytics_Activator
10
+ * @subpackage Enhanced_Ecommerce_Google_Analytics_Activator/includes
11
+ */
12
+
13
+ /**
14
+ * Fired during plugin activation.
15
+ *
16
+ * This class defines all code necessary to run during the plugin's activation.
17
+ *
18
+ * @since 1.0.0
19
+ * @package Enhanced_Ecommerce_Google_Analytics_Activator
20
+ * @subpackage Enhanced_Ecommerce_Google_Analytics_Activator/includes
21
+ * @author Chiranjiv Pathak <chiranijv@tatvic.com>
22
+ */
23
+
24
+ class Enhanced_Ecommerce_Google_Analytics_Activator {
25
+
26
+ /**
27
+ * Short Description. (use period)
28
+ *
29
+ * Long Description.
30
+ *
31
+ * @since 1.0.0
32
+ */
33
+ public static function activate() {
34
+ set_transient( 'ee-admin-notice-activation', true, 5 );
35
+ }
36
+
37
+
38
+ }
includes/class-enhanced-ecommerce-google-analytics-deactivator.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Fired during plugin deactivation
5
+ *
6
+ * @link test.com
7
+ * @since 1.0.0
8
+ *
9
+ * @package Enhanced_Ecommerce_Google_Analytics
10
+ * @subpackage Enhanced_Ecommerce_Google_Analytics/includes
11
+ */
12
+
13
+ /**
14
+ * Fired during plugin deactivation.
15
+ *
16
+ * This class defines all code necessary to run during the plugin's deactivation.
17
+ *
18
+ * @since 1.0.0
19
+ * @package Enhanced_Ecommerce_Google_Analytics
20
+ * @subpackage Enhanced_Ecommerce_Google_Analytics/includes
21
+ * @author Chiranjiv Pathak <chiranijv@tatvic.com>
22
+ */
23
+ class Enhanced_Ecommerce_Google_Analytics_Deactivator {
24
+
25
+ /**
26
+ * Short Description. (use period)
27
+ *
28
+ * Long Description.
29
+ *
30
+ * @since 1.0.0
31
+ */
32
+ public static function deactivate() {
33
+ if (!current_user_can('activate_plugins'))
34
+ return;
35
+ }
36
+
37
+ }
includes/class-enhanced-ecommerce-google-analytics-i18n.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Define the internationalization functionality
5
+ *
6
+ * Loads and defines the internationalization files for this plugin
7
+ * so that it is ready for translation.
8
+ *
9
+ * @link tatvic.com
10
+ * @since 1.0.0
11
+ *
12
+ * @package Enhanced_Ecommerce_Google_Analytics
13
+ * @subpackage Enhanced_Ecommerce_Google_Analytics/includes
14
+ */
15
+
16
+ /**
17
+ * Define the internationalization functionality.
18
+ *
19
+ * Loads and defines the internationalization files for this plugin
20
+ * so that it is ready for translation.
21
+ *
22
+ * @since 1.0.0
23
+ * @package Enhanced_Ecommerce_Google_Analytics
24
+ * @subpackage Enhanced_Ecommerce_Google_Analytics/includes
25
+ * @author Chiranjiv Pathak <chiranijv@tatvic.com>
26
+ */
27
+ class Enhanced_Ecommerce_Google_Analytics_i18n {
28
+
29
+
30
+ /**
31
+ * Load the plugin text domain for translation.
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ public function load_plugin_textdomain() {
36
+
37
+ load_plugin_textdomain(
38
+ 'enhanced-ecommerce-google-analytics',
39
+ false,
40
+ dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
41
+ );
42
+
43
+ }
44
+
45
+
46
+
47
+ }
includes/class-enhanced-ecommerce-google-analytics-loader.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  <