Better Google Analytics - Version 1.0.8

Version Description

  • Made a few minor cosmetic changes to Google Analytics Goal list view (including responsive)
  • Moved Web Property ID slot on Test Setup tool to make it clear a new Web Property can be automatically created if needed (new site)
  • Changed how settings are passed to JavaScript code to make plugin more compatible with systems that attempt to alter/consolidate JavaScript files (Google PageSpeed and WordPress caching systems)
  • Feature: Advanced setting that allows the author of a post to view Page Analytics regardless of role
  • Added stubs and API calls for Google Analytics Experiments management
Download this release

Release Info

Developer digitalpoint
Plugin Icon 128x128 Better Google Analytics
Version 1.0.8
Comparing to
See all releases

Code changes from version 1.0.7 to 1.0.8

assets/digitalpoint/css/admin.css CHANGED
@@ -1 +1 @@
1
- .ba_error{background-color:#333;width:40%;position:absolute;top:200px;left:30%;border:1px black solid;box-shadow:0 0 0 10px rgba(100,100,100,.7);border-radius:3px;color:white;padding:10px;opacity:.9;z-index:10}.ba_error .dismiss{float:right;margin-top:40px}#contextual-help-link-wrap{z-index:10}#better-analytics_sidebar_wrapper{position:absolute;right:20px;width:275px;margin-left:10px}#better-analytics_sidebar{position:relative;top:15px}#better-analytics_sidebar .pro{display:none}#better-analytics_sidebar>div{border-color:#ddd #bbb #bbb #ddd;padding:10px}#better-analytics_sidebar h4{margin-top:2em}#better-analytics_sidebar>.postbox>h4{margin-top:0}#better-analytics_sidebar .dashicons-twitter{vertical-align:middle;font-size:16px;height:18px}#better-analytics_settings form{margin-right:285px}@media only screen and (max-width:960px){#better-analytics_settings form{margin-right:215px}#better-analytics_sidebar_wrapper{width:205px}#better-analytics_sidebar .postbox{min-width:185px}}@media screen and (max-width:782px){#better-analytics_sidebar{display:none}#better-analytics_settings form{margin-right:0}}#ba_settings.form-table .dashicons-before{opacity:.6}#ba_settings.form-table th,#ba_test.form-table th{white-space:nowrap;text-align:right}#ba_monitor{padding-right:20px}#ba_monitor td{white-space:nowrap}#ba_monitor td:last-of-type{white-space:normal}@media screen and (max-width:782px){.form-table th{text-align:left!important}.responsiveHide{display:none}}.tooltipster-better_analytics{border-radius:5px;border:2px solid #000;background:#4c4c4c;color:#fff;opacity:.9}.tooltipster-better_analytics .tooltipster-content{font-family:Arial,sans-serif;font-size:12px;line-height:18px;padding:8px 10px;overflow:hidden}.tooltipster-better_analytics .tooltipster-content a{color:#7bf}.tooltipster-better_analytics .tooltipster-content a:hover{color:#9df}.group_api input[type="text"]{width:100%}#ba_test .can_auto_config{background-color:lightgoldenrodyellow}#ba_test .good{color:green;font-size:24px;padding-right:10px}#ba_test .bad{color:red;font-size:24px;padding-right:10px}#ba_test .unknown{color:orange;font-size:24px}#ba_test th+td{vertical-align:top}#ba_test.form-table th,#ba_test.form-table td,#parameters.form-table th,#parameters.form-table td{padding-top:10px;padding-bottom:10px;line-height:1em}#ba_test.form-table th{padding-top:15px}.ba_monitor_form #parameters.form-table th{padding-top:18px}#ba_test .description{color:#777;font-size:12px;line-height:1.5em!important}#ba_test .description ul{list-style:disc;padding-left:30px}.table{display:table;width:95%}.table .row{display:table-row}.table .row.header{font-size:11px;color:#032a46;background:#6cb2e4 linear-gradient(rgba(255,255,255,0.35) 0,rgba(255,255,255,0.35) 50%,rgba(255,255,255,0) 100%)}.table .cell{text-align:center;display:table-cell;border-bottom:1px solid #a5cae4;border-right:1px solid #a5cae4;padding:5px 0;width:12.5%;transition:all 1s;opacity:0;background-color:#176093}.table .cell:first-of-type{border-left:1px solid #a5cae4}.table .row.header .cell{font-weight:bold;border-top:1px solid #6cb2e4;border-bottom:1px solid #65a5d1;border-right:0;border-left:0;background-color:transparent}#Heatmap .row:nth-of-type(2) .cell{border-top:1px solid #a5cae4}#Heatmap .row .cell:nth-of-type(2){border-left:1px solid #a5cae4}#Heatmap .row:first-of-type,#Heatmap .row:first-of-type .cell,#Heatmap .row .cell:first-of-type{border:0;font-weight:bold;background-color:transparent;opacity:1}#Heatmap .row .cell:first-of-type{text-align:right;padding-right:10px;white-space:nowrap}#parameters.form-table th{text-align:right;padding-top:15px}#ba_chart,#ba_realtime_charts{display:none}#ba_realtime_charts>div{display:inline-block;vertical-align:top;line-height:1em}#ba_rt_users{width:30%;text-align:center;padding-top:50px}#ba_rt_users .number{font-weight:bold;font-size:400%;transition:background-color 5s}#ba_rt_users .number.up{background-color:lightgreen;transition:background-color 0s}#ba_rt_users .number.down{background-color:#e77;transition:background-color 0s}#ba_rt_map{width:70%}#ba_rt_medium,#ba_rt_device{width:50%}#ba_realtime_charts #ba_rt_keywords,#ba_realtime_charts #ba_rt_referral_path,#ba_realtime_charts #ba_rt_page_path{display:block;width:100%;padding:15px 0}.google-visualization-table-td{word-wrap:break-word;word-break:break-all;overflow:hidden}#better-analytics_settings .pro{border:2px dashed orange;padding-right:5px}#better-analytics_settings .pro li{list-style:disc;margin-left:25px}#better-analytics_sidebar .postbox h4+div{line-height:1.4em}#ba_track_blocked{display:inline}#chart_loading{font-size:40px;width:40px;height:40px;color:lightgrey;position:absolute;-webkit-animation:rotation 1s infinite linear;animation:rotation 1s infinite linear;transition:opacity .5s;opacity:0}table.plugins #better-analytics p{white-space:normal}table.plugins #better-analytics p.green{color:green}table.plugins #better-analytics p.green a{color:darkgreen}table.plugins #better-analytics p.green a:hover{color:#009600}table.plugins #better-analytics p.orange{color:orange}table.plugins #better-analytics p.orange a{color:darkorange}table.plugins #better-analytics p.orange a:hover{color:lightcoral}.goals tbody,.goals tbody th.check-column{padding:8px 0 0 2px}.goals .inactive .check-column,.goals tfoot th.check-column,.goals thead th.check-column{padding-left:6px}.goals .active .check-column{border-left:4px solid #00d2a0}.goals .active td,.goals .active th{background-color:#f7fefc}.goals .column-value{min-width:55px}.goals td{padding-bottom:0}.optional{padding-left:5px;font-weight:normal;font-size:75%;position:relative;top:-3px;color:chocolate}.extra_info td{padding-top:0;padding-bottom:8px}.funnel ol{counter-reset:item;list-style-type:none;margin-left:0}.funnel li:before{content:counter(item) " ";counter-increment:item;font-size:16px;font-weight:bold}.funnel .delete{position:relative;top:2px;color:lightgrey}.funnel .delete:hover{color:red;cursor:pointer}.funnel li:first-child .delete{display:none}.VISIT_TIME_ON_SITE input,.VISIT_NUM_PAGES input{width:75px}.VISIT_TIME_ON_SITE td>div,.VISIT_NUM_PAGES td>div,.EVENT td>div{display:table}.VISIT_TIME_ON_SITE td>div>div,.VISIT_NUM_PAGES td>div>div,.EVENT td>div>div{display:table-row}.VISIT_TIME_ON_SITE td>div>div>span,.VISIT_NUM_PAGES td>div>div>span,.EVENT td>div>div>span{display:table-cell}.dynamic_options{display:none}.EVENT div>span:first-of-type{text-align:right;padding-right:5px}
1
+ .ba_error{background-color:#333;width:40%;position:absolute;top:200px;left:30%;border:1px black solid;box-shadow:0 0 0 10px rgba(100,100,100,.7);border-radius:3px;color:white;padding:10px;opacity:.9;z-index:10}.ba_error .dismiss{float:right;margin-top:40px}#contextual-help-link-wrap{z-index:10}#better-analytics_sidebar_wrapper{position:absolute;right:20px;width:275px;margin-left:10px}#better-analytics_sidebar{position:relative;top:15px}#better-analytics_sidebar .pro{display:none}#better-analytics_sidebar>div{border-color:#ddd #bbb #bbb #ddd;padding:10px}#better-analytics_sidebar h4{margin-top:2em}#better-analytics_sidebar>.postbox>h4{margin-top:0}#better-analytics_sidebar .dashicons-twitter{vertical-align:middle;font-size:16px;height:18px}#better-analytics_settings form{margin-right:285px}@media only screen and (max-width:960px){#better-analytics_settings form{margin-right:215px}#better-analytics_sidebar_wrapper{width:205px}#better-analytics_sidebar .postbox{min-width:185px}}@media screen and (max-width:782px){#better-analytics_sidebar{display:none}#better-analytics_settings form{margin-right:0}}#ba_settings.form-table .dashicons-before{opacity:.6}#ba_settings.form-table th,#ba_test.form-table th{white-space:nowrap;text-align:right}#ba_monitor{padding-right:20px}#ba_monitor td{white-space:nowrap}#ba_monitor td:last-of-type{white-space:normal}@media screen and (max-width:782px){.form-table th{text-align:left!important}.responsiveHide{display:none}}.tooltipster-better_analytics{border-radius:5px;border:2px solid #000;background:#4c4c4c;color:#fff;opacity:.9}.tooltipster-better_analytics .tooltipster-content{font-family:Arial,sans-serif;font-size:12px;line-height:18px;padding:8px 10px;overflow:hidden}.tooltipster-better_analytics .tooltipster-content a{color:#7bf}.tooltipster-better_analytics .tooltipster-content a:hover{color:#9df}.group_api input[type="text"]{width:100%}#ba_test .can_auto_config{background-color:lightgoldenrodyellow}#ba_test .good{color:green;font-size:24px;padding-right:10px}#ba_test .bad{color:red;font-size:24px;padding-right:10px}#ba_test .unknown{color:orange;font-size:24px}#ba_test th+td{vertical-align:top}#ba_test.form-table th,#ba_test.form-table td,#parameters.form-table th,#parameters.form-table td{padding-top:10px;padding-bottom:10px;line-height:1em}#ba_test.form-table th{padding-top:15px}.ba_monitor_form #parameters.form-table th{padding-top:18px}#ba_test .description{color:#777;font-size:12px;line-height:1.5em!important}#ba_test .description ul{list-style:disc;padding-left:30px}.table{display:table;width:95%}.table .row{display:table-row}.table .row.header{font-size:11px;color:#032a46;background:#6cb2e4 linear-gradient(rgba(255,255,255,0.35) 0,rgba(255,255,255,0.35) 50%,rgba(255,255,255,0) 100%)}.table .cell{text-align:center;display:table-cell;border-bottom:1px solid #a5cae4;border-right:1px solid #a5cae4;padding:5px 0;width:12.5%;transition:all 1s;opacity:0;background-color:#176093}.table .cell:first-of-type{border-left:1px solid #a5cae4}.table .row.header .cell{font-weight:bold;border-top:1px solid #6cb2e4;border-bottom:1px solid #65a5d1;border-right:0;border-left:0;background-color:transparent}#Heatmap .row:nth-of-type(2) .cell{border-top:1px solid #a5cae4}#Heatmap .row .cell:nth-of-type(2){border-left:1px solid #a5cae4}#Heatmap .row:first-of-type,#Heatmap .row:first-of-type .cell,#Heatmap .row .cell:first-of-type{border:0;font-weight:bold;background-color:transparent;opacity:1}#Heatmap .row .cell:first-of-type{text-align:right;padding-right:10px;white-space:nowrap}#parameters.form-table th{text-align:right;padding-top:15px}#ba_chart,#ba_realtime_charts{display:none}#ba_realtime_charts>div{display:inline-block;vertical-align:top;line-height:1em}#ba_rt_users{width:30%;text-align:center;padding-top:50px}#ba_rt_users .number{font-weight:bold;font-size:400%;transition:background-color 5s}#ba_rt_users .number.up{background-color:lightgreen;transition:background-color 0s}#ba_rt_users .number.down{background-color:#e77;transition:background-color 0s}#ba_rt_map{width:70%}#ba_rt_medium,#ba_rt_device{width:50%}#ba_realtime_charts #ba_rt_keywords,#ba_realtime_charts #ba_rt_referral_path,#ba_realtime_charts #ba_rt_page_path{display:block;width:100%;padding:15px 0}.google-visualization-table-td{word-wrap:break-word;word-break:break-all;overflow:hidden}#better-analytics_settings .pro{border:2px dashed orange;padding-right:5px}#better-analytics_settings .pro li{list-style:disc;margin-left:25px}#better-analytics_sidebar .postbox h4+div{line-height:1.4em}#ba_track_blocked{display:inline}#chart_loading{font-size:40px;width:40px;height:40px;color:lightgrey;position:absolute;-webkit-animation:rotation 1s infinite linear;animation:rotation 1s infinite linear;transition:opacity .5s;opacity:0}table.plugins #better-analytics p{white-space:normal}table.plugins #better-analytics p.green{color:green}table.plugins #better-analytics p.green a{color:darkgreen}table.plugins #better-analytics p.green a:hover{color:#009600}table.plugins #better-analytics p.orange{color:orange}table.plugins #better-analytics p.orange a{color:darkorange}table.plugins #better-analytics p.orange a:hover{color:lightcoral}.goals tbody,.goals tbody th.check-column{padding:8px 0 0 2px}.goals .inactive .check-column,.goals tfoot th.check-column,.goals thead th.check-column{padding-left:6px}.goals .active .check-column{border-left:4px solid #00d2a0}.goals .active td,.goals .active th{background-color:#f7fefc}.goals .column-value{min-width:55px}.goals td{padding-bottom:0}.optional{padding-left:5px;font-weight:normal;font-size:75%;position:relative;top:-3px;color:chocolate}.extra_info td{padding-top:0;padding-bottom:8px}.goals .row-title{font-weight:normal}.goals .active .row-title{font-weight:600}@media screen and (max-width:782px){.goals .column-slot,.goals .column-created,.goals .column-updated,.goals .slot,.goals .created,.goals .updated{display:none}.goals .column-name a{font-size:18px!important;line-height:1.2em}}.funnel ol{counter-reset:item;list-style-type:none;margin-left:0}.funnel li:before{content:counter(item) " ";counter-increment:item;font-size:16px;font-weight:bold}.funnel .delete{position:relative;top:2px;color:lightgrey}.funnel .delete:hover{color:red;cursor:pointer}.funnel li:first-child .delete{display:none}.VISIT_TIME_ON_SITE input,.VISIT_NUM_PAGES input{width:75px}.VISIT_TIME_ON_SITE td>div,.VISIT_NUM_PAGES td>div,.EVENT td>div{display:table}.VISIT_TIME_ON_SITE td>div>div,.VISIT_NUM_PAGES td>div>div,.EVENT td>div>div{display:table-row}.VISIT_TIME_ON_SITE td>div>div>span,.VISIT_NUM_PAGES td>div>div>span,.EVENT td>div>div>span{display:table-cell}.dynamic_options{display:none}.EVENT div>span:first-of-type{text-align:right;padding-right:5px}
better-analytics.php CHANGED
@@ -7,7 +7,7 @@
7
  Plugin Name: Better Analytics
8
  Plugin URI: https://marketplace.digitalpoint.com/better-analytics.3354/item
9
  Description: Adds Google Universal Analytics code to your WordPress site. Options to track most everything (social button interactions, advertising clicks, emails sent/opened, YouTube video engagement, custom dimension tracking of authors/categories, etc.) Integrates with API for reports/charts on dashboard, heat maps and real-time traffic tracking.
10
- Version: 1.0.7
11
  Author: Digital Point
12
  Author URI: https://www.digitalpoint.com/
13
  License: GPLv2
@@ -23,7 +23,7 @@ if (!function_exists('add_action'))
23
  exit;
24
  }
25
 
26
- define('BETTER_ANALYTICS_VERSION', '1.0.7');
27
  define('BETTER_ANALYTICS_MINIMUM_WP_VERSION', '3.8'); // Dashicons: https://codex.wordpress.org/Function_Reference/add_menu_page
28
  define('BETTER_ANALYTICS_PRODUCT_URL', 'https://marketplace.digitalpoint.com/better-analytics.3354/item');
29
  define('BETTER_ANALYTICS_PRO_PRODUCT_URL', 'https://marketplace.digitalpoint.com/better-analytics-pro.3355/item');
7
  Plugin Name: Better Analytics
8
  Plugin URI: https://marketplace.digitalpoint.com/better-analytics.3354/item
9
  Description: Adds Google Universal Analytics code to your WordPress site. Options to track most everything (social button interactions, advertising clicks, emails sent/opened, YouTube video engagement, custom dimension tracking of authors/categories, etc.) Integrates with API for reports/charts on dashboard, heat maps and real-time traffic tracking.
10
+ Version: 1.0.8
11
  Author: Digital Point
12
  Author URI: https://www.digitalpoint.com/
13
  License: GPLv2
23
  exit;
24
  }
25
 
26
+ define('BETTER_ANALYTICS_VERSION', '1.0.8');
27
  define('BETTER_ANALYTICS_MINIMUM_WP_VERSION', '3.8'); // Dashicons: https://codex.wordpress.org/Function_Reference/add_menu_page
28
  define('BETTER_ANALYTICS_PRODUCT_URL', 'https://marketplace.digitalpoint.com/better-analytics.3354/item');
29
  define('BETTER_ANALYTICS_PRO_PRODUCT_URL', 'https://marketplace.digitalpoint.com/better-analytics-pro.3355/item');
js/universal.php CHANGED
@@ -192,5 +192,6 @@ if (!empty($betterAnalyticsOptions['dimension']['user']) && @$currentUser->ID >
192
  if (!array_intersect((array)$currentUser->roles, (array)@$betterAnalyticsOptions['roles_no_track']))
193
  {
194
  echo "<!-- This site uses the Better Analytics plugin. " . BETTER_ANALYTICS_PRODUCT_URL . " -->
195
- <script type='text/javascript' src='" . plugins_url('better-analytics/js/loader.php') . "?ver=" . BETTER_ANALYTICS_VERSION . ".js' id='ba_s' data-o=\"" . htmlentities(json_encode($jsonOptions)) . "\"></script>";
 
196
  }
192
  if (!array_intersect((array)$currentUser->roles, (array)@$betterAnalyticsOptions['roles_no_track']))
193
  {
194
  echo "<!-- This site uses the Better Analytics plugin. " . BETTER_ANALYTICS_PRODUCT_URL . " -->
195
+ <meta id='ba_s' data-o=\"" . htmlentities(json_encode($jsonOptions)) . "\" />
196
+ <script async=\"async\" type='text/javascript' src='" . plugins_url('better-analytics/js/loader.php') . "?ver=" . BETTER_ANALYTICS_VERSION . ".js' ></script>";
197
  }
languages/better-analytics.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Better Analytics package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Better Analytics 1.0.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/better-analytics\n"
7
- "POT-Creation-Date: 2015-07-12 17:56:24+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -68,7 +68,7 @@ msgstr ""
68
  msgid "Test Setup"
69
  msgstr ""
70
 
71
- #. #-#-#-#-# plugin.pot (Better Analytics 1.0.6) #-#-#-#-#
72
  #. Plugin Name of the plugin/theme
73
  #: library/DigitalPointBetterAnalytics/Base/Admin.php:106
74
  #: library/DigitalPointBetterAnalytics/Base/Admin.php:199
@@ -225,17 +225,17 @@ msgstr ""
225
  msgid "Verify Domain"
226
  msgstr ""
227
 
228
- #: library/DigitalPointBetterAnalytics/Base/Public.php:130
229
  msgid ""
230
  "%1$sBetter Analytics %4$s requires WordPress %5$s or higher.%2$s%3$sPlease "
231
  "%6$supgrade WordPress%7$s to a current version."
232
  msgstr ""
233
 
234
- #: library/DigitalPointBetterAnalytics/Base/Public.php:284
235
  msgid "Page Analytics"
236
  msgstr ""
237
 
238
- #: library/DigitalPointBetterAnalytics/Base/Public.php:471
239
  msgid "Every Minute"
240
  msgstr ""
241
 
@@ -252,7 +252,7 @@ msgid "Current Page"
252
  msgstr ""
253
 
254
  #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:39
255
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:612
256
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:184
257
  msgid "Medium"
258
  msgstr ""
@@ -322,6 +322,7 @@ msgstr ""
322
 
323
  #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:385
324
  #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:443
 
325
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:73
326
  msgid "Type"
327
  msgstr ""
@@ -331,173 +332,202 @@ msgstr ""
331
  msgid "Detail"
332
  msgstr ""
333
 
334
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:557
335
  msgid "No Linked Google Analytics Account."
336
  msgstr ""
337
 
338
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:559
339
  msgid "You can link one in the Better Analytics API settings."
340
  msgstr ""
341
 
342
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:584
343
  msgid "Date"
344
  msgstr ""
345
 
346
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:588
347
  msgid "Categories"
348
  msgstr ""
349
 
350
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:592
351
  msgid "Authors"
352
  msgstr ""
353
 
354
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:596
355
  msgid "Tags"
356
  msgstr ""
357
 
358
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:600
359
  msgid "Publication Year"
360
  msgstr ""
361
 
362
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:604
363
  msgid "User Role"
364
  msgstr ""
365
 
366
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:606
367
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:191
368
  msgid "Browser"
369
  msgstr ""
370
 
371
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:607
372
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:192
373
  msgid "Operating System"
374
  msgstr ""
375
 
376
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:608
377
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:199
378
  msgid "Device Category"
379
  msgstr ""
380
 
381
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:609
382
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:183
383
  msgid "Source"
384
  msgstr ""
385
 
386
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:610
387
  msgid "Referrer"
388
  msgstr ""
389
 
390
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:613
391
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:204
392
  msgid "Country"
393
  msgstr ""
394
 
395
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:630
396
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:44
397
  msgid "Page Views"
398
  msgstr ""
399
 
400
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:631
401
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:14
402
  msgid "Sessions"
403
  msgstr ""
404
 
405
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:632
406
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:9
407
  msgid "Users"
408
  msgstr ""
409
 
410
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:633
411
  msgid "Session Length"
412
  msgstr ""
413
 
414
- #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:634
415
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:20
416
  msgid "Organic Search"
417
  msgstr ""
418
 
 
419
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:102
 
 
420
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:66
421
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:153
422
  msgid "Name"
423
  msgstr ""
424
 
425
- #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:103
426
- #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:38
427
- msgid "Slot"
428
  msgstr ""
429
 
430
- #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:104
431
- #: library/DigitalPointBetterAnalytics/Model/Goals.php:62
432
- #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:103
433
- msgid "Value"
434
  msgstr ""
435
 
 
436
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:105
437
  msgid "Created"
438
  msgstr ""
439
 
 
440
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:106
441
  msgid "Updated"
442
  msgstr ""
443
 
444
  #. translators: %1$s = label, %2$s = <span>, %3$s = </span>, %4$u = number
 
 
 
445
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:136
446
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:146
447
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:156
448
  msgid "%1$s %2$s(%4$u)%3$s"
449
  msgstr ""
450
 
 
451
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:137
452
  msgid "All"
453
  msgid_plural "All"
454
  msgstr[0] ""
455
  msgstr[1] ""
456
 
 
457
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:147
 
458
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:97
459
  msgid "Active"
460
  msgid_plural "Active"
461
  msgstr[0] ""
462
  msgstr[1] ""
463
 
 
464
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:157
465
  msgid "Inactive"
466
  msgid_plural "Inactive"
467
  msgstr[0] ""
468
  msgstr[1] ""
469
 
 
470
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:185
471
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:236
472
  msgid "Activate"
473
  msgstr ""
474
 
 
475
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:189
476
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:232
477
  msgid "Deactivate"
478
  msgstr ""
479
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  #. translators: %1$s = hours, %2$s = minutes, %3$s = seconds
481
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:212
482
  msgid "%1$u hours, %2$u minutes, %3$u seconds"
483
  msgstr ""
484
 
485
- #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:277
486
- msgid "Select %s"
487
- msgstr ""
488
-
489
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:291
 
 
490
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:46
491
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:57
492
  msgid "Goal ID %1$u / Goal Set %2$u"
493
  msgstr ""
494
 
495
- #. translators: PHP date format - see: http:php.net/manual/function.date.php
496
- #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:302
497
- #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:308
498
- msgid "Y/m/d g:i a"
499
- msgstr ""
500
-
501
  #: library/DigitalPointBetterAnalytics/Helper/Reporting.php:78
502
  msgid "No API tokens to refresh."
503
  msgstr ""
@@ -508,6 +538,22 @@ msgid ""
508
  "%2$s. \"Create an account\" is on the upper right of that page."
509
  msgstr ""
510
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511
  #: library/DigitalPointBetterAnalytics/Model/Goals.php:8
512
  msgid "Destination URL"
513
  msgstr ""
@@ -545,6 +591,8 @@ msgid "Less than"
545
  msgstr ""
546
 
547
  #: library/DigitalPointBetterAnalytics/Model/Goals.php:49
 
 
548
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:190
549
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:210
550
  msgid "Greater than"
@@ -875,7 +923,7 @@ msgid "Default Segments"
875
  msgstr ""
876
 
877
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:134
878
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:970
879
  msgid "Everything"
880
  msgstr ""
881
 
@@ -996,6 +1044,7 @@ msgid "Days Since Last Visit"
996
  msgstr ""
997
 
998
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:179
 
999
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:177
1000
  msgid "Session Duration"
1001
  msgstr ""
@@ -1544,7 +1593,7 @@ msgstr ""
1544
  msgid "Taboola"
1545
  msgstr ""
1546
 
1547
- #. #-#-#-#-# plugin.pot (Better Analytics 1.0.6) #-#-#-#-#
1548
  #. Author of the plugin/theme
1549
  #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:657
1550
  msgid "Digital Point"
@@ -1656,7 +1705,7 @@ msgid "Roles To Not Track"
1656
  msgstr ""
1657
 
1658
  #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:877
1659
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:913
1660
  msgid ""
1661
  "If a logged in user is part of one of these groups, Analytics will not track "
1662
  "them."
@@ -1674,72 +1723,76 @@ msgstr ""
1674
  msgid "Pick roles that are able to view reports"
1675
  msgstr ""
1676
 
1677
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:913
 
 
 
 
1678
  msgid "File Extensions To Track As Downloads"
1679
  msgstr ""
1680
 
1681
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:915
1682
  msgid "Pick file extensions"
1683
  msgstr ""
1684
 
1685
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:920
1686
  msgid "Audio Video Interleave (.avi)"
1687
  msgstr ""
1688
 
1689
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:921
1690
  msgid "Word (.doc)"
1691
  msgstr ""
1692
 
1693
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:922
1694
  msgid "Executable (.exe)"
1695
  msgstr ""
1696
 
1697
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:923
1698
  msgid "gzip (.gz)"
1699
  msgstr ""
1700
 
1701
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:924
1702
  msgid "MPEG-1 Video (.mpg)"
1703
  msgstr ""
1704
 
1705
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:925
1706
  msgid "MP3 (.mp3)"
1707
  msgstr ""
1708
 
1709
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:926
1710
  msgid "Acrobat (.pdf)"
1711
  msgstr ""
1712
 
1713
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:927
1714
  msgid "PowerPoint (.ppt)"
1715
  msgstr ""
1716
 
1717
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:928
1718
  msgid "Photoshop (.psd)"
1719
  msgstr ""
1720
 
1721
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:929
1722
  msgid "RAR (.rar)"
1723
  msgstr ""
1724
 
1725
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:930
1726
  msgid "Windows Media Video (.wmv)"
1727
  msgstr ""
1728
 
1729
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:931
1730
  msgid "Excel (.xls)"
1731
  msgstr ""
1732
 
1733
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:932
1734
  msgid "Zip Archive (.zip)"
1735
  msgstr ""
1736
 
1737
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:946
1738
  msgid "Track Users With Analytics Blockers"
1739
  msgstr ""
1740
 
1741
  #. translators: %1$s = <strong>, %2$s = </strong>, %3$s = <p />
1742
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:949
1743
  msgid ""
1744
  "If a user has a mechanism that is blocking them from being tracked with "
1745
  "Google Analytics, you can use this option to do server-side page view "
@@ -1750,92 +1803,92 @@ msgid ""
1750
  "tracked (ones not popular enough to be widely known as a spider)."
1751
  msgstr ""
1752
 
1753
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:955
1754
  msgid "Never"
1755
  msgstr ""
1756
 
1757
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:960
1758
  msgid "Registered Users"
1759
  msgstr ""
1760
 
1761
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:965
1762
  msgid "Humans"
1763
  msgstr ""
1764
 
1765
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:978
1766
  msgid "Location For Analytics Code"
1767
  msgstr ""
1768
 
1769
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:983
1770
  msgid "Header"
1771
  msgstr ""
1772
 
1773
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:988
1774
  msgid "Footer"
1775
  msgstr ""
1776
 
1777
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:993
1778
  msgid "No JavaScript (you have your own/other already)"
1779
  msgstr ""
1780
 
1781
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:999
1782
  msgid "Use In Staff Area (wp-admin)"
1783
  msgstr ""
1784
 
1785
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1005
1786
  msgid "When To Run Analytics Code"
1787
  msgstr ""
1788
 
1789
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1010
1790
  msgid "Immediately"
1791
  msgstr ""
1792
 
1793
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1015
1794
  msgid "After Page Loads"
1795
  msgstr ""
1796
 
1797
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1022
1798
  msgid "Campaign Tracking Within URLs"
1799
  msgstr ""
1800
 
1801
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1027
1802
  msgid "In Anchor"
1803
  msgstr ""
1804
 
1805
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1032
1806
  msgid "In Parameters"
1807
  msgstr ""
1808
 
1809
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1039
1810
  msgid "Sample Rate"
1811
  msgstr ""
1812
 
1813
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1039
1814
  msgid ""
1815
  "Specifies what percentage of users should be tracked. Very large sites may "
1816
  "need to use a lower sample rate to stay within Google Analytics processing "
1817
  "limits."
1818
  msgstr ""
1819
 
1820
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1060
1821
  msgid "Extra JavaScript"
1822
  msgstr ""
1823
 
1824
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1060
1825
  msgid ""
1826
  "This allows you to add your own JavaScript code to the Analytics tracking "
1827
  "code. This JavaScript is inserted right before the %1$s function."
1828
  msgstr ""
1829
 
1830
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1067
1831
  msgid "Debugging"
1832
  msgstr ""
1833
 
1834
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1072
1835
  msgid "Enable Google Analytics Debugging"
1836
  msgstr ""
1837
 
1838
- #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1073
1839
  msgid "This will display Google Analytics debug data in the browser console."
1840
  msgstr ""
1841
 
@@ -1895,103 +1948,153 @@ msgstr ""
1895
  msgid "active users"
1896
  msgstr ""
1897
 
 
1898
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:26
1899
  msgid "Edit Goal"
1900
  msgstr ""
1901
 
 
1902
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:26
1903
  msgid "Create Goal"
1904
  msgstr ""
1905
 
 
1906
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:50
1907
  msgid "Pick slot"
1908
  msgstr ""
1909
 
 
 
1910
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:77
1911
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:114
1912
  msgid "Pick type"
1913
  msgstr ""
1914
 
 
 
1915
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:103
1916
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:135
1917
  msgid "Optional"
1918
  msgstr ""
1919
 
 
1920
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:110
1921
  msgid "Destination"
1922
  msgstr ""
1923
 
 
 
1924
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:125
1925
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:154
1926
  msgid "URL"
1927
  msgstr ""
1928
 
 
1929
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:129
1930
  msgid "Case sensitive"
1931
  msgstr ""
1932
 
 
1933
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:134
1934
  msgid "Funnel"
1935
  msgstr ""
1936
 
 
1937
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:162
1938
  msgid "Required"
1939
  msgstr ""
1940
 
 
1941
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:172
1942
  msgid "Add another step"
1943
  msgstr ""
1944
 
 
1945
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:185
1946
  msgid "Hours"
1947
  msgstr ""
1948
 
 
1949
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:186
1950
  msgid "Minutes"
1951
  msgstr ""
1952
 
 
1953
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:187
1954
  msgid "Seconds"
1955
  msgstr ""
1956
 
 
1957
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:206
1958
  msgid "Pages Per Session"
1959
  msgstr ""
1960
 
 
1961
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:220
1962
  msgid "Conditions"
1963
  msgstr ""
1964
 
 
1965
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:294
1966
  msgid "Use the Event value as the Goal Value for the conversion"
1967
  msgstr ""
1968
 
 
1969
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:326
1970
  msgid "Goal name is required."
1971
  msgstr ""
1972
 
 
1973
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:362
1974
  msgid "Destination URL is required."
1975
  msgstr ""
1976
 
 
1977
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:425
1978
  msgid "You must specify a Category, Action or Label."
1979
  msgstr ""
1980
 
1981
  #. translators: %1$s = <strong>, %2$s = </strong>
 
1982
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:452
1983
  msgid "Goal %1$supdated%2$s."
1984
  msgstr ""
1985
 
1986
  #. translators: %1$s = <strong>, %2$s = </strong>
 
1987
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:457
1988
  msgid "Goal %1$screated%2$s."
1989
  msgstr ""
1990
 
 
 
 
 
 
1991
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:480
1992
  msgid "Add New"
1993
  msgstr ""
1994
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1995
  #. translators: %1$s = <strong>, %2$s = </strong>
1996
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:491
1997
  msgid "Goal %1$sactivated%2$s."
@@ -2152,7 +2255,7 @@ msgstr ""
2152
 
2153
  #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:68
2154
  #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:114
2155
- #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:346
2156
  msgid "Auto-Configure"
2157
  msgstr ""
2158
 
@@ -2243,37 +2346,38 @@ msgstr ""
2243
  msgid "Things That Can Be Automatically Checked"
2244
  msgstr ""
2245
 
2246
- #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:298
2247
- msgid "Web Property ID Defined"
2248
- msgstr ""
2249
-
2250
- #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:307
2251
  msgid "cURL Installed"
2252
  msgstr ""
2253
 
2254
- #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:313
2255
  msgid ""
2256
  "Not required, but recommended to have the cURL extensions enabled in PHP."
2257
  msgstr ""
2258
 
2259
- #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:333
2260
  msgid "Google Analytics Account Linked"
2261
  msgstr ""
2262
 
2263
- #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:345
2264
  msgid ""
2265
  "Items highlighted in yellow can be auto-configured via the Google Analytics "
2266
  "API if you wish."
2267
  msgstr ""
2268
 
2269
- #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:354
2270
- msgid "Analytics Profile Selected"
2271
  msgstr ""
2272
 
2273
- #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:360
2274
  msgid ""
2275
- "If you would like the Auto-Configure system to create a new Web Property on "
2276
- "your Google Analytics account, don't select an existing profile."
 
 
 
 
 
2277
  msgstr ""
2278
 
2279
  #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:367
2
  # This file is distributed under the same license as the Better Analytics package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Better Analytics 1.0.7\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/better-analytics\n"
7
+ "POT-Creation-Date: 2015-07-16 15:26:19+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
68
  msgid "Test Setup"
69
  msgstr ""
70
 
71
+ #. #-#-#-#-# plugin.pot (Better Analytics 1.0.7) #-#-#-#-#
72
  #. Plugin Name of the plugin/theme
73
  #: library/DigitalPointBetterAnalytics/Base/Admin.php:106
74
  #: library/DigitalPointBetterAnalytics/Base/Admin.php:199
225
  msgid "Verify Domain"
226
  msgstr ""
227
 
228
+ #: library/DigitalPointBetterAnalytics/Base/Public.php:148
229
  msgid ""
230
  "%1$sBetter Analytics %4$s requires WordPress %5$s or higher.%2$s%3$sPlease "
231
  "%6$supgrade WordPress%7$s to a current version."
232
  msgstr ""
233
 
234
+ #: library/DigitalPointBetterAnalytics/Base/Public.php:302
235
  msgid "Page Analytics"
236
  msgstr ""
237
 
238
+ #: library/DigitalPointBetterAnalytics/Base/Public.php:489
239
  msgid "Every Minute"
240
  msgstr ""
241
 
252
  msgstr ""
253
 
254
  #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:39
255
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:622
256
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:184
257
  msgid "Medium"
258
  msgstr ""
322
 
323
  #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:385
324
  #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:443
325
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:77
326
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:73
327
  msgid "Type"
328
  msgstr ""
332
  msgid "Detail"
333
  msgstr ""
334
 
335
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:567
336
  msgid "No Linked Google Analytics Account."
337
  msgstr ""
338
 
339
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:569
340
  msgid "You can link one in the Better Analytics API settings."
341
  msgstr ""
342
 
343
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:594
344
  msgid "Date"
345
  msgstr ""
346
 
347
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:598
348
  msgid "Categories"
349
  msgstr ""
350
 
351
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:602
352
  msgid "Authors"
353
  msgstr ""
354
 
355
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:606
356
  msgid "Tags"
357
  msgstr ""
358
 
359
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:610
360
  msgid "Publication Year"
361
  msgstr ""
362
 
363
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:614
364
  msgid "User Role"
365
  msgstr ""
366
 
367
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:616
368
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:191
369
  msgid "Browser"
370
  msgstr ""
371
 
372
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:617
373
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:192
374
  msgid "Operating System"
375
  msgstr ""
376
 
377
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:618
378
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:199
379
  msgid "Device Category"
380
  msgstr ""
381
 
382
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:619
383
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:183
384
  msgid "Source"
385
  msgstr ""
386
 
387
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:620
388
  msgid "Referrer"
389
  msgstr ""
390
 
391
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:623
392
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:204
393
  msgid "Country"
394
  msgstr ""
395
 
396
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:640
397
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:44
398
  msgid "Page Views"
399
  msgstr ""
400
 
401
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:641
402
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:14
403
  msgid "Sessions"
404
  msgstr ""
405
 
406
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:642
407
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:9
408
  msgid "Users"
409
  msgstr ""
410
 
411
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:643
412
  msgid "Session Length"
413
  msgstr ""
414
 
415
+ #: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:644
416
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:20
417
  msgid "Organic Search"
418
  msgstr ""
419
 
420
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:106
421
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:102
422
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:70
423
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:157
424
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:66
425
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:153
426
  msgid "Name"
427
  msgstr ""
428
 
429
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:107
430
+ msgid "Status"
 
431
  msgstr ""
432
 
433
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:108
434
+ msgid "Winner"
 
 
435
  msgstr ""
436
 
437
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:109
438
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:105
439
  msgid "Created"
440
  msgstr ""
441
 
442
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:110
443
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:106
444
  msgid "Updated"
445
  msgstr ""
446
 
447
  #. translators: %1$s = label, %2$s = <span>, %3$s = </span>, %4$u = number
448
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:140
449
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:150
450
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:160
451
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:136
452
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:146
453
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:156
454
  msgid "%1$s %2$s(%4$u)%3$s"
455
  msgstr ""
456
 
457
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:141
458
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:137
459
  msgid "All"
460
  msgid_plural "All"
461
  msgstr[0] ""
462
  msgstr[1] ""
463
 
464
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:151
465
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:147
466
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:101
467
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:97
468
  msgid "Active"
469
  msgid_plural "Active"
470
  msgstr[0] ""
471
  msgstr[1] ""
472
 
473
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:161
474
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:157
475
  msgid "Inactive"
476
  msgid_plural "Inactive"
477
  msgstr[0] ""
478
  msgstr[1] ""
479
 
480
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:189
481
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:185
482
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:236
483
  msgid "Activate"
484
  msgstr ""
485
 
486
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:193
487
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:189
488
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:232
489
  msgid "Deactivate"
490
  msgstr ""
491
 
492
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:239
493
+ #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:277
494
+ msgid "Select %s"
495
+ msgstr ""
496
+
497
+ #. translators: PHP date format - see: http:php.net/manual/function.date.php
498
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:262
499
+ #: library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php:268
500
+ #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:302
501
+ #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:308
502
+ msgid "Y/m/d g:i a"
503
+ msgstr ""
504
+
505
+ #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:103
506
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:42
507
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:38
508
+ msgid "Slot"
509
+ msgstr ""
510
+
511
+ #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:104
512
+ #: library/DigitalPointBetterAnalytics/Model/Goals.php:62
513
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:107
514
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:103
515
+ msgid "Value"
516
+ msgstr ""
517
+
518
  #. translators: %1$s = hours, %2$s = minutes, %3$s = seconds
519
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:212
520
  msgid "%1$u hours, %2$u minutes, %3$u seconds"
521
  msgstr ""
522
 
 
 
 
 
523
  #: library/DigitalPointBetterAnalytics/Formatting/GoalTable.php:291
524
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:50
525
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:61
526
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:46
527
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:57
528
  msgid "Goal ID %1$u / Goal Set %2$u"
529
  msgstr ""
530
 
 
 
 
 
 
 
531
  #: library/DigitalPointBetterAnalytics/Helper/Reporting.php:78
532
  msgid "No API tokens to refresh."
533
  msgstr ""
538
  "%2$s. \"Create an account\" is on the upper right of that page."
539
  msgstr ""
540
 
541
+ #: library/DigitalPointBetterAnalytics/Model/Experiments.php:8
542
+ msgid "Draft"
543
+ msgstr ""
544
+
545
+ #: library/DigitalPointBetterAnalytics/Model/Experiments.php:9
546
+ msgid "Ready to run"
547
+ msgstr ""
548
+
549
+ #: library/DigitalPointBetterAnalytics/Model/Experiments.php:10
550
+ msgid "Running"
551
+ msgstr ""
552
+
553
+ #: library/DigitalPointBetterAnalytics/Model/Experiments.php:11
554
+ msgid "Ended"
555
+ msgstr ""
556
+
557
  #: library/DigitalPointBetterAnalytics/Model/Goals.php:8
558
  msgid "Destination URL"
559
  msgstr ""
591
  msgstr ""
592
 
593
  #: library/DigitalPointBetterAnalytics/Model/Goals.php:49
594
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:194
595
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:214
596
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:190
597
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:210
598
  msgid "Greater than"
923
  msgstr ""
924
 
925
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:134
926
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:977
927
  msgid "Everything"
928
  msgstr ""
929
 
1044
  msgstr ""
1045
 
1046
  #: library/DigitalPointBetterAnalytics/Model/Reporting.php:179
1047
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:181
1048
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:177
1049
  msgid "Session Duration"
1050
  msgstr ""
1593
  msgid "Taboola"
1594
  msgstr ""
1595
 
1596
+ #. #-#-#-#-# plugin.pot (Better Analytics 1.0.7) #-#-#-#-#
1597
  #. Author of the plugin/theme
1598
  #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:657
1599
  msgid "Digital Point"
1705
  msgstr ""
1706
 
1707
  #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:877
1708
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:920
1709
  msgid ""
1710
  "If a logged in user is part of one of these groups, Analytics will not track "
1711
  "them."
1723
  msgid "Pick roles that are able to view reports"
1724
  msgstr ""
1725
 
1726
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:912
1727
+ msgid "Author Can View Page Analytics"
1728
+ msgstr ""
1729
+
1730
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:920
1731
  msgid "File Extensions To Track As Downloads"
1732
  msgstr ""
1733
 
1734
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:922
1735
  msgid "Pick file extensions"
1736
  msgstr ""
1737
 
1738
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:927
1739
  msgid "Audio Video Interleave (.avi)"
1740
  msgstr ""
1741
 
1742
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:928
1743
  msgid "Word (.doc)"
1744
  msgstr ""
1745
 
1746
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:929
1747
  msgid "Executable (.exe)"
1748
  msgstr ""
1749
 
1750
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:930
1751
  msgid "gzip (.gz)"
1752
  msgstr ""
1753
 
1754
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:931
1755
  msgid "MPEG-1 Video (.mpg)"
1756
  msgstr ""
1757
 
1758
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:932
1759
  msgid "MP3 (.mp3)"
1760
  msgstr ""
1761
 
1762
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:933
1763
  msgid "Acrobat (.pdf)"
1764
  msgstr ""
1765
 
1766
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:934
1767
  msgid "PowerPoint (.ppt)"
1768
  msgstr ""
1769
 
1770
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:935
1771
  msgid "Photoshop (.psd)"
1772
  msgstr ""
1773
 
1774
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:936
1775
  msgid "RAR (.rar)"
1776
  msgstr ""
1777
 
1778
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:937
1779
  msgid "Windows Media Video (.wmv)"
1780
  msgstr ""
1781
 
1782
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:938
1783
  msgid "Excel (.xls)"
1784
  msgstr ""
1785
 
1786
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:939
1787
  msgid "Zip Archive (.zip)"
1788
  msgstr ""
1789
 
1790
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:953
1791
  msgid "Track Users With Analytics Blockers"
1792
  msgstr ""
1793
 
1794
  #. translators: %1$s = <strong>, %2$s = </strong>, %3$s = <p />
1795
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:956
1796
  msgid ""
1797
  "If a user has a mechanism that is blocking them from being tracked with "
1798
  "Google Analytics, you can use this option to do server-side page view "
1803
  "tracked (ones not popular enough to be widely known as a spider)."
1804
  msgstr ""
1805
 
1806
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:962
1807
  msgid "Never"
1808
  msgstr ""
1809
 
1810
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:967
1811
  msgid "Registered Users"
1812
  msgstr ""
1813
 
1814
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:972
1815
  msgid "Humans"
1816
  msgstr ""
1817
 
1818
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:985
1819
  msgid "Location For Analytics Code"
1820
  msgstr ""
1821
 
1822
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:990
1823
  msgid "Header"
1824
  msgstr ""
1825
 
1826
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:995
1827
  msgid "Footer"
1828
  msgstr ""
1829
 
1830
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1000
1831
  msgid "No JavaScript (you have your own/other already)"
1832
  msgstr ""
1833
 
1834
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1006
1835
  msgid "Use In Staff Area (wp-admin)"
1836
  msgstr ""
1837
 
1838
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1012
1839
  msgid "When To Run Analytics Code"
1840
  msgstr ""
1841
 
1842
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1017
1843
  msgid "Immediately"
1844
  msgstr ""
1845
 
1846
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1022
1847
  msgid "After Page Loads"
1848
  msgstr ""
1849
 
1850
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1029
1851
  msgid "Campaign Tracking Within URLs"
1852
  msgstr ""
1853
 
1854
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1034
1855
  msgid "In Anchor"
1856
  msgstr ""
1857
 
1858
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1039
1859
  msgid "In Parameters"
1860
  msgstr ""
1861
 
1862
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1046
1863
  msgid "Sample Rate"
1864
  msgstr ""
1865
 
1866
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1046
1867
  msgid ""
1868
  "Specifies what percentage of users should be tracked. Very large sites may "
1869
  "need to use a lower sample rate to stay within Google Analytics processing "
1870
  "limits."
1871
  msgstr ""
1872
 
1873
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1067
1874
  msgid "Extra JavaScript"
1875
  msgstr ""
1876
 
1877
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1067
1878
  msgid ""
1879
  "This allows you to add your own JavaScript code to the Analytics tracking "
1880
  "code. This JavaScript is inserted right before the %1$s function."
1881
  msgstr ""
1882
 
1883
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1074
1884
  msgid "Debugging"
1885
  msgstr ""
1886
 
1887
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1079
1888
  msgid "Enable Google Analytics Debugging"
1889
  msgstr ""
1890
 
1891
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:1080
1892
  msgid "This will display Google Analytics debug data in the browser console."
1893
  msgstr ""
1894
 
1948
  msgid "active users"
1949
  msgstr ""
1950
 
1951
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:30
1952
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:26
1953
  msgid "Edit Goal"
1954
  msgstr ""
1955
 
1956
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:30
1957
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:26
1958
  msgid "Create Goal"
1959
  msgstr ""
1960
 
1961
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:54
1962
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:50
1963
  msgid "Pick slot"
1964
  msgstr ""
1965
 
1966
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:81
1967
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:118
1968
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:77
1969
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:114
1970
  msgid "Pick type"
1971
  msgstr ""
1972
 
1973
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:107
1974
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:139
1975
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:103
1976
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:135
1977
  msgid "Optional"
1978
  msgstr ""
1979
 
1980
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:114
1981
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:110
1982
  msgid "Destination"
1983
  msgstr ""
1984
 
1985
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:129
1986
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:158
1987
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:125
1988
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:154
1989
  msgid "URL"
1990
  msgstr ""
1991
 
1992
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:133
1993
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:129
1994
  msgid "Case sensitive"
1995
  msgstr ""
1996
 
1997
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:138
1998
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:134
1999
  msgid "Funnel"
2000
  msgstr ""
2001
 
2002
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:166
2003
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:162
2004
  msgid "Required"
2005
  msgstr ""
2006
 
2007
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:176
2008
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:172
2009
  msgid "Add another step"
2010
  msgstr ""
2011
 
2012
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:189
2013
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:185
2014
  msgid "Hours"
2015
  msgstr ""
2016
 
2017
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:190
2018
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:186
2019
  msgid "Minutes"
2020
  msgstr ""
2021
 
2022
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:191
2023
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:187
2024
  msgid "Seconds"
2025
  msgstr ""
2026
 
2027
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:210
2028
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:206
2029
  msgid "Pages Per Session"
2030
  msgstr ""
2031
 
2032
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:224
2033
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:220
2034
  msgid "Conditions"
2035
  msgstr ""
2036
 
2037
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:298
2038
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:294
2039
  msgid "Use the Event value as the Goal Value for the conversion"
2040
  msgstr ""
2041
 
2042
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:330
2043
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:326
2044
  msgid "Goal name is required."
2045
  msgstr ""
2046
 
2047
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:366
2048
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:362
2049
  msgid "Destination URL is required."
2050
  msgstr ""
2051
 
2052
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:429
2053
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:425
2054
  msgid "You must specify a Category, Action or Label."
2055
  msgstr ""
2056
 
2057
  #. translators: %1$s = <strong>, %2$s = </strong>
2058
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:456
2059
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:452
2060
  msgid "Goal %1$supdated%2$s."
2061
  msgstr ""
2062
 
2063
  #. translators: %1$s = <strong>, %2$s = </strong>
2064
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:461
2065
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:457
2066
  msgid "Goal %1$screated%2$s."
2067
  msgstr ""
2068
 
2069
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:483
2070
+ msgid "Experiments"
2071
+ msgstr ""
2072
+
2073
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:484
2074
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:480
2075
  msgid "Add New"
2076
  msgstr ""
2077
 
2078
+ #. translators: %1$s = <strong>, %2$s = </strong>
2079
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:495
2080
+ msgid "Experiment %1$sactivated%2$s."
2081
+ msgstr ""
2082
+
2083
+ #. translators: %1$s = <strong>, %2$s = </strong>
2084
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:500
2085
+ msgid "Selected experiments %1$sactivated%2$s."
2086
+ msgstr ""
2087
+
2088
+ #. translators: %1$s = <strong>, %2$s = </strong>
2089
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:505
2090
+ msgid "Experiment %1$sdeactivated%2$s."
2091
+ msgstr ""
2092
+
2093
+ #. translators: %1$s = <strong>, %2$s = </strong>
2094
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php:510
2095
+ msgid "Selected experiments %1$sdeactivated%2$s."
2096
+ msgstr ""
2097
+
2098
  #. translators: %1$s = <strong>, %2$s = </strong>
2099
  #: library/DigitalPointBetterAnalytics/ViewAdmin/goals.php:491
2100
  msgid "Goal %1$sactivated%2$s."
2255
 
2256
  #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:68
2257
  #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:114
2258
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:338
2259
  msgid "Auto-Configure"
2260
  msgstr ""
2261
 
2346
  msgid "Things That Can Be Automatically Checked"
2347
  msgstr ""
2348
 
2349
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:299
 
 
 
 
2350
  msgid "cURL Installed"
2351
  msgstr ""
2352
 
2353
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:305
2354
  msgid ""
2355
  "Not required, but recommended to have the cURL extensions enabled in PHP."
2356
  msgstr ""
2357
 
2358
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:325
2359
  msgid "Google Analytics Account Linked"
2360
  msgstr ""
2361
 
2362
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:337
2363
  msgid ""
2364
  "Items highlighted in yellow can be auto-configured via the Google Analytics "
2365
  "API if you wish."
2366
  msgstr ""
2367
 
2368
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:346
2369
+ msgid "Web Property ID Defined"
2370
  msgstr ""
2371
 
2372
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:352
2373
  msgid ""
2374
+ "If you would like the Auto-Configure system to create a new Web Property and "
2375
+ "profile on your Google Analytics account, don't select an existing Web "
2376
+ "Property."
2377
+ msgstr ""
2378
+
2379
+ #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:358
2380
+ msgid "Analytics Profile Selected"
2381
  msgstr ""
2382
 
2383
  #: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:367
library/DigitalPointBetterAnalytics/Base/Admin.php CHANGED
@@ -98,7 +98,7 @@ class DigitalPointBetterAnalytics_Base_Admin
98
  }
99
 
100
  add_submenu_page( 'better-analytics_heatmaps', esc_html__('Goals', 'better-analytics'), esc_html__('Goals', 'better-analytics'), 'manage_options', 'better-analytics_goals', array($this, 'display_page') );
101
- //add_submenu_page( 'better-analytics_heatmaps', esc_html__('A/B Testing', 'better-analytics'), esc_html__('A/B Testing', 'better-analytics'), 'manage_options', 'better-analytics_experiments', array($this, 'display_page') );
102
  add_submenu_page( 'better-analytics_heatmaps', esc_html__('Settings', 'better-analytics'), esc_html__('Settings', 'better-analytics'), 'manage_options', 'options-general.php' . '?page=better-analytics' );
103
  add_submenu_page( 'better-analytics_heatmaps', esc_html__('Test Setup', 'better-analytics'), esc_html__('Test Setup', 'better-analytics'), 'manage_options', 'tools.php' . '?page=better-analytics_test' );
104
 
98
  }
99
 
100
  add_submenu_page( 'better-analytics_heatmaps', esc_html__('Goals', 'better-analytics'), esc_html__('Goals', 'better-analytics'), 'manage_options', 'better-analytics_goals', array($this, 'display_page') );
101
+ // add_submenu_page( 'better-analytics_heatmaps', esc_html__('A/B Testing', 'better-analytics'), esc_html__('A/B Testing', 'better-analytics'), 'manage_options', 'better-analytics_experiments', array($this, 'display_page') );
102
  add_submenu_page( 'better-analytics_heatmaps', esc_html__('Settings', 'better-analytics'), esc_html__('Settings', 'better-analytics'), 'manage_options', 'options-general.php' . '?page=better-analytics' );
103
  add_submenu_page( 'better-analytics_heatmaps', esc_html__('Test Setup', 'better-analytics'), esc_html__('Test Setup', 'better-analytics'), 'manage_options', 'tools.php' . '?page=better-analytics_test' );
104
 
library/DigitalPointBetterAnalytics/Base/Public.php CHANGED
@@ -113,12 +113,30 @@ class DigitalPointBetterAnalytics_Base_Public
113
  }
114
  else
115
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  return false;
117
  }
118
  }
119
 
120
-
121
-
122
  /**
123
  * Do something on activation?
124
  * @static
113
  }
114
  else
115
  {
116
+ if (@$betterAnalyticsOptions['author_view_reports'] && is_single() && $post = get_post())
117
+ {
118
+ if ($post->post_author == $currentUser->ID)
119
+ {
120
+ return true;
121
+ }
122
+ }
123
+ elseif(@$betterAnalyticsOptions['author_view_reports'] && !empty($_REQUEST['page_path']))
124
+ {
125
+ if ($postId = absint(url_to_postid($_REQUEST['page_path'])))
126
+ {
127
+ if ($post = get_post($postId))
128
+ {
129
+ if ($post->post_author == $currentUser->ID)
130
+ {
131
+ return true;
132
+ }
133
+ }
134
+ }
135
+ }
136
  return false;
137
  }
138
  }
139
 
 
 
140
  /**
141
  * Do something on activation?
142
  * @static
library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php CHANGED
@@ -525,7 +525,7 @@ class DigitalPointBetterAnalytics_ControllerAdmin_Analytics
525
  global $totals;
526
  $totals = array();
527
 
528
- $goals = $reportingClass->getGoals('~all', '~all', '~all');
529
  $goals = DigitalPointBetterAnalytics_Model_Reporting::filterGoalsByProfile($goals, @$betterAnalyticsOptions['property_id'], @$betterAnalyticsOptions['api']['profile'], $totals);
530
 
531
 
@@ -541,7 +541,17 @@ class DigitalPointBetterAnalytics_ControllerAdmin_Analytics
541
  return;
542
  }
543
 
544
- exit;
 
 
 
 
 
 
 
 
 
 
545
  }
546
 
547
 
525
  global $totals;
526
  $totals = array();
527
 
528
+ $goals = $reportingClass->getGoals();
529
  $goals = DigitalPointBetterAnalytics_Model_Reporting::filterGoalsByProfile($goals, @$betterAnalyticsOptions['property_id'], @$betterAnalyticsOptions['api']['profile'], $totals);
530
 
531
 
541
  return;
542
  }
543
 
544
+ $betterAnalyticsOptions = get_option('better_analytics');
545
+ $reportingClass = DigitalPointBetterAnalytics_Helper_Reporting::getInstance();
546
+
547
+ $experiments = array();
548
+
549
+ if ($profile = $reportingClass->getProfileByProfileId($betterAnalyticsOptions['api']['profile']))
550
+ {
551
+ $experiments = $reportingClass->getExperiments($profile['accountId'], $profile['webPropertyId'], $profile['id']);
552
+ }
553
+
554
+ $this->_view('experiments', array('experiments' => $experiments));
555
  }
556
 
557
 
library/DigitalPointBetterAnalytics/Formatting/ExperimentTable.php ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DigitalPointBetterAnalytics_Formatting_ExperimentTable extends WP_List_Table
4
+ {
5
+ public function __construct( $args = array())
6
+ {
7
+ global $status;
8
+
9
+ $validStatuses = DigitalPointBetterAnalytics_Model_Experiments::getStatuses();
10
+ $validStatuses = array_keys($validStatuses);
11
+ $validStatuses = array_map('strtolower', $validStatuses);
12
+
13
+ $status = 'all';
14
+ if (isset( $_REQUEST['experiment_status'] ) && in_array( $_REQUEST['experiment_status'], $validStatuses))
15
+ {
16
+ $status = $_REQUEST['experiment_status'];
17
+
18
+ $experiments = array();
19
+
20
+ if (!empty($args['experiments']) && is_array($args['experiments']))
21
+ {
22
+ foreach ($args['experiments'] as $key => $experiment)
23
+ {
24
+ if ($_REQUEST['experiment_status'] == 'active' && $experiment['active'])
25
+ {
26
+ $experiments[$key] = $experiment;
27
+ }
28
+ elseif ($_REQUEST['experiment_status'] == 'inactive' && !$experiment['active'])
29
+ {
30
+ $experiments[$key] = $experiment;
31
+ }
32
+ }
33
+
34
+ $args['experiments'] = $experiments;
35
+ }
36
+ }
37
+
38
+ // because this isn't hacky, right? lol
39
+ if (in_array(@$_GET['action'], $validStatuses) !== false)
40
+ {
41
+ $_SERVER['REQUEST_URI'] = remove_query_arg(array('id', 'action', '_wpnonce'), $_SERVER['REQUEST_URI']);
42
+ }
43
+
44
+ parent::__construct($args);
45
+ }
46
+
47
+ protected function _getCurrentUrl()
48
+ {
49
+ return set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
50
+ }
51
+
52
+ public function ajax_user_can()
53
+ {
54
+ return current_user_can('manage_options');
55
+ }
56
+
57
+ public function prepare_items()
58
+ {
59
+ global $totals, $status;
60
+
61
+ $columns = $this->get_columns();
62
+ $hidden = array();
63
+ $sortable = $this->get_sortable_columns();
64
+ $this->_column_headers = array($columns, $hidden, $sortable);
65
+
66
+ $this->items = @$this->_args['experiments']['items'];
67
+
68
+ if (!empty($_REQUEST['orderby']))
69
+ {
70
+ $sortOrders = array(
71
+ 'name' => array('key' => 'name', 'type' => SORT_STRING),
72
+ 'status' => array('key' => 'status', 'type' => SORT_STRING),
73
+ 'winner' => array('key' => 'winnerFound', 'type' => SORT_STRING),
74
+ 'created' => array('key' => 'created', 'type' => SORT_STRING),
75
+ 'updated' => array('key' => 'updated', 'type' => SORT_STRING),
76
+ );
77
+
78
+ if (!empty($sortOrders[$_REQUEST['orderby']]))
79
+ {
80
+ $sortOrder = array();
81
+
82
+ foreach($this->items as $item)
83
+ {
84
+ $sortOrder[] = strtolower($item[$sortOrders[$_REQUEST['orderby']]['key']]);
85
+ }
86
+
87
+ array_multisort($sortOrder, (@$_REQUEST['order'] == 'desc' ? SORT_DESC : SORT_ASC), $sortOrders[$_REQUEST['orderby']]['type'], $this->items);
88
+ }
89
+ }
90
+
91
+ $this->set_pagination_args( array(
92
+ 'total_items' => $totals[$status],
93
+ 'per_page' => 1000,
94
+ ));
95
+ }
96
+
97
+ protected function get_table_classes()
98
+ {
99
+ return array('experiments', 'widefat', $this->_args['plural'] );
100
+ }
101
+
102
+ public function get_columns()
103
+ {
104
+ return array(
105
+ 'cb' => '<input type="checkbox" />',
106
+ 'name' => esc_html__('Name', 'better-analytics'),
107
+ 'status' => esc_html__('Status', 'better-analytics'),
108
+ 'winner' => esc_html__('Winner', 'better-analytics'),
109
+ 'created' => esc_html__('Created', 'better-analytics'),
110
+ 'updated' => esc_html__('Updated', 'better-analytics'),
111
+ );
112
+ }
113
+
114
+ protected function get_sortable_columns()
115
+ {
116
+ return array(
117
+ 'name' => array('name', false),
118
+ 'status' => array('status', false),
119
+ 'winner' => array('winner', true),
120
+ 'created' => array('created', true),
121
+ 'updated' => array('updated', true),
122
+ );
123
+ }
124
+
125
+ protected function get_views()
126
+ {
127
+ global $totals, $status;
128
+
129
+ $status_links = array();
130
+ foreach ($totals as $type => $count)
131
+ {
132
+ if (!$count)
133
+ {
134
+ continue;
135
+ }
136
+
137
+ switch ( $type ) {
138
+ case 'all':
139
+ /* translators: %1$s = label, %2$s = <span>, %3$s = </span>, %4$u = number */
140
+ $text = sprintf(esc_html__('%1$s %2$s(%4$u)%3$s', 'better-analytics'),
141
+ _n('All', 'All', $count),
142
+ '<span class="count">',
143
+ '</span>',
144
+ $count
145
+ );
146
+ break;
147
+
148
+ case 'active':
149
+ /* translators: %1$s = label, %2$s = <span>, %3$s = </span>, %4$u = number */
150
+ $text = sprintf(esc_html__('%1$s %2$s(%4$u)%3$s', 'better-analytics'),
151
+ _n('Active', 'Active', $count),
152
+ '<span class="count">',
153
+ '</span>',
154
+ $count
155
+ );
156
+ break;
157
+
158
+ case 'inactive':
159
+ /* translators: %1$s = label, %2$s = <span>, %3$s = </span>, %4$u = number */
160
+ $text = sprintf(esc_html__('%1$s %2$s(%4$u)%3$s', 'better-analytics'),
161
+ _n('Inactive', 'Inactive', $count),
162
+ '<span class="count">',
163
+ '</span>',
164
+ $count
165
+ );
166
+ }
167
+
168
+ if ( 'search' != $type )
169
+ {
170
+ $status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
171
+ add_query_arg('goal_status', $type, menu_page_url('better-analytics_experiments', false)),
172
+ ( $type == $status ) ? ' class="current"' : '',
173
+ sprintf( $text, number_format_i18n( $count ) )
174
+ );
175
+ }
176
+ }
177
+
178
+ return $status_links;
179
+ }
180
+
181
+ protected function get_bulk_actions()
182
+ {
183
+ global $status;
184
+
185
+ $actions = array();
186
+
187
+ if ($status != 'active')
188
+ {
189
+ $actions['activate-selected'] = esc_html__('Activate', 'better-analytics');
190
+ }
191
+ if ( $status != 'inactive')
192
+ {
193
+ $actions['deactivate-selected'] = esc_html__('Deactivate', 'better-analytics');
194
+ }
195
+
196
+ return $actions;
197
+ }
198
+
199
+ public function single_row($item)
200
+ {
201
+ echo '<tr' . ($item['active'] ? ' class="active"' : '') . '>';
202
+ $this->single_row_columns($item);
203
+ echo '</tr>';
204
+ }
205
+
206
+ protected function single_row_columns($item)
207
+ {
208
+ list( $columns, $hidden ) = $this->get_column_info();
209
+
210
+ foreach ( $columns as $column_name => $column_display_name ) {
211
+ $class = "class='$column_name column-$column_name'";
212
+
213
+ $style = '';
214
+ if ( in_array( $column_name, $hidden ) )
215
+ $style = ' style="display:none;"';
216
+
217
+ $attributes = "$class$style";
218
+
219
+ if ( 'cb' == $column_name ) {
220
+ echo '<th scope="row" class="check-column">';
221
+ echo $this->column_cb( $item );
222
+ echo '</th>';
223
+ }
224
+ elseif ( method_exists( $this, 'column_' . $column_name ) ) {
225
+ echo "<td $attributes>";
226
+ echo call_user_func( array( $this, 'column_' . $column_name ), $item );
227
+ echo "</td>";
228
+ }
229
+ else {
230
+ echo "<td $attributes>";
231
+ echo $this->column_default( $item, $column_name );
232
+ echo "</td>";
233
+ }
234
+ }
235
+ }
236
+
237
+ protected function column_cb($item)
238
+ {
239
+ echo "<label class='screen-reader-text' for='checkbox_" . $item['id'] . "' >" . sprintf(esc_html__('Select %s', 'better-analytics'), $item['name']) . "</label>"
240
+ . "<input type='checkbox' name='checked[]' value='" . esc_attr( $item['id'] ) . "' id='checkbox_" . $item['id'] . "' />";
241
+ }
242
+
243
+
244
+ protected function column_name($item)
245
+ {
246
+ echo '<strong><a class="row-title" href="' . add_query_arg(array('action' => 'create_edit', 'id' => $item['id']), menu_page_url('better-analytics_experiments', false)) . '">' . sanitize_text_field($item['name']) . '</a></strong>';
247
+ }
248
+
249
+ protected function column_status($item)
250
+ {
251
+ echo DigitalPointBetterAnalytics_Model_Experiments::getStatusNameByCode($item['status']);
252
+ }
253
+
254
+ protected function column_value($item)
255
+ {
256
+ echo number_format_i18n($item['value'], 2);
257
+ }
258
+
259
+ protected function column_created($item)
260
+ {
261
+ /* translators: PHP date format - see: http://php.net/manual/function.date.php */
262
+ echo get_date_from_gmt($item['created'], esc_html__('Y/m/d g:i a', 'better-analytics'));
263
+ }
264
+
265
+ protected function column_updated($item)
266
+ {
267
+ /* translators: PHP date format - see: http://php.net/manual/function.date.php */
268
+ echo get_date_from_gmt($item['updated'], esc_html__('Y/m/d g:i a', 'better-analytics'));
269
+ }
270
+
271
+ }
library/DigitalPointBetterAnalytics/Helper/Reporting.php CHANGED
@@ -138,7 +138,18 @@ class DigitalPointBetterAnalytics_Helper_Reporting extends DigitalPointBetterAna
138
  )
139
  );
140
  }
 
 
 
 
141
 
 
 
 
 
 
 
 
142
  elseif($action == 'PATCH')
143
  {
144
  $accessToken = $this->_urlInfo['params']['access_token'];
138
  )
139
  );
140
  }
141
+ elseif($action == 'DELETE')
142
+ {
143
+ $accessToken = $this->_urlInfo['params']['access_token'];
144
+ unset($this->_urlInfo['params']['access_token']);
145
 
146
+ $response = wp_remote_request($this->_urlInfo['url'] . '?access_token=' . urlencode($accessToken),
147
+ array(
148
+ 'method' => 'DELETE',
149
+ 'headers' => array('Content-Type' => 'application/json')
150
+ )
151
+ );
152
+ }
153
  elseif($action == 'PATCH')
154
  {
155
  $accessToken = $this->_urlInfo['params']['access_token'];
library/DigitalPointBetterAnalytics/Helper/Reporting/Abstract.php CHANGED
@@ -219,7 +219,7 @@ abstract class DigitalPointBetterAnalytics_Helper_Reporting_Abstract
219
 
220
  if (!$fromCache)
221
  {
222
- $this->_cacheSave($cacheKey, $profiles, 1);
223
  }
224
  return $profiles;
225
  }
@@ -513,7 +513,7 @@ abstract class DigitalPointBetterAnalytics_Helper_Reporting_Abstract
513
  return $foundProfile;
514
  }
515
 
516
- public function getGoals($accountId, $webPropertyId, $profileId, $goalId = null)
517
  {
518
  return $this->_makeApiCall(
519
  sprintf(self::$_accountsEndpoint . self::$_webPropertiesEndpoint . self::$_profilesEndpoint . self::$_goalsEndpoint . ($goalId ? '/%s' : ''), $accountId, $webPropertyId, $profileId, $goalId),
@@ -552,16 +552,57 @@ abstract class DigitalPointBetterAnalytics_Helper_Reporting_Abstract
552
  }
553
 
554
 
555
- public function getExperiments($accountId, $webPropertyId, $profileId)
556
  {
557
  return $this->_makeApiCall(
558
- sprintf(self::$_accountsEndpoint . self::$_webPropertiesEndpoint . self::$_profilesEndpoint . self::$_experimentsEndpoint, $accountId, $webPropertyId, $profileId),
559
- 'ba_exp_' . md5($accountId . '-' . $webPropertyId . '-' . $profileId),
560
  'GET',
561
  60
562
  );
563
  }
564
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
565
  protected function _makeApiCall($endpoint, $cacheKey = null, $method = 'GET', $cacheMinutes = 60, $fields = array())
566
  {
567
  if (empty($cacheKey) || !$results = $this->_cacheLoad($cacheKey))
219
 
220
  if (!$fromCache)
221
  {
222
+ $this->_cacheSave($cacheKey, $profiles, 5);
223
  }
224
  return $profiles;
225
  }
513
  return $foundProfile;
514
  }
515
 
516
+ public function getGoals($accountId = '~all', $webPropertyId = '~all', $profileId = '~all', $goalId = null)
517
  {
518
  return $this->_makeApiCall(
519
  sprintf(self::$_accountsEndpoint . self::$_webPropertiesEndpoint . self::$_profilesEndpoint . self::$_goalsEndpoint . ($goalId ? '/%s' : ''), $accountId, $webPropertyId, $profileId, $goalId),
552
  }
553
 
554
 
555
+ public function getExperiments($accountId = '~all', $webPropertyId = '~all', $profileId = '~all', $experimentId = null)
556
  {
557
  return $this->_makeApiCall(
558
+ sprintf(self::$_accountsEndpoint . self::$_webPropertiesEndpoint . self::$_profilesEndpoint . self::$_experimentsEndpoint . ($experimentId ? '/%s' : ''), $accountId, $webPropertyId, $profileId, $experimentId),
559
+ 'ba_exp_' . md5($accountId . '-' . $webPropertyId . '-' . $profileId . '-' . $experimentId),
560
  'GET',
561
  60
562
  );
563
  }
564
 
565
+ public function insertExperiment($accountId, $webPropertyId, $profileId, $fields = array())
566
+ {
567
+ return $this->_makeApiCall(
568
+ sprintf(self::$_accountsEndpoint . self::$_webPropertiesEndpoint . self::$_profilesEndpoint . self::$_experimentsEndpoint, $accountId, $webPropertyId, $profileId),
569
+ null,
570
+ 'INSERT',
571
+ 0,
572
+ $fields
573
+ );
574
+ }
575
+
576
+ public function deleteExperiment($accountId, $webPropertyId, $profileId, $experimentId)
577
+ {
578
+ return $this->_makeApiCall(
579
+ sprintf(self::$_accountsEndpoint . self::$_webPropertiesEndpoint . self::$_profilesEndpoint . self::$_experimentsEndpoint . ($experimentId ? '/%s' : ''), $accountId, $webPropertyId, $profileId, $experimentId),
580
+ null,
581
+ 'DELETE',
582
+ 0
583
+ );
584
+ }
585
+
586
+
587
+ public function patchExperiment($accountId, $webPropertyId, $profileId, $experimentId, $fields = array())
588
+ {
589
+ return $this->_makeApiCall(
590
+ sprintf(self::$_accountsEndpoint . self::$_webPropertiesEndpoint . self::$_profilesEndpoint . self::$_experimentsEndpoint . ($experimentId ? '/%s' : ''), $accountId, $webPropertyId, $profileId, $experimentId),
591
+ null,
592
+ 'PATCH',
593
+ 0,
594
+ $fields
595
+ );
596
+ }
597
+
598
+ public function deleteExperimentCache($accountId = '~all', $webPropertyId = '~all', $profileId = '~all', $experimentId = null)
599
+ {
600
+ $cacheKey = 'ba_exp_' . md5($accountId . '-' . $webPropertyId . '-' . $profileId . '-' . $experimentId);
601
+ $this->_cacheDelete($cacheKey);
602
+ }
603
+
604
+
605
+
606
  protected function _makeApiCall($endpoint, $cacheKey = null, $method = 'GET', $cacheMinutes = 60, $fields = array())
607
  {
608
  if (empty($cacheKey) || !$results = $this->_cacheLoad($cacheKey))
library/DigitalPointBetterAnalytics/Model/Experiments.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DigitalPointBetterAnalytics_Model_Experiments
4
+ {
5
+ public static function getStatuses()
6
+ {
7
+ $types = array(
8
+ 'DRAFT' => esc_html__('Draft', 'better-analytics'),
9
+ 'READY_TO_RUN' => esc_html__('Ready to run', 'better-analytics'),
10
+ 'RUNNING' => esc_html__('Running', 'better-analytics'),
11
+ 'ENDED' => esc_html__('Ended', 'better-analytics'),
12
+ );
13
+
14
+ return $types;
15
+ }
16
+
17
+ public static function getStatusNameByCode($statusCode)
18
+ {
19
+ $_types = self::getStatuses();
20
+ return @$_types[$statusCode];
21
+ }
22
+
23
+ }
library/DigitalPointBetterAnalytics/ViewAdmin/config.php CHANGED
@@ -905,6 +905,13 @@
905
  }
906
  ?>
907
  </select>
 
 
 
 
 
 
 
908
  </td>
909
  </tr>
910
 
905
  }
906
  ?>
907
  </select>
908
+
909
+ <fieldset style="padding-top:3px;">
910
+ <label for="ba_author_view_reports">
911
+ <input name="better_analytics[author_view_reports]" type="checkbox" id="ba_author_view_reports" value="1" <?php checked('1', @$betterAnalyticsOptions['author_view_reports'] ); ?>>
912
+ <?php esc_html_e('Author Can View Page Analytics', 'better-analytics');?></label>
913
+ </fieldset>
914
+
915
  </td>
916
  </tr>
917
 
library/DigitalPointBetterAnalytics/ViewAdmin/experiments.php ADDED
@@ -0,0 +1,521 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ wp_enqueue_script('better_analytics_admin_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/js/admin.js', array(), BETTER_ANALYTICS_VERSION );
4
+ wp_enqueue_style('better_analytics_admin_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/css/admin.css', array(), BETTER_ANALYTICS_VERSION);
5
+
6
+ $betterAnalyticsOptions = get_option('better_analytics');
7
+
8
+ $nOnceSalt = @$betterAnalyticsOptions['property_id'] . '-' . @$betterAnalyticsOptions['api']['profile'];
9
+
10
+ $noticeAtTop = '';
11
+
12
+ if (@$_REQUEST['action'] == 'create_edit')
13
+ {
14
+ $experimentId = sanitize_text_field(@$_REQUEST['id']);
15
+
16
+
17
+ // not refactoered after here
18
+
19
+
20
+ $goalsAll = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getGoals();
21
+
22
+ if ($goalId)
23
+ {
24
+ $goal = DigitalPointBetterAnalytics_Model_Reporting::getGoalByGoalId($goalsAll, @$betterAnalyticsOptions['property_id'], @$betterAnalyticsOptions['api']['profile'], $goalId);
25
+ }
26
+
27
+ if ($_SERVER['REQUEST_METHOD'] != 'POST')
28
+ {
29
+ echo '<div class="wrap goal_create">
30
+ <h2>' . ($goalId ? esc_html__('Edit Goal', 'better-analytics') : esc_html__('Create Goal', 'better-analytics')) . '</h2>
31
+
32
+ <form method="post" action="' . esc_url(menu_page_url('better-analytics_goals', false)) . '">
33
+ <input type="hidden" name="page" value="better-analytics_goals"/>
34
+ <input type="hidden" name="action" value="create_edit"/>';
35
+ wp_nonce_field('create_edit-goal' . $nOnceSalt);
36
+
37
+ ?>
38
+
39
+ <table class="form-table">
40
+
41
+ <tr valign="top">
42
+ <th scope="row"><?php esc_html_e('Slot', 'better-analytics');?></th>
43
+ <td>
44
+ <?php
45
+
46
+ if ($goalId)
47
+ {
48
+ echo '<input type="hidden" name="id" value="' . $goalId . '"/>';
49
+ $goalSet = DigitalPointBetterAnalytics_Model_Goals::getGoalSetByGoal($goalId);
50
+ printf(esc_html__('Goal ID %1$u / Goal Set %2$u', 'better-analytics'), $goal['id'], $goalSet);
51
+ }
52
+ else
53
+ {
54
+ echo '<select name="slot" data-placeholder="' . esc_html__('Pick slot', 'better-analytics') . '" id="ba_slot" class="chosen-select">';
55
+
56
+ $goalsAll = DigitalPointBetterAnalytics_Model_Reporting::filterGoalsByProfile($goalsAll, @$betterAnalyticsOptions['property_id'], @$betterAnalyticsOptions['api']['profile'], $totals);
57
+
58
+ foreach (range(1, 20) as $number)
59
+ {
60
+ $goalSet = DigitalPointBetterAnalytics_Model_Goals::getGoalSetByGoal($number);
61
+ echo '<option value="' . $number . '"' . (!empty($goalsAll[$number]) ? ' disabled="disabled"' : '') . '>' . htmlentities(sprintf(esc_html__('Goal ID %1$u / Goal Set %2$u', 'better-analytics'), $number, $goalSet)) . '</option>';
62
+ }
63
+ echo '</select>';
64
+ }
65
+ ?>
66
+ </td>
67
+ </tr>
68
+
69
+ <tr valign="top">
70
+ <th scope="row"><?php esc_html_e('Name', 'better-analytics');?></th>
71
+ <td>
72
+ <input type="text" name="name" class="regular-text" id="ba_name" value="<?php echo esc_attr( @$goal['name'] ); ?>" required />
73
+ </td>
74
+ </tr>
75
+
76
+ <tr valign="top">
77
+ <th scope="row"><?php esc_html_e('Type', 'better-analytics');?></th>
78
+ <td>
79
+
80
+ <?php
81
+ echo '<select name="type" data-placeholder="' . esc_html__('Pick type', 'better-analytics') . '" id="ba_type" class="chosen-select">';
82
+
83
+ $types = DigitalPointBetterAnalytics_Model_Goals::getTypes();
84
+
85
+ foreach ($types as $key => $type)
86
+ {
87
+ echo '<option value="' . $key . '"' . ($key == @$goal['type'] ? ' selected="selected"' : '') . '>' . htmlentities($type) . '</option>';
88
+ }
89
+ echo '</select>';
90
+ ?>
91
+
92
+ </td>
93
+ </tr>
94
+
95
+ <tr valign="top">
96
+ <th scope="row"></th>
97
+ <td>
98
+ <fieldset>
99
+ <label for="ba_active">
100
+ <input name="active" type="checkbox" id="ba_active" value="1" <?php checked('1', (@$goal ? @$goal['active'] : '1')); ?>>
101
+ <?php esc_html_e('Active', 'better-analytics');?></label>
102
+ </fieldset>
103
+ </td>
104
+ </tr>
105
+
106
+ <tr valign="top">
107
+ <th scope="row"><?php esc_html_e('Value', 'better-analytics');?><span class="optional"><?php esc_html_e('Optional', 'better-analytics');?></span></th>
108
+ <td>
109
+ <input type="number" name="value" id="ba_value" min="0" step="0.01" value="<?php echo number_format(@$goal['value'], 2); ?>" />
110
+ </td>
111
+ </tr>
112
+
113
+ <tr valign="top" class="dynamic_options URL_DESTINATION">
114
+ <th scope="row"><?php esc_html_e('Destination', 'better-analytics');?></th>
115
+ <td>
116
+
117
+ <?php
118
+ echo '<select name="destination_match_type" data-placeholder="' . esc_html__('Pick type', 'better-analytics') . '" id="ba_destination_match_type" class="chosen-select">';
119
+
120
+ $types = DigitalPointBetterAnalytics_Model_Goals::getMatchTypes();
121
+
122
+ foreach ($types as $key => $type)
123
+ {
124
+ echo '<option value="' . $key . '"' . ($key == @$goal['urlDestinationDetails']['matchType'] ? ' selected="selected"' : '') . '>' . htmlentities($type) . '</option>';
125
+ }
126
+ echo '</select>';
127
+ ?>
128
+
129
+ <input type="text" name="destination_url" class="regular-text" id="ba_destination_url" placeholder="<?php echo esc_attr(esc_html__('URL', 'better-analytics'));?>" value="<?php echo esc_attr( @$goal['urlDestinationDetails']['url'] ); ?>" />
130
+
131
+ <label for="ba_case_sensitive">
132
+ <input name="case_sensitive" type="checkbox" id="ba_case_sensitive" value="1" <?php checked('1', (@$goal['urlDestinationDetails']['caseSensitive'] ? '1' : '')); ?>>
133
+ <?php esc_html_e('Case sensitive', 'better-analytics');?></label>
134
+ </td>
135
+ </tr>
136
+
137
+ <tr valign="top" class="dynamic_options URL_DESTINATION funnel">
138
+ <th scope="row"><?php esc_html_e('Funnel', 'better-analytics'); ?><span
139
+ class="optional"><?php esc_html_e('Optional', 'better-analytics'); ?></span></th>
140
+ <td>
141
+ <div>
142
+ <ol>
143
+ <?php
144
+
145
+ // show first line when creating new
146
+ if (empty($goal['urlDestinationDetails']['steps']))
147
+ {
148
+ $goal['urlDestinationDetails']['steps'] = array(true);
149
+ }
150
+
151
+ if (!empty($goal['urlDestinationDetails']['steps']) && is_array($goal['urlDestinationDetails']['steps']))
152
+ {
153
+ $i = 0;
154
+ foreach ($goal['urlDestinationDetails']['steps'] as $step)
155
+ {
156
+ echo '<li class="funnel_step">
157
+ <span><input type="text" placeholder="' . esc_attr(esc_html__('Name', 'better-analytics')) .'" name="funnel[name][]" value="' . esc_attr(@$step['name']) .'" /></span>
158
+ <span><input type="text" placeholder="' . esc_attr(esc_html__('URL', 'better-analytics')) .'" class="regular-text" name="funnel[url][]" value="' . esc_attr(@$step['url']) .'" /></span>';
159
+
160
+ echo '<a class="delete"><span class="dashicons dashicons-dismiss"></span></a>';
161
+
162
+ if (!$i)
163
+ {
164
+ echo '<span><label for="ba_first_step_required">
165
+ <input name="first_step_required" type="checkbox" id="ba_first_step_required" value="1"' . checked('1', (@$goal['urlDestinationDetails']['firstStepRequired'] ? '1' : ''), false) .'>' .
166
+ esc_html__('Required', 'better-analytics') . '</label>';
167
+ }
168
+
169
+ echo '</li>';
170
+ $i++;
171
+ }
172
+ }
173
+ ?>
174
+ </ol>
175
+ </div>
176
+ <a id="new_step" class="button"><?php esc_html_e('Add another step', 'better-analytics') ?></a>
177
+ </td>
178
+ </tr>
179
+
180
+ <tr valign="top" class="dynamic_options VISIT_TIME_ON_SITE">
181
+ <th scope="row"><?php esc_html_e('Session Duration', 'better-analytics');?></th>
182
+ <td>
183
+ <?php
184
+ $durations = explode(":", gmdate('j:H:i:s', @$goal['visitTimeOnSiteDetails']['comparisonValue']));
185
+ ?>
186
+ <div>
187
+ <div>
188
+ <span></span>
189
+ <span><?php esc_html_e('Hours', 'better-analytics') ?></span>
190
+ <span><?php esc_html_e('Minutes', 'better-analytics') ?></span>
191
+ <span><?php esc_html_e('Seconds', 'better-analytics') ?></span>
192
+ </div>
193
+ <div>
194
+ <span style="padding-right:5px;"><?php esc_html_e('Greater than', 'better-analytics') ?></span>
195
+ <span>
196
+ <input type="number" name="hours" min="0" id="ba_hours" value="<?php echo esc_attr((absint($durations[0] - 1) * 24) + absint($durations[1])); ?>" />
197
+ </span>
198
+ <span>
199
+ <input type="number" name="minutes" min="0" id="ba_minutes" value="<?php echo esc_attr(absint($durations[2])); ?>" />
200
+ </span>
201
+ <span>
202
+ <input type="number" name="seconds" min="0" id="ba_seconds" value="<?php echo esc_attr(absint($durations[3])); ?>" />
203
+ </span>
204
+ </div>
205
+ </div>
206
+ </td>
207
+ </tr>
208
+
209
+ <tr valign="top" class="dynamic_options VISIT_NUM_PAGES">
210
+ <th scope="row"><?php esc_html_e('Pages Per Session', 'better-analytics');?></th>
211
+ <td>
212
+ <div>
213
+ <div>
214
+ <span style="padding-right:5px;"><?php esc_html_e('Greater than', 'better-analytics') ?></span>
215
+ <span>
216
+ <input type="number" name="pages" min="0" id="ba_pages" value="<?php echo esc_attr(absint(@$goal['visitNumPagesDetails']['comparisonValue'])); ?>" />
217
+ </span>
218
+ </div>
219
+ </div>
220
+ </td>
221
+ </tr>
222
+
223
+ <tr valign="top" class="dynamic_options EVENT">
224
+ <th scope="row"><?php esc_html_e('Conditions', 'better-analytics');?></th>
225
+ <td>
226
+ <div>
227
+ <?php
228
+
229
+ $matchTypes = DigitalPointBetterAnalytics_Model_Goals::getMatchTypes(true);
230
+ $comparisonTypes = DigitalPointBetterAnalytics_Model_Goals::getComparisonTypes();
231
+ $eventConditionTypes = DigitalPointBetterAnalytics_Model_Goals::getEventConditionTypes();
232
+
233
+ foreach ($eventConditionTypes as $conditionCode => $conditionLabel)
234
+ {
235
+ if ($conditionCode == 'VALUE')
236
+ {
237
+ $condition = array(
238
+ 'type' => $conditionCode,
239
+ 'comparisonType' => true
240
+ );
241
+ }
242
+ else
243
+ {
244
+ $condition = array(
245
+ 'type' => $conditionCode,
246
+ 'matchType' => true
247
+ );
248
+ }
249
+
250
+ if (!empty($goal['eventDetails']['eventConditions']) && count($goal['eventDetails']['eventConditions']) > 0)
251
+ {
252
+ foreach ($goal['eventDetails']['eventConditions'] as $existingCondition)
253
+ {
254
+ if (@$existingCondition['type'] == $conditionCode)
255
+ {
256
+ $condition = $existingCondition;
257
+ break;
258
+ }
259
+ }
260
+ }
261
+
262
+ echo '<div><span>' . @$eventConditionTypes[$condition['type']] . ':</span><span>';
263
+
264
+ echo '<select name="event_' . strtolower($condition['type']) . '" id="ba_event_' . strtolower($condition['type']) . '" class="chosen-select">';
265
+
266
+ foreach (!empty($condition['matchType']) ? $matchTypes : $comparisonTypes as $key => $type)
267
+ {
268
+ $selected = '';
269
+ if (!empty($condition['matchType']))
270
+ {
271
+ if ($key === $condition['matchType'])
272
+ {
273
+ $selected = ' selected="selected"';
274
+ }
275
+ }
276
+ elseif (!empty($condition['comparisonType']))
277
+ {
278
+ if ($key === $condition['comparisonType'])
279
+ {
280
+ $selected = ' selected="selected"';
281
+ }
282
+ }
283
+
284
+ echo '<option value="' . $key . '"' . $selected . '>' . htmlentities($type) . '</option>';
285
+ }
286
+ echo '</select></span><span>';
287
+
288
+ echo ' <input type="text" name="event_' . strtolower($condition['type']) . '_value" id="ba_event_' . strtolower($condition['type']) . '_value" value="' . esc_attr(@$condition['expression'] ? @$condition['expression'] : @$condition['comparisonValue']) . '" /></span></div>';
289
+
290
+ }
291
+
292
+ ?>
293
+
294
+ </div>
295
+ <fieldset>
296
+ <label for="ba_use_event_value">
297
+ <input name="use_event_value" type="checkbox" id="ba_use_event_value" value="1" <?php checked('1', (@$goal['eventDetails']['useEventValue'] ? '1' : '')); ?>>
298
+ <?php esc_html_e('Use the Event value as the Goal Value for the conversion', 'better-analytics');?></label>
299
+ </fieldset>
300
+
301
+ </td>
302
+ </tr>
303
+ </table>
304
+
305
+
306
+ <?php
307
+ submit_button();
308
+ echo '</form>
309
+ </div>';
310
+ }
311
+ else
312
+ {
313
+ check_admin_referer('create_edit-goal' . $nOnceSalt);
314
+
315
+ $errorMessage = array();
316
+
317
+ $goalObject = array(
318
+ 'name' => sanitize_text_field(@$_POST['name']),
319
+ 'value' => (@$_POST['value'] + 0),
320
+ 'type' => sanitize_text_field(@$_POST['type']),
321
+ 'active' => (@$_POST['active'] ? true : false),
322
+ 'urlDestinationDetails' => array(),
323
+ 'visitTimeOnSiteDetails' => array(),
324
+ 'visitNumPagesDetails' => array(),
325
+ 'eventDetails' => array(),
326
+ );
327
+
328
+ if (!$goalObject['name'])
329
+ {
330
+ $errorMessage[] = esc_html__('Goal name is required.', 'better-analytics');
331
+ }
332
+
333
+ // calling out slot on insert
334
+ if ($slot = absint(@$_POST['slot']))
335
+ {
336
+ $goalObject['id'] = $slot;
337
+ }
338
+
339
+ if (@$_POST['type'] == 'URL_DESTINATION')
340
+ {
341
+ $goalObject['urlDestinationDetails'] = array(
342
+ 'url' => esc_url(@$_POST['destination_url']),
343
+ 'caseSensitive' => (@$_POST['case_sensitive'] ? true : false),
344
+ 'matchType' => @$_POST['destination_match_type'],
345
+ 'firstStepRequired' => (@$_POST['first_step_required'] ? true : false),
346
+ );
347
+ if (!empty($_POST['funnel']) && is_array($_POST['funnel']))
348
+ {
349
+ $goalObject['urlDestinationDetails']['steps'] = array();
350
+
351
+ if (!empty($_POST['funnel']['url'][0]))
352
+ {
353
+ foreach ($_POST['funnel']['name'] as $step => $name)
354
+ {
355
+ $goalObject['urlDestinationDetails']['steps'][] = array(
356
+ 'number' => ($step + 1),
357
+ 'name' => sanitize_text_field($name),
358
+ 'url' => esc_url($_POST['funnel']['url'][$step])
359
+ );
360
+ }
361
+ }
362
+ }
363
+
364
+ if (!$goalObject['urlDestinationDetails']['url'])
365
+ {
366
+ $errorMessage[] = esc_html__('Destination URL is required.', 'better-analytics');
367
+ }
368
+
369
+ }
370
+ elseif (@$_POST['type'] == 'VISIT_TIME_ON_SITE')
371
+ {
372
+ $goalObject['visitTimeOnSiteDetails'] = array(
373
+ 'comparisonType' => 'GREATER_THAN',
374
+ 'comparisonValue' => (absint(@$_POST['hours']) * 3600) + (absint(@$_POST['minutes']) * 60) + absint(@$_POST['seconds']),
375
+ );
376
+ }
377
+ elseif (@$_POST['type'] == 'VISIT_NUM_PAGES')
378
+ {
379
+ $goalObject['visitNumPagesDetails'] = array(
380
+ 'comparisonType' => 'GREATER_THAN',
381
+ 'comparisonValue' => absint(@$_POST['pages']),
382
+ );
383
+ }
384
+ elseif (@$_POST['type'] == 'EVENT')
385
+ {
386
+ $goalObject['eventDetails'] = array(
387
+ 'useEventValue' => (@$_POST['use_event_value'] ? true : false),
388
+ 'eventConditions' => array()
389
+ );
390
+
391
+ if (!empty($_POST['event_category_value']))
392
+ {
393
+ $goalObject['eventDetails']['eventConditions'][] = array(
394
+ 'type' => 'CATEGORY',
395
+ 'matchType' => $_POST['event_category'],
396
+ 'expression' => $_POST['event_category_value']
397
+ );
398
+ }
399
+
400
+ if (!empty($_POST['event_action_value']))
401
+ {
402
+ $goalObject['eventDetails']['eventConditions'][] = array(
403
+ 'type' => 'ACTION',
404
+ 'matchType' => $_POST['event_action'],
405
+ 'expression' => $_POST['event_action_value']
406
+ );
407
+ }
408
+
409
+ if (!empty($_POST['event_label_value']))
410
+ {
411
+ $goalObject['eventDetails']['eventConditions'][] = array(
412
+ 'type' => 'LABEL',
413
+ 'matchType' => $_POST['event_label'],
414
+ 'expression' => $_POST['event_label_value']
415
+ );
416
+ }
417
+
418
+ if (!empty($_POST['event_value_value']))
419
+ {
420
+ $goalObject['eventDetails']['eventConditions'][] = array(
421
+ 'type' => 'VALUE',
422
+ 'comparisonType' => $_POST['event_value'],
423
+ 'comparisonValue' => $_POST['event_value_value']
424
+ );
425
+ }
426
+
427
+ if (count($goalObject['eventDetails']['eventConditions']) == 0)
428
+ {
429
+ $errorMessage[] = esc_html__('You must specify a Category, Action or Label.', 'better-analytics');
430
+ }
431
+
432
+
433
+ }
434
+
435
+ $reportingClass = DigitalPointBetterAnalytics_Helper_Reporting::getInstance();
436
+
437
+ if (!$errorMessage && $profile = $reportingClass->getProfileByProfileId(@$betterAnalyticsOptions['api']['profile']))
438
+ {
439
+ if ($goalId)
440
+ {
441
+ $goal = $reportingClass->patchGoal($profile['accountId'], $profile['webPropertyId'], $profile['id'], $goalId, $goalObject);
442
+ }
443
+ else
444
+ {
445
+ $goal = $reportingClass->insertGoal($profile['accountId'], $profile['webPropertyId'], $profile['id'], $goalObject);
446
+ }
447
+
448
+ $reportingClass->deleteGoalCache();
449
+
450
+ $goals = $reportingClass->getGoals();
451
+ $goals = DigitalPointBetterAnalytics_Model_Reporting::filterGoalsByProfile($goals, @$betterAnalyticsOptions['property_id'], @$betterAnalyticsOptions['api']['profile'], $totals);
452
+
453
+ if ($goalId)
454
+ {
455
+ /* translators: %1$s = <strong>, %2$s = </strong> */
456
+ $noticeAtTop = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf(esc_html__('Goal %1$supdated%2$s.'), '<strong>', '</strong>') . '</p></div>';
457
+ }
458
+ else
459
+ {
460
+ /* translators: %1$s = <strong>, %2$s = </strong> */
461
+ $noticeAtTop = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf(esc_html__('Goal %1$screated%2$s.'), '<strong>', '</strong>') . '</p></div>';
462
+ }
463
+ }
464
+ }
465
+
466
+ }
467
+
468
+ if (@$_REQUEST['action'] != 'create_edit' || @$_SERVER['REQUEST_METHOD'] == 'POST')
469
+ {
470
+ if (!empty($errorMessage))
471
+ {
472
+ echo '<div class="wrap">';
473
+
474
+ foreach($errorMessage as $error)
475
+ {
476
+ echo '<div class="error"><p>' . $error . '</p></div>';
477
+ }
478
+ echo '</div>';
479
+ }
480
+ else
481
+ {
482
+ echo '<div class="wrap experiments">
483
+ <h2>' . esc_html__('Experiments', 'better-analytics') .
484
+ ' <a href="' . add_query_arg(array('action' => 'create_edit'), esc_url(menu_page_url('better-analytics_experiments', false))) . '" class="add-new-h2">' . esc_html__('Add New', 'better-analytics') . '</a>' .
485
+ '</h2>
486
+
487
+ <form method="post" action="' . esc_url(menu_page_url('better-analytics_experiments', false)) . '">
488
+ <input type="hidden" name="page" value="better-analytics_experiments"/>';
489
+
490
+ echo $noticeAtTop;
491
+
492
+ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'activate')
493
+ {
494
+ /* translators: %1$s = <strong>, %2$s = </strong> */
495
+ echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf(esc_html__('Experiment %1$sactivated%2$s.'), '<strong>', '</strong>') . '</p></div>';
496
+ }
497
+ elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == 'activate-selected')
498
+ {
499
+ /* translators: %1$s = <strong>, %2$s = </strong> */
500
+ echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf(esc_html__('Selected experiments %1$sactivated%2$s.'), '<strong>', '</strong>') . '</p></div>';
501
+ }
502
+ elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == 'deactivate')
503
+ {
504
+ /* translators: %1$s = <strong>, %2$s = </strong> */
505
+ echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf(esc_html__('Experiment %1$sdeactivated%2$s.'), '<strong>', '</strong>') . '</p></div>';
506
+ }
507
+ elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == 'deactivate-selected')
508
+ {
509
+ /* translators: %1$s = <strong>, %2$s = </strong> */
510
+ echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf(esc_html__('Selected experiments %1$sdeactivated%2$s.'), '<strong>', '</strong>') . '</p></div>';
511
+ }
512
+
513
+ $goalTable = new DigitalPointBetterAnalytics_Formatting_ExperimentTable(array('plural' => 'experiments', 'experiments' => $experiments));
514
+
515
+ $goalTable->prepare_items();
516
+ $goalTable->views();
517
+ $goalTable->display();
518
+
519
+ echo '</form></div>';
520
+ }
521
+ }
library/DigitalPointBetterAnalytics/ViewAdmin/goals.php CHANGED
@@ -13,7 +13,7 @@ if (@$_REQUEST['action'] == 'create_edit')
13
  {
14
  $goalId = absint(@$_REQUEST['id']);
15
 
16
- $goalsAll = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getGoals('~all', '~all', '~all');
17
 
18
  if ($goalId)
19
  {
@@ -443,7 +443,7 @@ if (@$_REQUEST['action'] == 'create_edit')
443
 
444
  $reportingClass->deleteGoalCache();
445
 
446
- $goals = $reportingClass->getGoals('~all', '~all', '~all');
447
  $goals = DigitalPointBetterAnalytics_Model_Reporting::filterGoalsByProfile($goals, @$betterAnalyticsOptions['property_id'], @$betterAnalyticsOptions['api']['profile'], $totals);
448
 
449
  if ($goalId)
13
  {
14
  $goalId = absint(@$_REQUEST['id']);
15
 
16
+ $goalsAll = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getGoals();
17
 
18
  if ($goalId)
19
  {
443
 
444
  $reportingClass->deleteGoalCache();
445
 
446
+ $goals = $reportingClass->getGoals();
447
  $goals = DigitalPointBetterAnalytics_Model_Reporting::filterGoalsByProfile($goals, @$betterAnalyticsOptions['property_id'], @$betterAnalyticsOptions['api']['profile'], $totals);
448
 
449
  if ($goalId)
library/DigitalPointBetterAnalytics/ViewAdmin/test.php CHANGED
@@ -294,14 +294,6 @@
294
  </td>
295
  </tr>
296
 
297
- <tr valign="top">
298
- <th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#general', esc_html__('Web Property ID Defined', 'better-analytics'));?></th>
299
- <?php
300
- echo ($betterAnalyticsOptions['property_id'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
301
- ?>
302
- <td></td>
303
- </tr>
304
-
305
  <tr valign="top">
306
 
307
  <th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://php.net/manual/en/curl.installation.php', esc_html__('cURL Installed', 'better-analytics'));?></th>
@@ -351,17 +343,25 @@
351
  ?>
352
 
353
  <tr valign="top"<?php echo $hasTokens ? ' class="can_auto_config"' : ''?>>
354
- <th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#api', esc_html__('Analytics Profile Selected', 'better-analytics'));?></th>
355
  <?php
356
- echo ($betterAnalyticsOptions['api']['profile'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
357
  ?>
358
- <td class="description">
359
  <?php
360
- esc_html_e('If you would like the Auto-Configure system to create a new Web Property on your Google Analytics account, don\'t select an existing profile.', 'better-analytics');
361
  ?>
362
  </td>
363
  </tr>
364
 
 
 
 
 
 
 
 
 
365
  <tr valign="top"<?php echo $hasTokens ? ' class="can_auto_config"' : ''?>>
366
 
367
  <th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', esc_html__('Site Search Setup', 'better-analytics'));?></th>
294
  </td>
295
  </tr>
296
 
 
 
 
 
 
 
 
 
297
  <tr valign="top">
298
 
299
  <th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://php.net/manual/en/curl.installation.php', esc_html__('cURL Installed', 'better-analytics'));?></th>
343
  ?>
344
 
345
  <tr valign="top"<?php echo $hasTokens ? ' class="can_auto_config"' : ''?>>
346
+ <th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#general', esc_html__('Web Property ID Defined', 'better-analytics'));?></th>
347
  <?php
348
+ echo ($betterAnalyticsOptions['property_id'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
349
  ?>
350
+ <td class="description" rowspan="2">
351
  <?php
352
+ esc_html_e('If you would like the Auto-Configure system to create a new Web Property and profile on your Google Analytics account, don\'t select an existing Web Property.', 'better-analytics');
353
  ?>
354
  </td>
355
  </tr>
356
 
357
+ <tr valign="top"<?php echo $hasTokens ? ' class="can_auto_config"' : ''?>>
358
+ <th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#api', esc_html__('Analytics Profile Selected', 'better-analytics'));?></th>
359
+ <?php
360
+ echo ($betterAnalyticsOptions['api']['profile'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
361
+ ?>
362
+
363
+ </tr>
364
+
365
  <tr valign="top"<?php echo $hasTokens ? ' class="can_auto_config"' : ''?>>
366
 
367
  <th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', esc_html__('Site Search Setup', 'better-analytics'));?></th>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: analytics, google analytics, universal analytics, statistics, tracking, co
4
  Donate link: https://marketplace.digitalpoint.com/better-analytics.3354/item#utm_source=readme&utm_medium=wordpress&utm_campaign=plugin
5
  Requires at least: 3.8
6
  Tested up to: 4.2.2
7
- Stable tag: 1.0.7
8
  License: GPLv2
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -183,6 +183,13 @@ Thank you to all the individuals who have contributed translations for Better Go
183
  22. Advanced settings allow you to fine tune how the system works with Google Analytics.
184
 
185
  == Changelog ==
 
 
 
 
 
 
 
186
  = 1.0.7 =
187
  * Feature: Added support for tracking RevContent ad clicks
188
  * Feature: Manage Google Analytics Goals from within WordPress admin area (create, edit, enable, disable, etc.)
4
  Donate link: https://marketplace.digitalpoint.com/better-analytics.3354/item#utm_source=readme&utm_medium=wordpress&utm_campaign=plugin
5
  Requires at least: 3.8
6
  Tested up to: 4.2.2
7
+ Stable tag: 1.0.8
8
  License: GPLv2
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
183
  22. Advanced settings allow you to fine tune how the system works with Google Analytics.
184
 
185
  == Changelog ==
186
+ = 1.0.8 =
187
+ * Made a few minor cosmetic changes to Google Analytics Goal list view (including responsive)
188
+ * Moved Web Property ID slot on Test Setup tool to make it clear a new Web Property can be automatically created if needed (new site)
189
+ * Changed how settings are passed to JavaScript code to make plugin more compatible with systems that attempt to alter/consolidate JavaScript files (Google PageSpeed and WordPress caching systems)
190
+ * Feature: Advanced setting that allows the author of a post to view Page Analytics regardless of role
191
+ * Added stubs and API calls for Google Analytics Experiments management
192
+
193
  = 1.0.7 =
194
  * Feature: Added support for tracking RevContent ad clicks
195
  * Feature: Manage Google Analytics Goals from within WordPress admin area (create, edit, enable, disable, etc.)