Version Description
- Initial release
Download this release
Release Info
Developer | digitalpoint |
Plugin | Better Google Analytics |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- assets/chosen/bower.json +53 -0
- assets/chosen/chosen-sprite.png +0 -0
- assets/chosen/chosen-sprite@2x.png +0 -0
- assets/chosen/chosen.jquery.min.js +2 -0
- assets/chosen/chosen.min.css +3 -0
- assets/digitalpoint/css/admin.css +1 -0
- assets/digitalpoint/js/admin.js +23 -0
- assets/tooltipster/README.md +65 -0
- assets/tooltipster/css/tooltipster.css +274 -0
- assets/tooltipster/js/jquery.tooltipster.min.js +1 -0
- better-analytics.php +58 -0
- js/ba.js +11 -0
- js/loader.php +9 -0
- js/universal.php +172 -0
- languages/better-analytics.pot +1841 -0
- library/DigitalPointBetterAnalytics/Base/Admin.php +456 -0
- library/DigitalPointBetterAnalytics/Base/Pro.php +12 -0
- library/DigitalPointBetterAnalytics/Base/Public.php +448 -0
- library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php +718 -0
- library/DigitalPointBetterAnalytics/CronEntry/Jobs.php +35 -0
- library/DigitalPointBetterAnalytics/Helper/Analytics.php +43 -0
- library/DigitalPointBetterAnalytics/Helper/Analytics/Abstract.php +292 -0
- library/DigitalPointBetterAnalytics/Helper/Analytics/Advanced.php +6 -0
- library/DigitalPointBetterAnalytics/Helper/Api.php +19 -0
- library/DigitalPointBetterAnalytics/Helper/Reporting.php +148 -0
- library/DigitalPointBetterAnalytics/Helper/Reporting/Abstract.php +551 -0
- library/DigitalPointBetterAnalytics/Helper/Reporting/Advanced.php +6 -0
- library/DigitalPointBetterAnalytics/Install.php +35 -0
- library/DigitalPointBetterAnalytics/Model/Widget.php +66 -0
- library/DigitalPointBetterAnalytics/ViewAdmin/config.php +810 -0
- library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php +91 -0
- library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php +111 -0
- library/DigitalPointBetterAnalytics/ViewAdmin/reports/events.php +37 -0
- library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php +131 -0
- library/DigitalPointBetterAnalytics/ViewAdmin/test.php +314 -0
- library/DigitalPointBetterAnalytics/Widget/PopularPosts.php +119 -0
- readme.txt +136 -0
assets/chosen/bower.json
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "chosen",
|
3 |
+
"description": "Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in both jQuery and Prototype flavors.",
|
4 |
+
"version": "1.4.2",
|
5 |
+
"main": [
|
6 |
+
"chosen.jquery.min.js",
|
7 |
+
"chosen.css",
|
8 |
+
"chosen-sprite@2x.png",
|
9 |
+
"chosen-sprite.png"
|
10 |
+
],
|
11 |
+
"license": [
|
12 |
+
{
|
13 |
+
"type": "MIT",
|
14 |
+
"url": "https://github.com/harvesthq/chosen/blob/master/LICENSE.md"
|
15 |
+
}
|
16 |
+
],
|
17 |
+
"ignore": [],
|
18 |
+
"keywords": [
|
19 |
+
"select",
|
20 |
+
"multiselect",
|
21 |
+
"dropdown",
|
22 |
+
"form",
|
23 |
+
"input",
|
24 |
+
"ui"
|
25 |
+
],
|
26 |
+
"authors": [
|
27 |
+
{
|
28 |
+
"name": "Patrick Filler",
|
29 |
+
"url": "https://github.com/pfiller"
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"name": "Christophe Coevoet",
|
33 |
+
"url": "https://github.com/stof"
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"name": "Ken Earley",
|
37 |
+
"url": "https://github.com/kenearley"
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"name": "Koen Punt",
|
41 |
+
"url": "https://github.com/koenpunt"
|
42 |
+
}
|
43 |
+
],
|
44 |
+
"homepage": "http://harvesthq.github.io/chosen/",
|
45 |
+
"repository": {
|
46 |
+
"type": "git",
|
47 |
+
"url": "https://github.com/harvesthq/chosen"
|
48 |
+
},
|
49 |
+
"dependencies": {
|
50 |
+
"jquery": ">=1.4.4"
|
51 |
+
},
|
52 |
+
"devDependencies": []
|
53 |
+
}
|
assets/chosen/chosen-sprite.png
ADDED
Binary file
|
assets/chosen/chosen-sprite@2x.png
ADDED
Binary file
|
assets/chosen/chosen.jquery.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/* Chosen v1.4.2 | (c) 2011-2015 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
|
2 |
+
(function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c)));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):"":""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return a.search_match||a.group_match?a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d instanceof Chosen?d.destroy():d instanceof Chosen||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);
|
assets/chosen/chosen.min.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/* Chosen v1.4.2 | (c) 2011-2015 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
|
2 |
+
|
3 |
+
.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;*display:inline;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container .search-choice .group-name,.chosen-container .chosen-single .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .search-choice .group-name:after,.chosen-container .chosen-single .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(chosen-sprite.png) no-repeat 100% -20px;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:transparent!important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:0;background:transparent}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single-nosearch .chosen-search,.chosen-rtl .chosen-drop{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:0}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:#fff url(chosen-sprite.png) no-repeat -30px -20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-rtl .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-container-single .chosen-search input[type=text],.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
|
assets/digitalpoint/css/admin.css
ADDED
@@ -0,0 +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 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 .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}
|
assets/digitalpoint/js/admin.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var BetterAnalyticsAdmin={};jQuery.easing.easeOutExpo=function(a,g,f,k,b){return g==b?f+k:k*(-Math.pow(2,-10*g/b)+1)+f};
|
2 |
+
!function(a,g,f,k){BetterAnalyticsAdmin.Admin=function(){this.__construct()};BetterAnalyticsAdmin.Admin.prototype={__construct:function(){a(f).ready(function(){a("#better-analytics_tabs.nav-tab-wrapper").length&&BetterAnalyticsAdmin._Admin.init_tabs();"function"==typeof a().tooltipster&&a(".tooltip").tooltipster({contentAsHTML:!0,animation:"grow",interactive:!0,speed:150,maxWidth:600,theme:"tooltipster-better_analytics"});"function"==typeof a().chosen&&(a(".chosen-charts").chosen({search_contains:!0,
|
3 |
+
width:"80%"}),a(".chosen-select").not("#ba_pick_profile").chosen({search_contains:!0,width:"100%"}),a("#ba_pick_profile.chosen-select").chosen({search_contains:!0,width:"70%"}));a("#ba_realtime").on("change",function(){this.checked?(a("#ba_history select").prop("disabled",!0),a("#ba_history").css("color","grey")):(a("#ba_history select").prop("disabled",!1),a("#ba_history").css("color","inherit"))});a("#ba_api_use_own").length&&(a("#ba_api_use_own").on("change",function(){BetterAnalyticsAdmin._Admin.toggle_credentials()}),
|
4 |
+
BetterAnalyticsAdmin._Admin.toggle_credentials());a("#ba_pick_profile").on("change",function(){a(this).val()&&a("#ba_property_id").val(a(this).val())});a("#dashboard-widgets #better-analytics select").length&&(a("#dashboard-widgets #better-analytics select,#dashboard-widgets #better-analytics input").on("change",function(){BetterAnalyticsAdmin._Admin.chart_draw()}),BetterAnalyticsAdmin._Admin.chart_draw());a("#Heatmap").length&&(BetterAnalyticsAdmin._Admin.heatmap_draw(),a("#Heatmap + form #parameters input,#Heatmap + form #parameters select").on("change",
|
5 |
+
function(){BetterAnalyticsAdmin._Admin.get_new_heatmap_data()}));a("#area_chart").length&&(BetterAnalyticsAdmin._Admin.get_new_area_chart_data(),a("#area_chart + form #parameters input,#area_chart + form #parameters select").on("change",function(){BetterAnalyticsAdmin._Admin.get_new_area_chart_data()}));a(".ba_monitor_form").length&&(BetterAnalyticsAdmin._Admin.get_new_monitor_data(),a(".ba_monitor_form input").on("change",function(){BetterAnalyticsAdmin._Admin.get_new_monitor_data()}))})},init_tabs:function(){var b=
|
6 |
+
g.location.hash.slice(5);b||(b=a(".nav-tab:first").prop("id").slice(0,-4));BetterAnalyticsAdmin._Admin.select_tab(b);a("#better-analytics_tabs a").each(function(){a(this).on("click",BetterAnalyticsAdmin._Admin.select_tab)})},select_tab:function(b){b="object"===typeof b?a(b.currentTarget.hash.slice(4)+"-tab"):a("#"+b+"-tab");try{a("#ba_current_tab").val(a(b).prop("id").slice(0,-4))}catch(f){a("#ba_current_tab").val("general")}a(".nav-tab").removeClass("nav-tab-active");b.addClass("nav-tab-active");
|
7 |
+
a(".tab_content").css("display","none");a(".group_"+a("#ba_current_tab").val()).not(".api_hideable").fadeIn();BetterAnalyticsAdmin._Admin.toggle_credentials();a(".group_"+a("#ba_current_tab").val()+" .pro").length?a("#better-analytics_sidebar .pro").fadeIn():a("#better-analytics_sidebar .pro").fadeOut()},min:999999999,max:0,range:0,toggle_credentials:function(){a("#ba_api_use_own").prop("checked")&&"api"==a("#ba_current_tab").val()?a(".api_hideable").fadeIn():a(".api_hideable").fadeOut()},heatmap_draw:function(){BetterAnalyticsAdmin._Admin.min=
|
8 |
+
999999999;BetterAnalyticsAdmin._Admin.max=0;a(".cell[data-val]").each(function(b,f){var c=a(f).data("val");BetterAnalyticsAdmin._Admin.min>c&&(BetterAnalyticsAdmin._Admin.min=c);BetterAnalyticsAdmin._Admin.max<c&&(BetterAnalyticsAdmin._Admin.max=c)});BetterAnalyticsAdmin._Admin.range=BetterAnalyticsAdmin._Admin.max-BetterAnalyticsAdmin._Admin.min;a(".cell[data-val]").each(function(b,f){var c=a(f).data("val");a(f).css("opacity",0==BetterAnalyticsAdmin._Admin.range?1:(c-BetterAnalyticsAdmin._Admin.min)/
|
9 |
+
BetterAnalyticsAdmin._Admin.range)})},get_new_heatmap_data:function(){a(".ba_error").remove();a("#chart_loading").css("opacity",1);a.ajax(ajaxurl,{method:"POST",data:{action:"better-analytics_heatmaps",metric:a("#ba_metric").val(),segment:a("#ba_segment").val(),weeks:a("#ba_weeks").val(),end:a("#ba_end").val()},complete:function(){a("#chart_loading").css("opacity",0)}}).done(function(b,f){void 0===b.error?(a.each(b.heatmap_data,function(b,e){a.each(e,function(d,e){a("#slot"+b+"-"+d).data("val",e)})}),
|
10 |
+
BetterAnalyticsAdmin._Admin.heatmap_draw()):BetterAnalyticsAdmin._Admin.hasResponseError(b,f)})},get_new_area_chart_data:function(){a(".ba_error").remove();a("#chart_loading").css("opacity",1);a.ajax(ajaxurl,{method:"POST",data:{action:"better-analytics_area_charts",dimension:a("#ba_dimension").val(),time_frame:a("#ba_time_frame").val(),scope:a("#ba_scope").val(),minimum:a("#ba_minimum").val(),chart_type:a("input[name=chart_type]:checked").val()},complete:function(){a("#chart_loading").css("opacity",
|
11 |
+
0)}}).done(function(b,h){if(void 0===b.error){a.each(b.chart_data,function(a,c){0<a&&(dateString=String(c[0]),8==dateString.length?b.chart_data[a][0]=new Date(dateString.slice(0,4),dateString.slice(4,6)-1,dateString.slice(6,8)):6==dateString.length&&(b.chart_data[a][0]=new Date(dateString.slice(0,4),dateString.slice(4,6)-1)))});var c=google.visualization.arrayToDataTable(b.chart_data),e=new google.visualization.NumberFormat({fractionDigits:0});a.each(b.chart_data[0],function(a,b){0<a&&e.format(c,
|
12 |
+
a)});var d={title:b.title,isStacked:b.chart_type,hAxis:{format:""},legend:{position:"bottom"},backgroundColor:"transparent",width:a("#area_chart").width(),height:.6*a("#area_chart").width()};(new google.visualization.AreaChart(f.getElementById("area_chart"))).draw(c,d)}else BetterAnalyticsAdmin._Admin.hasResponseError(b,h)})},get_new_monitor_data:function(){a(".ba_error").remove();a("#chart_loading").css("opacity",1);a.ajax(ajaxurl,{method:"POST",data:{action:"better-analytics_"+a("#ba_monitor").data("type"),
|
13 |
+
days:a("#ba_days").val()},complete:function(){a("#chart_loading").css("opacity",0)}}).done(function(b,h){if(void 0===b.error){if("object"==typeof b.chart_data){var c=google.visualization.arrayToDataTable(b.chart_data);(new google.visualization.NumberFormat({fractionDigits:0})).format(c,1);var e={width:a("#ba_monitor").width(),allowHtml:!0,page:"enable",pageSize:25};(new google.visualization.Table(f.getElementById("ba_monitor"))).draw(c,e)}}else BetterAnalyticsAdmin._Admin.hasResponseError(b,h)})},
|
14 |
+
last_timeout_id:null,chart_draw:function(){a.ajax(ajaxurl,{method:"POST",data:{action:"better-analytics_charts",metric:a("#ba_metric").val(),dimension:a("#ba_dimension").val(),days:a("#ba_days").val(),realtime:a("#ba_realtime").prop("checked")?1:0}}).done(function(b,h){if(void 0===b.error)if("object"==typeof b.realtime_data?(BetterAnalyticsAdmin._Admin.last_timeout_id=setTimeout(BetterAnalyticsAdmin._Admin.chart_draw,6E4),a("#ba_chart").slideUp(),a("#ba_realtime_charts").slideDown()):(clearTimeout(BetterAnalyticsAdmin._Admin.last_timeout_id),
|
15 |
+
a("#ba_realtime_charts").slideUp(),a("#ba_chart").slideDown()),"object"==typeof b.realtime_data){var c=b.realtime_data.users,e=c-a("#ba_rt_users .number").data("number");a("#ba_rt_users .number").data("number",c);0!=e&&(a("#ba_rt_users .number").addClass(0<e?"up":"down"),setTimeout("jQuery('#ba_rt_users .number').removeClass('up down')",1));a("#ba_rt_users .number").animate({val:parseInt(c)},{easing:"easeOutExpo",duration:5E3,step:function(b){a(this).html(parseInt(b).toString().replace(/\B(?=(\d{3})+(?!\d))/g,
|
16 |
+
","))}});if("object"==typeof b.realtime_data.country){var c=google.visualization.arrayToDataTable(b.realtime_data.country),d=new google.visualization.NumberFormat({fractionDigits:0});d.format(c,1);e={title:b.realtime_data.devices[0][0],animation:{startup:!0},width:a("#ba_rt_map").width(),height:.7*a("#ba_rt_map").width()};d=new google.visualization.GeoChart(f.getElementById("ba_rt_map"));d.draw(c,e)}"object"==typeof b.realtime_data.medium&&(c=google.visualization.arrayToDataTable(b.realtime_data.medium),
|
17 |
+
d=new google.visualization.NumberFormat({fractionDigits:0}),d.format(c,1),e={title:b.realtime_data.medium[0][0],is3D:!0,animation:{startup:!0},width:a("#ba_rt_medium").width(),height:.7*a("#ba_rt_medium").width()},d=new google.visualization.PieChart(f.getElementById("ba_rt_medium")),d.draw(c,e));"object"==typeof b.realtime_data.devices&&(c=google.visualization.arrayToDataTable(b.realtime_data.devices),d=new google.visualization.NumberFormat({fractionDigits:0}),d.format(c,1),e={title:b.realtime_data.devices[0][0],
|
18 |
+
is3D:!0,animation:{startup:!0},width:a("#ba_rt_device").width(),height:.7*a("#ba_rt_device").width()},d=new google.visualization.PieChart(f.getElementById("ba_rt_device")),d.draw(c,e));e={width:a("#ba_rt_keywords").width(),allowHtml:!0,page:"enable"};"object"==typeof b.realtime_data.keywords&&(c=google.visualization.arrayToDataTable(b.realtime_data.keywords),d=new google.visualization.NumberFormat({fractionDigits:0}),d.format(c,1),d=new google.visualization.Table(f.getElementById("ba_rt_keywords")),
|
19 |
+
d.draw(c,e));"object"==typeof b.realtime_data.referral_path&&(a.each(b.realtime_data.referral_path,function(a,c){0<a&&"(not set)"!=c[0]&&(b.realtime_data.referral_path[a]=['<a href="http://'+c[0]+'" target="_blank">'+c[0]+"</a>",c[1]])}),c=google.visualization.arrayToDataTable(b.realtime_data.referral_path),d=new google.visualization.Table(f.getElementById("ba_rt_referral_path")),d.draw(c,e));"object"==typeof b.realtime_data.page_path&&(a.each(b.realtime_data.page_path,function(a,c){0<a&&"(not set)"!=
|
20 |
+
c[0]&&(b.realtime_data.page_path[a]=['<a href="'+c[0]+'" target="_blank">'+c[0]+"</a>",c[1]])}),c=google.visualization.arrayToDataTable(b.realtime_data.page_path),d=new google.visualization.Table(f.getElementById("ba_rt_page_path")),d.draw(c,e))}else if("p"==b.type)c=google.visualization.arrayToDataTable(b.chart_data),d=new google.visualization.NumberFormat({fractionDigits:0}),d.format(c,1),e={title:b.title,is3D:!0,animation:{startup:!0},width:a("#ba_chart").width(),height:.7*a("#ba_chart").width()},
|
21 |
+
d=new google.visualization.PieChart(f.getElementById("ba_chart")),d.draw(c,e);else if("l"==b.type){var g=[];a.each(b.chart_data,function(a,b){0<a?(dateString=String(b[0]),g[a]=[new Date(dateString.slice(0,4),dateString.slice(4,6)-1,dateString.slice(6,8)),Number(b[1])]):g[a]=[b[0],b[1]]});c=google.visualization.arrayToDataTable(g);d=new google.visualization.NumberFormat({fractionDigits:0});d.format(c,1);e={animation:{startup:!0},width:a("#ba_chart").width(),height:.7*a("#ba_chart").width(),legend:{position:"bottom"}};
|
22 |
+
d=new google.visualization.LineChart(f.getElementById("ba_chart"));d.draw(c,e)}else"g"==b.type&&(c=google.visualization.arrayToDataTable(b.chart_data),d=new google.visualization.NumberFormat({fractionDigits:0}),d.format(c,1),e={title:b.title,animation:{startup:!0},width:a("#ba_chart").width(),height:.7*a("#ba_chart").width()},d=new google.visualization.GeoChart(f.getElementById("ba_chart")),d.draw(c,e));else BetterAnalyticsAdmin._Admin.hasResponseError(b,h)})},hasResponseError:function(b,f){a('<div class="ba_error">'+
|
23 |
+
b.error+'<input type="submit" class="dismiss button button-primary" value="Okay"></div>').appendTo("body");a(".ba_error .dismiss").on("click",function(){a(this).closest(".ba_error").remove()});console.log(b.error)}};BetterAnalyticsAdmin._Admin=new BetterAnalyticsAdmin.Admin}(jQuery,this,document);
|
assets/tooltipster/README.md
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Tooltipster
|
2 |
+
===========
|
3 |
+
|
4 |
+
A jQuery tooltip plugin by Caleb Jacob under MIT license.
|
5 |
+
Compatible with Mozilla Firefox, Google Chrome, IE8+ and others. Requires jQuery 1.7+
|
6 |
+
|
7 |
+
A reminder of options/methods lies below. For detailed documentation, visit http://iamceege.github.io/tooltipster/
|
8 |
+
|
9 |
+
Options
|
10 |
+
-------------------------
|
11 |
+
|
12 |
+
animation
|
13 |
+
arrow
|
14 |
+
arrowColor
|
15 |
+
autoClose
|
16 |
+
content
|
17 |
+
contentAsHTML
|
18 |
+
contentCloning
|
19 |
+
debug
|
20 |
+
delay
|
21 |
+
minWidth
|
22 |
+
maxWidth
|
23 |
+
functionInit
|
24 |
+
functionBefore
|
25 |
+
functionReady
|
26 |
+
functionAfter
|
27 |
+
hideOnClick
|
28 |
+
icon
|
29 |
+
iconCloning
|
30 |
+
iconDesktop
|
31 |
+
iconTheme
|
32 |
+
iconTouch
|
33 |
+
interactive
|
34 |
+
interactiveTolerance
|
35 |
+
multiple
|
36 |
+
offsetX
|
37 |
+
offsetY
|
38 |
+
onlyOne
|
39 |
+
position
|
40 |
+
positionTracker
|
41 |
+
positionTrackerCallback
|
42 |
+
restoration
|
43 |
+
speed
|
44 |
+
timer
|
45 |
+
theme
|
46 |
+
touchDevices
|
47 |
+
trigger
|
48 |
+
updateAnimation
|
49 |
+
|
50 |
+
Methods
|
51 |
+
-------------------------
|
52 |
+
|
53 |
+
$.fn.tooltipster('setDefaults', {})
|
54 |
+
$(...).tooltipster('show' [, callback])
|
55 |
+
$(...).tooltipster('hide' [, callback])
|
56 |
+
$(...).tooltipster('disable')
|
57 |
+
$(...).tooltipster('enable')
|
58 |
+
$(...).tooltipster('destroy')
|
59 |
+
$(...).tooltipster('content')
|
60 |
+
$(...).tooltipster('content', myNewContent)
|
61 |
+
$(...).tooltipster('option', optionName)
|
62 |
+
$(...).tooltipster('option', optionName, optionValue)
|
63 |
+
$(...).tooltipster('reposition')
|
64 |
+
$(...).tooltipster('elementTooltip')
|
65 |
+
$(...).tooltipster('elementIcon')
|
assets/tooltipster/css/tooltipster.css
ADDED
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* This is the default Tooltipster theme (feel free to modify or duplicate and create multiple themes!): */
|
2 |
+
.tooltipster-default {
|
3 |
+
border-radius: 5px;
|
4 |
+
border: 2px solid #000;
|
5 |
+
background: #4c4c4c;
|
6 |
+
color: #fff;
|
7 |
+
}
|
8 |
+
|
9 |
+
/* Use this next selector to style things like font-size and line-height: */
|
10 |
+
.tooltipster-default .tooltipster-content {
|
11 |
+
font-family: Arial, sans-serif;
|
12 |
+
font-size: 14px;
|
13 |
+
line-height: 16px;
|
14 |
+
padding: 8px 10px;
|
15 |
+
overflow: hidden;
|
16 |
+
}
|
17 |
+
|
18 |
+
/* This next selector defines the color of the border on the outside of the arrow. This will automatically match the color and size of the border set on the main tooltip styles. Set display: none; if you would like a border around the tooltip but no border around the arrow */
|
19 |
+
.tooltipster-default .tooltipster-arrow .tooltipster-arrow-border {
|
20 |
+
/* border-color: ... !important; */
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
/* If you're using the icon option, use this next selector to style them */
|
25 |
+
.tooltipster-icon {
|
26 |
+
cursor: help;
|
27 |
+
margin-left: 4px;
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
/* This is the base styling required to make all Tooltipsters work */
|
38 |
+
.tooltipster-base {
|
39 |
+
padding: 0;
|
40 |
+
font-size: 0;
|
41 |
+
line-height: 0;
|
42 |
+
position: absolute;
|
43 |
+
left: 0;
|
44 |
+
top: 0;
|
45 |
+
z-index: 9999999;
|
46 |
+
pointer-events: none;
|
47 |
+
width: auto;
|
48 |
+
overflow: visible;
|
49 |
+
}
|
50 |
+
.tooltipster-base .tooltipster-content {
|
51 |
+
overflow: hidden;
|
52 |
+
}
|
53 |
+
|
54 |
+
|
55 |
+
/* These next classes handle the styles for the little arrow attached to the tooltip. By default, the arrow will inherit the same colors and border as what is set on the main tooltip itself. */
|
56 |
+
.tooltipster-arrow {
|
57 |
+
display: block;
|
58 |
+
text-align: center;
|
59 |
+
width: 100%;
|
60 |
+
height: 100%;
|
61 |
+
position: absolute;
|
62 |
+
top: 0;
|
63 |
+
left: 0;
|
64 |
+
z-index: -1;
|
65 |
+
}
|
66 |
+
.tooltipster-arrow span, .tooltipster-arrow-border {
|
67 |
+
display: block;
|
68 |
+
width: 0;
|
69 |
+
height: 0;
|
70 |
+
position: absolute;
|
71 |
+
}
|
72 |
+
.tooltipster-arrow-top span, .tooltipster-arrow-top-right span, .tooltipster-arrow-top-left span {
|
73 |
+
border-left: 8px solid transparent !important;
|
74 |
+
border-right: 8px solid transparent !important;
|
75 |
+
border-top: 8px solid;
|
76 |
+
bottom: -7px;
|
77 |
+
}
|
78 |
+
.tooltipster-arrow-top .tooltipster-arrow-border, .tooltipster-arrow-top-right .tooltipster-arrow-border, .tooltipster-arrow-top-left .tooltipster-arrow-border {
|
79 |
+
border-left: 9px solid transparent !important;
|
80 |
+
border-right: 9px solid transparent !important;
|
81 |
+
border-top: 9px solid;
|
82 |
+
bottom: -7px;
|
83 |
+
}
|
84 |
+
|
85 |
+
.tooltipster-arrow-bottom span, .tooltipster-arrow-bottom-right span, .tooltipster-arrow-bottom-left span {
|
86 |
+
border-left: 8px solid transparent !important;
|
87 |
+
border-right: 8px solid transparent !important;
|
88 |
+
border-bottom: 8px solid;
|
89 |
+
top: -7px;
|
90 |
+
}
|
91 |
+
.tooltipster-arrow-bottom .tooltipster-arrow-border, .tooltipster-arrow-bottom-right .tooltipster-arrow-border, .tooltipster-arrow-bottom-left .tooltipster-arrow-border {
|
92 |
+
border-left: 9px solid transparent !important;
|
93 |
+
border-right: 9px solid transparent !important;
|
94 |
+
border-bottom: 9px solid;
|
95 |
+
top: -7px;
|
96 |
+
}
|
97 |
+
.tooltipster-arrow-top span, .tooltipster-arrow-top .tooltipster-arrow-border, .tooltipster-arrow-bottom span, .tooltipster-arrow-bottom .tooltipster-arrow-border {
|
98 |
+
left: 0;
|
99 |
+
right: 0;
|
100 |
+
margin: 0 auto;
|
101 |
+
}
|
102 |
+
.tooltipster-arrow-top-left span, .tooltipster-arrow-bottom-left span {
|
103 |
+
left: 6px;
|
104 |
+
}
|
105 |
+
.tooltipster-arrow-top-left .tooltipster-arrow-border, .tooltipster-arrow-bottom-left .tooltipster-arrow-border {
|
106 |
+
left: 5px;
|
107 |
+
}
|
108 |
+
.tooltipster-arrow-top-right span, .tooltipster-arrow-bottom-right span {
|
109 |
+
right: 6px;
|
110 |
+
}
|
111 |
+
.tooltipster-arrow-top-right .tooltipster-arrow-border, .tooltipster-arrow-bottom-right .tooltipster-arrow-border {
|
112 |
+
right: 5px;
|
113 |
+
}
|
114 |
+
.tooltipster-arrow-left span, .tooltipster-arrow-left .tooltipster-arrow-border {
|
115 |
+
border-top: 8px solid transparent !important;
|
116 |
+
border-bottom: 8px solid transparent !important;
|
117 |
+
border-left: 8px solid;
|
118 |
+
top: 50%;
|
119 |
+
margin-top: -7px;
|
120 |
+
right: -7px;
|
121 |
+
}
|
122 |
+
.tooltipster-arrow-left .tooltipster-arrow-border {
|
123 |
+
border-top: 9px solid transparent !important;
|
124 |
+
border-bottom: 9px solid transparent !important;
|
125 |
+
border-left: 9px solid;
|
126 |
+
margin-top: -8px;
|
127 |
+
}
|
128 |
+
.tooltipster-arrow-right span, .tooltipster-arrow-right .tooltipster-arrow-border {
|
129 |
+
border-top: 8px solid transparent !important;
|
130 |
+
border-bottom: 8px solid transparent !important;
|
131 |
+
border-right: 8px solid;
|
132 |
+
top: 50%;
|
133 |
+
margin-top: -7px;
|
134 |
+
left: -7px;
|
135 |
+
}
|
136 |
+
.tooltipster-arrow-right .tooltipster-arrow-border {
|
137 |
+
border-top: 9px solid transparent !important;
|
138 |
+
border-bottom: 9px solid transparent !important;
|
139 |
+
border-right: 9px solid;
|
140 |
+
margin-top: -8px;
|
141 |
+
}
|
142 |
+
|
143 |
+
|
144 |
+
/* Some CSS magic for the awesome animations - feel free to make your own custom animations and reference it in your Tooltipster settings! */
|
145 |
+
|
146 |
+
.tooltipster-fade {
|
147 |
+
opacity: 0;
|
148 |
+
-webkit-transition-property: opacity;
|
149 |
+
-moz-transition-property: opacity;
|
150 |
+
-o-transition-property: opacity;
|
151 |
+
-ms-transition-property: opacity;
|
152 |
+
transition-property: opacity;
|
153 |
+
}
|
154 |
+
.tooltipster-fade-show {
|
155 |
+
opacity: 1;
|
156 |
+
}
|
157 |
+
|
158 |
+
.tooltipster-grow {
|
159 |
+
-webkit-transform: scale(0,0);
|
160 |
+
-moz-transform: scale(0,0);
|
161 |
+
-o-transform: scale(0,0);
|
162 |
+
-ms-transform: scale(0,0);
|
163 |
+
transform: scale(0,0);
|
164 |
+
-webkit-transition-property: -webkit-transform;
|
165 |
+
-moz-transition-property: -moz-transform;
|
166 |
+
-o-transition-property: -o-transform;
|
167 |
+
-ms-transition-property: -ms-transform;
|
168 |
+
transition-property: transform;
|
169 |
+
-webkit-backface-visibility: hidden;
|
170 |
+
}
|
171 |
+
.tooltipster-grow-show {
|
172 |
+
-webkit-transform: scale(1,1);
|
173 |
+
-moz-transform: scale(1,1);
|
174 |
+
-o-transform: scale(1,1);
|
175 |
+
-ms-transform: scale(1,1);
|
176 |
+
transform: scale(1,1);
|
177 |
+
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
|
178 |
+
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
179 |
+
-moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
180 |
+
-ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
181 |
+
-o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
182 |
+
transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
183 |
+
}
|
184 |
+
|
185 |
+
.tooltipster-swing {
|
186 |
+
opacity: 0;
|
187 |
+
-webkit-transform: rotateZ(4deg);
|
188 |
+
-moz-transform: rotateZ(4deg);
|
189 |
+
-o-transform: rotateZ(4deg);
|
190 |
+
-ms-transform: rotateZ(4deg);
|
191 |
+
transform: rotateZ(4deg);
|
192 |
+
-webkit-transition-property: -webkit-transform, opacity;
|
193 |
+
-moz-transition-property: -moz-transform;
|
194 |
+
-o-transition-property: -o-transform;
|
195 |
+
-ms-transition-property: -ms-transform;
|
196 |
+
transition-property: transform;
|
197 |
+
}
|
198 |
+
.tooltipster-swing-show {
|
199 |
+
opacity: 1;
|
200 |
+
-webkit-transform: rotateZ(0deg);
|
201 |
+
-moz-transform: rotateZ(0deg);
|
202 |
+
-o-transform: rotateZ(0deg);
|
203 |
+
-ms-transform: rotateZ(0deg);
|
204 |
+
transform: rotateZ(0deg);
|
205 |
+
-webkit-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 1);
|
206 |
+
-webkit-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
|
207 |
+
-moz-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
|
208 |
+
-ms-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
|
209 |
+
-o-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
|
210 |
+
transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
|
211 |
+
}
|
212 |
+
|
213 |
+
.tooltipster-fall {
|
214 |
+
top: 0;
|
215 |
+
-webkit-transition-property: top;
|
216 |
+
-moz-transition-property: top;
|
217 |
+
-o-transition-property: top;
|
218 |
+
-ms-transition-property: top;
|
219 |
+
transition-property: top;
|
220 |
+
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
|
221 |
+
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
222 |
+
-moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
223 |
+
-ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
224 |
+
-o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
225 |
+
transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
226 |
+
}
|
227 |
+
.tooltipster-fall-show {
|
228 |
+
}
|
229 |
+
.tooltipster-fall.tooltipster-dying {
|
230 |
+
-webkit-transition-property: all;
|
231 |
+
-moz-transition-property: all;
|
232 |
+
-o-transition-property: all;
|
233 |
+
-ms-transition-property: all;
|
234 |
+
transition-property: all;
|
235 |
+
top: 0px !important;
|
236 |
+
opacity: 0;
|
237 |
+
}
|
238 |
+
|
239 |
+
.tooltipster-slide {
|
240 |
+
left: -40px;
|
241 |
+
-webkit-transition-property: left;
|
242 |
+
-moz-transition-property: left;
|
243 |
+
-o-transition-property: left;
|
244 |
+
-ms-transition-property: left;
|
245 |
+
transition-property: left;
|
246 |
+
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
|
247 |
+
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
248 |
+
-moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
249 |
+
-ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
250 |
+
-o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
251 |
+
transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
|
252 |
+
}
|
253 |
+
.tooltipster-slide.tooltipster-slide-show {
|
254 |
+
}
|
255 |
+
.tooltipster-slide.tooltipster-dying {
|
256 |
+
-webkit-transition-property: all;
|
257 |
+
-moz-transition-property: all;
|
258 |
+
-o-transition-property: all;
|
259 |
+
-ms-transition-property: all;
|
260 |
+
transition-property: all;
|
261 |
+
left: 0px !important;
|
262 |
+
opacity: 0;
|
263 |
+
}
|
264 |
+
|
265 |
+
|
266 |
+
/* CSS transition for when contenting is changing in a tooltip that is still open. The only properties that will NOT transition are: width, height, top, and left */
|
267 |
+
.tooltipster-content-changing {
|
268 |
+
opacity: 0.5;
|
269 |
+
-webkit-transform: scale(1.1, 1.1);
|
270 |
+
-moz-transform: scale(1.1, 1.1);
|
271 |
+
-o-transform: scale(1.1, 1.1);
|
272 |
+
-ms-transform: scale(1.1, 1.1);
|
273 |
+
transform: scale(1.1, 1.1);
|
274 |
+
}
|
assets/tooltipster/js/jquery.tooltipster.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
/* Tooltipster v3.3.0 */;(function(e,t,n){function s(t,n){this.bodyOverflowX;this.callbacks={hide:[],show:[]};this.checkInterval=null;this.Content;this.$el=e(t);this.$elProxy;this.elProxyPosition;this.enabled=true;this.options=e.extend({},i,n);this.mouseIsOverProxy=false;this.namespace="tooltipster-"+Math.round(Math.random()*1e5);this.Status="hidden";this.timerHide=null;this.timerShow=null;this.$tooltip;this.options.iconTheme=this.options.iconTheme.replace(".","");this.options.theme=this.options.theme.replace(".","");this._init()}function o(t,n){var r=true;e.each(t,function(e,i){if(typeof n[e]==="undefined"||t[e]!==n[e]){r=false;return false}});return r}function f(){return!a&&u}function l(){var e=n.body||n.documentElement,t=e.style,r="transition";if(typeof t[r]=="string"){return true}v=["Moz","Webkit","Khtml","O","ms"],r=r.charAt(0).toUpperCase()+r.substr(1);for(var i=0;i<v.length;i++){if(typeof t[v[i]+r]=="string"){return true}}return false}var r="tooltipster",i={animation:"fade",arrow:true,arrowColor:"",autoClose:true,content:null,contentAsHTML:false,contentCloning:true,debug:true,delay:200,minWidth:0,maxWidth:null,functionInit:function(e,t){},functionBefore:function(e,t){t()},functionReady:function(e,t){},functionAfter:function(e){},hideOnClick:false,icon:"(?)",iconCloning:true,iconDesktop:false,iconTouch:false,iconTheme:"tooltipster-icon",interactive:false,interactiveTolerance:350,multiple:false,offsetX:0,offsetY:0,onlyOne:false,position:"top",positionTracker:false,positionTrackerCallback:function(e){if(this.option("trigger")=="hover"&&this.option("autoClose")){this.hide()}},restoration:"current",speed:350,timer:0,theme:"tooltipster-default",touchDevices:true,trigger:"hover",updateAnimation:true};s.prototype={_init:function(){var t=this;if(n.querySelector){var r=null;if(t.$el.data("tooltipster-initialTitle")===undefined){r=t.$el.attr("title");if(r===undefined)r=null;t.$el.data("tooltipster-initialTitle",r)}if(t.options.content!==null){t._content_set(t.options.content)}else{t._content_set(r)}var i=t.options.functionInit.call(t.$el,t.$el,t.Content);if(typeof i!=="undefined")t._content_set(i);t.$el.removeAttr("title").addClass("tooltipstered");if(!u&&t.options.iconDesktop||u&&t.options.iconTouch){if(typeof t.options.icon==="string"){t.$elProxy=e('<span class="'+t.options.iconTheme+'"></span>');t.$elProxy.text(t.options.icon)}else{if(t.options.iconCloning)t.$elProxy=t.options.icon.clone(true);else t.$elProxy=t.options.icon}t.$elProxy.insertAfter(t.$el)}else{t.$elProxy=t.$el}if(t.options.trigger=="hover"){t.$elProxy.on("mouseenter."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=true;t._show()}}).on("mouseleave."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=false}});if(u&&t.options.touchDevices){t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})}}else if(t.options.trigger=="click"){t.$elProxy.on("click."+t.namespace,function(){if(!f()||t.options.touchDevices){t._show()}})}}},_show:function(){var e=this;if(e.Status!="shown"&&e.Status!="appearing"){if(e.options.delay){e.timerShow=setTimeout(function(){if(e.options.trigger=="click"||e.options.trigger=="hover"&&e.mouseIsOverProxy){e._showNow()}},e.options.delay)}else e._showNow()}},_showNow:function(n){var r=this;r.options.functionBefore.call(r.$el,r.$el,function(){if(r.enabled&&r.Content!==null){if(n)r.callbacks.show.push(n);r.callbacks.hide=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;if(r.options.onlyOne){e(".tooltipstered").not(r.$el).each(function(t,n){var r=e(n),i=r.data("tooltipster-ns");e.each(i,function(e,t){var n=r.data(t),i=n.status(),s=n.option("autoClose");if(i!=="hidden"&&i!=="disappearing"&&s){n.hide()}})})}var i=function(){r.Status="shown";e.each(r.callbacks.show,function(e,t){t.call(r.$el)});r.callbacks.show=[]};if(r.Status!=="hidden"){var s=0;if(r.Status==="disappearing"){r.Status="appearing";if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+r.options.animation+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.stop().fadeIn(i)}}else if(r.Status==="shown"){i()}}else{r.Status="appearing";var s=r.options.speed;r.bodyOverflowX=e("body").css("overflow-x");e("body").css("overflow-x","hidden");var o="tooltipster-"+r.options.animation,a="-webkit-transition-duration: "+r.options.speed+"ms; -webkit-animation-duration: "+r.options.speed+"ms; -moz-transition-duration: "+r.options.speed+"ms; -moz-animation-duration: "+r.options.speed+"ms; -o-transition-duration: "+r.options.speed+"ms; -o-animation-duration: "+r.options.speed+"ms; -ms-transition-duration: "+r.options.speed+"ms; -ms-animation-duration: "+r.options.speed+"ms; transition-duration: "+r.options.speed+"ms; animation-duration: "+r.options.speed+"ms;",f=r.options.minWidth?"min-width:"+Math.round(r.options.minWidth)+"px;":"",c=r.options.maxWidth?"max-width:"+Math.round(r.options.maxWidth)+"px;":"",h=r.options.interactive?"pointer-events: auto;":"";r.$tooltip=e('<div class="tooltipster-base '+r.options.theme+'" style="'+f+" "+c+" "+h+" "+a+'"><div class="tooltipster-content"></div></div>');if(l())r.$tooltip.addClass(o);r._content_insert();r.$tooltip.appendTo("body");r.reposition();r.options.functionReady.call(r.$el,r.$el,r.$tooltip);if(l()){r.$tooltip.addClass(o+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.css("display","none").fadeIn(r.options.speed,i)}r._interval_set();e(t).on("scroll."+r.namespace+" resize."+r.namespace,function(){r.reposition()});if(r.options.autoClose){e("body").off("."+r.namespace);if(r.options.trigger=="hover"){if(u){setTimeout(function(){e("body").on("touchstart."+r.namespace,function(){r.hide()})},0)}if(r.options.interactive){if(u){r.$tooltip.on("touchstart."+r.namespace,function(e){e.stopPropagation()})}var p=null;r.$elProxy.add(r.$tooltip).on("mouseleave."+r.namespace+"-autoClose",function(){clearTimeout(p);p=setTimeout(function(){r.hide()},r.options.interactiveTolerance)}).on("mouseenter."+r.namespace+"-autoClose",function(){clearTimeout(p)})}else{r.$elProxy.on("mouseleave."+r.namespace+"-autoClose",function(){r.hide()})}if(r.options.hideOnClick){r.$elProxy.on("click."+r.namespace+"-autoClose",function(){r.hide()})}}else if(r.options.trigger=="click"){setTimeout(function(){e("body").on("click."+r.namespace+" touchstart."+r.namespace,function(){r.hide()})},0);if(r.options.interactive){r.$tooltip.on("click."+r.namespace+" touchstart."+r.namespace,function(e){e.stopPropagation()})}}}}if(r.options.timer>0){r.timerHide=setTimeout(function(){r.timerHide=null;r.hide()},r.options.timer+s)}}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(e("body").find(t.$el).length===0||e("body").find(t.$elProxy).length===0||t.Status=="hidden"||e("body").find(t.$tooltip).length===0){if(t.Status=="shown"||t.Status=="appearing")t.hide();t._interval_cancel()}else{if(t.options.positionTracker){var n=t._repositionInfo(t.$elProxy),r=false;if(o(n.dimension,t.elProxyPosition.dimension)){if(t.$elProxy.css("position")==="fixed"){if(o(n.position,t.elProxyPosition.position))r=true}else{if(o(n.offset,t.elProxyPosition.offset))r=true}}if(!r){t.reposition();t.options.positionTrackerCallback.call(t,t.$el)}}}},200)},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null},_content_set:function(e){if(typeof e==="object"&&e!==null&&this.options.contentCloning){e=e.clone(true)}this.Content=e},_content_insert:function(){var e=this,t=this.$tooltip.find(".tooltipster-content");if(typeof e.Content==="string"&&!e.options.contentAsHTML){t.text(e.Content)}else{t.empty().append(e.Content)}},_update:function(e){var t=this;t._content_set(e);if(t.Content!==null){if(t.Status!=="hidden"){t._content_insert();t.reposition();if(t.options.updateAnimation){if(l()){t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!="hidden"){t.$tooltip.removeClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!=="hidden"){t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})}},t.options.speed)}},t.options.speed)}else{t.$tooltip.fadeTo(t.options.speed,.5,function(){if(t.Status!="hidden"){t.$tooltip.fadeTo(t.options.speed,1)}})}}}}else{t.hide()}},_repositionInfo:function(e){return{dimension:{height:e.outerHeight(false),width:e.outerWidth(false)},offset:e.offset(),position:{left:parseInt(e.css("left")),top:parseInt(e.css("top"))}}},hide:function(n){var r=this;if(n)r.callbacks.hide.push(n);r.callbacks.show=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;var i=function(){e.each(r.callbacks.hide,function(e,t){t.call(r.$el)});r.callbacks.hide=[]};if(r.Status=="shown"||r.Status=="appearing"){r.Status="disappearing";var s=function(){r.Status="hidden";if(typeof r.Content=="object"&&r.Content!==null){r.Content.detach()}r.$tooltip.remove();r.$tooltip=null;e(t).off("."+r.namespace);e("body").off("."+r.namespace).css("overflow-x",r.bodyOverflowX);e("body").off("."+r.namespace);r.$elProxy.off("."+r.namespace+"-autoClose");r.options.functionAfter.call(r.$el,r.$el);i()};if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-"+r.options.animation+"-show").addClass("tooltipster-dying");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(s)}else{r.$tooltip.stop().fadeOut(r.options.speed,s)}}else if(r.Status=="hidden"){i()}return r},show:function(e){this._showNow(e);return this},update:function(e){return this.content(e)},content:function(e){if(typeof e==="undefined"){return this.Content}else{this._update(e);return this}},reposition:function(){var n=this;if(e("body").find(n.$tooltip).length!==0){n.$tooltip.css("width","");n.elProxyPosition=n._repositionInfo(n.$elProxy);var r=null,i=e(t).width(),s=n.elProxyPosition,o=n.$tooltip.outerWidth(false),u=n.$tooltip.innerWidth()+1,a=n.$tooltip.outerHeight(false);if(n.$elProxy.is("area")){var f=n.$elProxy.attr("shape"),l=n.$elProxy.parent().attr("name"),c=e('img[usemap="#'+l+'"]'),h=c.offset().left,p=c.offset().top,d=n.$elProxy.attr("coords")!==undefined?n.$elProxy.attr("coords").split(","):undefined;if(f=="circle"){var v=parseInt(d[0]),m=parseInt(d[1]),g=parseInt(d[2]);s.dimension.height=g*2;s.dimension.width=g*2;s.offset.top=p+m-g;s.offset.left=h+v-g}else if(f=="rect"){var v=parseInt(d[0]),m=parseInt(d[1]),y=parseInt(d[2]),b=parseInt(d[3]);s.dimension.height=b-m;s.dimension.width=y-v;s.offset.top=p+m;s.offset.left=h+v}else if(f=="poly"){var w=[],E=[],S=0,x=0,T=0,N=0,C="even";for(var k=0;k<d.length;k++){var L=parseInt(d[k]);if(C=="even"){if(L>T){T=L;if(k===0){S=T}}if(L<S){S=L}C="odd"}else{if(L>N){N=L;if(k==1){x=N}}if(L<x){x=L}C="even"}}s.dimension.height=N-x;s.dimension.width=T-S;s.offset.top=p+x;s.offset.left=h+S}else{s.dimension.height=c.outerHeight(false);s.dimension.width=c.outerWidth(false);s.offset.top=p;s.offset.left=h}}var A=0,O=0,M=0,_=parseInt(n.options.offsetY),D=parseInt(n.options.offsetX),P=n.options.position;function H(){var n=e(t).scrollLeft();if(A-n<0){r=A-n;A=n}if(A+o-n>i){r=A-(i+n-o);A=i+n-o}}function B(n,r){if(s.offset.top-e(t).scrollTop()-a-_-12<0&&r.indexOf("top")>-1){P=n}if(s.offset.top+s.dimension.height+a+12+_>e(t).scrollTop()+e(t).height()&&r.indexOf("bottom")>-1){P=n;M=s.offset.top-a-_-12}}if(P=="top"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left+D-j/2;M=s.offset.top-a-_-12;H();B("bottom","top")}if(P=="top-left"){A=s.offset.left+D;M=s.offset.top-a-_-12;H();B("bottom-left","top-left")}if(P=="top-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top-a-_-12;H();B("bottom-right","top-right")}if(P=="bottom"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left-j/2+D;M=s.offset.top+s.dimension.height+_+12;H();B("top","bottom")}if(P=="bottom-left"){A=s.offset.left+D;M=s.offset.top+s.dimension.height+_+12;H();B("top-left","bottom-left")}if(P=="bottom-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top+s.dimension.height+_+12;H();B("top-right","bottom-right")}if(P=="left"){A=s.offset.left-D-o-12;O=s.offset.left+D+s.dimension.width+12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A<0&&O+o>i){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=o+A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);A=s.offset.left-D-q-12-I;F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A<0){A=s.offset.left+D+s.dimension.width+12;r="left"}}if(P=="right"){A=s.offset.left+D+s.dimension.width+12;O=s.offset.left-D-o-12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A+o>i&&O<0){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=i-A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A+o>i){A=s.offset.left-D-o-12;r="right"}}if(n.options.arrow){var R="tooltipster-arrow-"+P;if(n.options.arrowColor.length<1){var U=n.$tooltip.css("background-color")}else{var U=n.options.arrowColor}if(!r){r=""}else if(r=="left"){R="tooltipster-arrow-right";r=""}else if(r=="right"){R="tooltipster-arrow-left";r=""}else{r="left:"+Math.round(r)+"px;"}if(P=="top"||P=="top-left"||P=="top-right"){var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}else if(P=="bottom"||P=="bottom-left"||P=="bottom-right"){var z=parseFloat(n.$tooltip.css("border-top-width")),W=n.$tooltip.css("border-top-color")}else if(P=="left"){var z=parseFloat(n.$tooltip.css("border-right-width")),W=n.$tooltip.css("border-right-color")}else if(P=="right"){var z=parseFloat(n.$tooltip.css("border-left-width")),W=n.$tooltip.css("border-left-color")}else{var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}if(z>1){z++}var X="";if(z!==0){var V="",J="border-color: "+W+";";if(R.indexOf("bottom")!==-1){V="margin-top: -"+Math.round(z)+"px;"}else if(R.indexOf("top")!==-1){V="margin-bottom: -"+Math.round(z)+"px;"}else if(R.indexOf("left")!==-1){V="margin-right: -"+Math.round(z)+"px;"}else if(R.indexOf("right")!==-1){V="margin-left: -"+Math.round(z)+"px;"}X='<span class="tooltipster-arrow-border" style="'+V+" "+J+';"></span>'}n.$tooltip.find(".tooltipster-arrow").remove();var K='<div class="'+R+' tooltipster-arrow" style="'+r+'">'+X+'<span style="border-color:'+U+';"></span></div>';n.$tooltip.append(K)}n.$tooltip.css({top:Math.round(M)+"px",left:Math.round(A)+"px"})}return n},enable:function(){this.enabled=true;return this},disable:function(){this.hide();this.enabled=false;return this},destroy:function(){var t=this;t.hide();if(t.$el[0]!==t.$elProxy[0]){t.$elProxy.remove()}t.$el.removeData(t.namespace).off("."+t.namespace);var n=t.$el.data("tooltipster-ns");if(n.length===1){var r=null;if(t.options.restoration==="previous"){r=t.$el.data("tooltipster-initialTitle")}else if(t.options.restoration==="current"){r=typeof t.Content==="string"?t.Content:e("<div></div>").append(t.Content).html()}if(r){t.$el.attr("title",r)}t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else{n=e.grep(n,function(e,n){return e!==t.namespace});t.$el.data("tooltipster-ns",n)}return t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:undefined},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined},option:function(e,t){if(typeof t=="undefined")return this.options[e];else{this.options[e]=t;return this}},status:function(){return this.Status}};e.fn[r]=function(){var t=arguments;if(this.length===0){if(typeof t[0]==="string"){var n=true;switch(t[0]){case"setDefaults":e.extend(i,t[1]);break;default:n=false;break}if(n)return true;else return this}else{return this}}else{if(typeof t[0]==="string"){var r="#*$~&";this.each(function(){var n=e(this).data("tooltipster-ns"),i=n?e(this).data(n[0]):null;if(i){if(typeof i[t[0]]==="function"){var s=i[t[0]](t[1],t[2])}else{throw new Error('Unknown method .tooltipster("'+t[0]+'")')}if(s!==i){r=s;return false}}else{throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element')}});return r!=="#*$~&"?r:this}else{var o=[],u=t[0]&&typeof t[0].multiple!=="undefined",a=u&&t[0].multiple||!u&&i.multiple,f=t[0]&&typeof t[0].debug!=="undefined",l=f&&t[0].debug||!f&&i.debug;this.each(function(){var n=false,r=e(this).data("tooltipster-ns"),i=null;if(!r){n=true}else if(a){n=true}else if(l){console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.')}if(n){i=new s(this,t[0]);if(!r)r=[];r.push(i.namespace);e(this).data("tooltipster-ns",r);e(this).data(i.namespace,i)}o.push(i)});if(a)return o;else return this}}};var u=!!("ontouchstart"in t);var a=false;e("body").one("mousemove",function(){a=true})})(jQuery,window,document);
|
better-analytics.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package Better Analytics
|
5 |
+
*/
|
6 |
+
/*
|
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, heatmaps and realtime traffic tracking.
|
10 |
+
Version: 1.0.0
|
11 |
+
Author: Digital Point
|
12 |
+
Author URI: https://www.digitalpoint.com/
|
13 |
+
License: GPLv2
|
14 |
+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
15 |
+
Text Domain: better-analytics
|
16 |
+
Domain Path: /languages
|
17 |
+
*/
|
18 |
+
|
19 |
+
|
20 |
+
if (!function_exists('add_action'))
|
21 |
+
{
|
22 |
+
echo 'What the what?';
|
23 |
+
exit;
|
24 |
+
}
|
25 |
+
|
26 |
+
define('BETTER_ANALYTICS_VERSION', '1.0.0');
|
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');
|
30 |
+
define('BETTER_ANALYTICS_SUPPORT_URL', 'https://forums.digitalpoint.com/forums/better-analytics.31/');
|
31 |
+
|
32 |
+
define('BETTER_ANALYTICS_PLUGIN_URL', plugin_dir_url(__FILE__));
|
33 |
+
define('BETTER_ANALYTICS_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
34 |
+
|
35 |
+
load_plugin_textdomain('better-analytics');
|
36 |
+
|
37 |
+
require_once(BETTER_ANALYTICS_PLUGIN_DIR . '/library/DigitalPointBetterAnalytics/Base/Public.php');
|
38 |
+
|
39 |
+
$publicClass = 'DigitalPointBetterAnalytics_Base_Public';
|
40 |
+
|
41 |
+
spl_autoload_register(array($publicClass, 'autoload'));
|
42 |
+
|
43 |
+
// Need to add before activation hooks
|
44 |
+
add_filter( 'cron_schedules', array($publicClass, 'filter_cron_schedules' ));
|
45 |
+
|
46 |
+
register_activation_hook( __FILE__, array($publicClass, 'plugin_activation' ) );
|
47 |
+
register_deactivation_hook( __FILE__, array($publicClass, 'plugin_deactivation' ) );
|
48 |
+
register_uninstall_hook(__FILE__, array('DigitalPointBetterAnalytics_Install', 'uninstall'));
|
49 |
+
|
50 |
+
DigitalPointBetterAnalytics_Base_Public::getInstance();
|
51 |
+
|
52 |
+
add_action( 'widgets_init', array('DigitalPointBetterAnalytics_Widget_PopularPosts', 'register_widget'));
|
53 |
+
|
54 |
+
|
55 |
+
if (is_admin())
|
56 |
+
{
|
57 |
+
DigitalPointBetterAnalytics_Base_Admin::getInstance();
|
58 |
+
}
|
js/ba.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var BetterAnalytics={};
|
2 |
+
!function(a,b,d,l){BetterAnalytics.BA=function(){this.__construct()};BetterAnalytics.BA.prototype={__construct:function(){this.s=a("#ba_s").data("o");this.s.g&1073741824?this.init():a(d).ready(function(){BetterAnalytics._BA.init()})},s:null,videos:{},init:function(){this.init_start();var c="";this.s.g&2147483648&&(b.ga_debug={trace:!0},c="_debug");(function(a,e,h,f,b,c,d){a.GoogleAnalyticsObject=b;a[b]=a[b]||function(){(a[b].q=a[b].q||[]).push(arguments)};a[b].l=1*new Date;c=e.createElement(h);d=
|
3 |
+
e.getElementsByTagName(h)[0];c.async=1;c.src=f;d.parentNode.insertBefore(c,d)})(b,d,"script","//www.google-analytics.com/analytics"+c+".js","ga");ga("create",this.s.tid,this.s.co);this.s.g&32&&ga("require","displayfeatures");this.s.g&4&&ga("require","linkid","linkid.js");this.s.g&64&&ga("set","forceSSL",!0);this.s.g&16&&ga("set","anonymizeIp",!0);"object"==typeof this.s.d&&a.each(this.s.d,function(a,b){ga("set","dimension"+b[0],b[1])});if("string"==typeof this.s.js)try{eval(this.s.js)}catch(k){console.error(k.stack)}this.init_end();
|
4 |
+
ga("send","pageview");this.s.g&128&&setTimeout("ga('send','event','User','Engagement','Time on page more than 15 seconds')",15E3);this.s.g&2048&&a(d).ajaxComplete(function(a,b,c){a=d.createElement("a");a.href=c.url;ga("send","event","AJAX Request","Trigger",a.pathname)});this.s.g&512&&a(d).ready(function(){a("a").each(function(){if(this.href.slice(0,b.location.origin.length)!=b.location.origin)a(this).on("click",function(){ga("send","event","Link","Click",jQuery(this).prop("href"))})})});"string"==
|
5 |
+
typeof this.s.dl&&a(d).ready(function(){var b=new RegExp("("+BetterAnalytics._BA.s.dl+")$");a("a").each(function(){if(this.href.match(b))a(this).on("click",function(){ga("send","event","Link","Download",jQuery(this).prop("href"))})})});this.s.g&65536&&a(d).ready(function(){a(".error404").length&&ga("send","event","Error","Page Not Found",b.location.origin+b.location.pathname+" (Referrer: "+d.referrer+")")});this.s.g&256&&a(d).ready(function(){if(a('iframe[src*="youtube.com/embed"]').length){a('iframe[src*="youtube.com/embed"]').each(function(c){var f=
|
6 |
+
a(this).prop("src");-1===f.indexOf("origin=")&&a(this).prop("src",f+(-1===f.indexOf("?")?"?":"&")+"enablejsapi=1&origin="+b.location.origin);a(this).prop("id")?c=a(this).prop("id"):(c="ba_yt_"+c,a(this).prop("id",c))});var c=d.createElement("script");c.src="https://www.youtube.com/iframe_api";var e=d.getElementsByTagName("script")[0];e.parentNode.insertBefore(c,e)}});this.s.a&16&&a(b).load(function(){setTimeout(BetterAnalytics._BA.dp_bind,3E3)});this.s.s&2&&a(b).load(function(){setTimeout(function(){try{"object"==
|
7 |
+
typeof FB&&a.each({"edge.create":"Like","edge.remove":"Unlike","message.send":"Send","comment.create":"Comment","comment.remove":"Uncomment"},function(a,c){FB.Event.subscribe(a,function(a){ga("send","social","Facebook",c,a)})})}catch(c){}},1E3)});this.s.s&4&&a(b).load(function(){setTimeout(function(){try{"object"==typeof twttr&&a.each({tweet:"Tweet",follow:"Follow",retweet:"Retweet",favorite:"Favorite",click:"Click"},function(a,c){twttr.events.bind(a,function(a){if(a){var b;a.target&&"IFRAME"==a.target.nodeName&&
|
8 |
+
(b=BetterAnalytics._BA.extract_param(a.target.src,"url"));ga("send","social","Twitter",c,b)}})})}catch(c){}},1E3)});this.s.s&16&&a(b).load(function(){setTimeout(function(){try{a.each({'a[data-pin-log="button_follow"]':"Follow",'a[data-pin-log="embed_pin"]':"Pin",'a[data-pin-log="button_pinit_bookmarklet"]':"Pin"},function(c,b){a("body").on("click",c,function(a){a=d.href;"Follow"==b?a=jQuery(this).attr("href"):"Repin"==b&&(a=jQuery(this).parent().attr("href"));ga("send","social","Pinterest",b,a)})})}catch(c){}},
|
9 |
+
1E3)});this.s.s&32&&a(b).load(function(){setTimeout(function(){a(".IN-widget").on("click",function(){ga("send","social","LinkedIn","Share",b.location.href)})},1E3)})},init_start:function(){},init_end:function(){},dp_bind:function(){a(".dp_ad_inner").parent().on("click",function(){ga("send","event","Advertising","Click","Digital Point")})},yt_init:function(c){a('iframe[src*="youtube.com/embed"]').each(function(c){c=a(this).prop("id");BetterAnalytics._BA.videos[c]=new YT.Player(c,{events:{onStateChange:BetterAnalytics._BA.yt_state_change,
|
10 |
+
onError:BetterAnalytics._BA.yt_error}})})},yt_state_change:function(a){0<=a.data&&jQuery.each(YT.PlayerState,function(d,g){"number"==typeof g&&g==a.data&&ga("send","event","YouTube Video",d.charAt(0).toUpperCase()+d.substr(1).toLowerCase(),b.location.origin+b.location.pathname+" | "+a.target.getVideoData().title+" ("+a.target.getVideoUrl()+")")})},yt_error:function(a){},extract_param:function(a,b){if(a){a=a.split("#")[0];var d=a.split("?");if(1!=d.length){d=decodeURI(d[1]);paramName+="=";for(var d=
|
11 |
+
d.split("&"),e=0;b=d[e];++e)if(0===b.indexOf(paramName))return decodeURIComponent(b.split("=")[1])}}}}}(jQuery,this,document);originalYouTubeIFrame=onYouTubeIframeAPIReady;function onYouTubeIframeAPIReady(a){BetterAnalytics._BA.yt_init(a);originalYouTubeIFrame!=onYouTubeIframeAPIReady&&originalYouTubeIFrame(a)};
|
js/loader.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
header('Content-Type: application/javascript');
|
3 |
+
header('Cache-Control: public, max-age=31536000');
|
4 |
+
readfile('ba.js');
|
5 |
+
if (file_exists('../../better-analytics-pro/js/ba.js'))
|
6 |
+
{
|
7 |
+
readfile('../../better-analytics-pro/js/ba.js');
|
8 |
+
}
|
9 |
+
echo 'BetterAnalytics._BA=new BetterAnalytics.BA();';
|
js/universal.php
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
3 |
+
$betterAnalyticsInternal = get_transient('ba_int');
|
4 |
+
|
5 |
+
$createOptions = array();
|
6 |
+
|
7 |
+
$baCategories = $baTags = array();
|
8 |
+
$baAuthor = null;
|
9 |
+
|
10 |
+
// get category ID from category archives pages
|
11 |
+
global $wp_query;
|
12 |
+
if (is_object($wp_query))
|
13 |
+
{
|
14 |
+
$obj = $wp_query->get_queried_object();
|
15 |
+
if (is_object($obj) && !empty($obj->cat_ID))
|
16 |
+
{
|
17 |
+
$baCategories[$obj->cat_ID] = $obj->name;
|
18 |
+
}
|
19 |
+
|
20 |
+
if (is_object($obj) && !empty($obj->term_id) && empty($obj->cat_ID))
|
21 |
+
{
|
22 |
+
$baTags[$obj->term_id] = $obj->name;
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
if (!count($baCategories) && !is_front_page())
|
28 |
+
{
|
29 |
+
$categoryList = get_the_category();
|
30 |
+
if (count($categoryList))
|
31 |
+
{
|
32 |
+
foreach ($categoryList as $item)
|
33 |
+
{
|
34 |
+
if (intval($item->cat_ID) > 0)
|
35 |
+
{
|
36 |
+
$baCategories[$item->cat_ID] = $item->name;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
if ($post = get_post())
|
42 |
+
{
|
43 |
+
if ($post->post_author > 0)
|
44 |
+
{
|
45 |
+
$baAuthor = get_the_author_meta('display_name', $post->post_author);
|
46 |
+
}
|
47 |
+
|
48 |
+
if (!$baTags)
|
49 |
+
{
|
50 |
+
$tagList = wp_get_post_tags($post->ID);
|
51 |
+
if (count($tagList))
|
52 |
+
{
|
53 |
+
foreach ($tagList as $tag)
|
54 |
+
{
|
55 |
+
$baTags[$tag->term_id] = $tag->name;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
$jsonOptions = array('tid' => @$betterAnalyticsOptions['property_id']);
|
64 |
+
|
65 |
+
$currentUser = wp_get_current_user();
|
66 |
+
if (@$betterAnalyticsOptions['track_userid'] && @$currentUser->ID > 0)
|
67 |
+
{
|
68 |
+
$createOptions['userId'] = intval($currentUser->ID);
|
69 |
+
}
|
70 |
+
|
71 |
+
if (@$betterAnalyticsOptions['sample_rate'] > 0 && $betterAnalyticsOptions['sample_rate'] < 100)
|
72 |
+
{
|
73 |
+
$createOptions['sampleRate'] = intval($betterAnalyticsOptions['sample_rate']);
|
74 |
+
}
|
75 |
+
|
76 |
+
if (!$createOptions)
|
77 |
+
{
|
78 |
+
$createOptions = 'auto';
|
79 |
+
}
|
80 |
+
|
81 |
+
$jsonOptions['co'] = $createOptions;
|
82 |
+
|
83 |
+
|
84 |
+
if (!empty($betterAnalyticsOptions['extra_js']))
|
85 |
+
{
|
86 |
+
$jsonOptions['js'] = $betterAnalyticsOptions['extra_js'];
|
87 |
+
}
|
88 |
+
|
89 |
+
$jsonOptions['g'] =
|
90 |
+
(@$betterAnalyticsInternal['v'] ? 1 : 0) +
|
91 |
+
(@$betterAnalyticsOptions['link_attribution'] ? 4 : 0) +
|
92 |
+
(@$betterAnalyticsOptions['track_userid'] ? 8 : 0) +
|
93 |
+
(@$betterAnalyticsOptions['anonymize_ips'] ? 16 : 0) +
|
94 |
+
(@$betterAnalyticsOptions['demographic_tracking'] ? 32 : 0) +
|
95 |
+
(@$betterAnalyticsOptions['force_ssl'] ? 64 : 0) +
|
96 |
+
(@$betterAnalyticsOptions['events']['user_engagement'] ? 128 : 0) +
|
97 |
+
(@$betterAnalyticsOptions['events']['youtube'] ? 256 : 0) +
|
98 |
+
(@$betterAnalyticsOptions['events']['link_click'] ? 512 : 0) +
|
99 |
+
(@$betterAnalyticsOptions['events']['missing_images'] ? 1024 : 0) +
|
100 |
+
(@$betterAnalyticsOptions['events']['ajax_request'] ? 2048 : 0) +
|
101 |
+
(@$betterAnalyticsOptions['events']['error_js'] ? 4096 : 0) +
|
102 |
+
(@$betterAnalyticsOptions['events']['error_ajax'] ? 8192 : 0) +
|
103 |
+
(@$betterAnalyticsOptions['events']['error_console'] ? 16384 : 0) +
|
104 |
+
(@$betterAnalyticsOptions['events']['error_youtube'] ? 32768 : 0) +
|
105 |
+
(@$betterAnalyticsOptions['events']['error_404'] ? 65536 : 0) +
|
106 |
+
|
107 |
+
|
108 |
+
(@$betterAnalyticsOptions['javascript']['run_time'] == 'immediately' ? 1073741824 : 0) +
|
109 |
+
(@$betterAnalyticsOptions['debugging'] ? 2147483648 : 0)
|
110 |
+
|
111 |
+
;
|
112 |
+
|
113 |
+
if (!empty($betterAnalyticsOptions['events']['downloads']) && !empty($betterAnalyticsOptions['file_extensions']))
|
114 |
+
{
|
115 |
+
$jsonOptions['dl'] = '\.' . implode('|\.', $betterAnalyticsOptions['file_extensions']);
|
116 |
+
}
|
117 |
+
|
118 |
+
$jsonOptions['s'] =
|
119 |
+
(@$betterAnalyticsInternal['v'] ? 1 : 0) +
|
120 |
+
(@$betterAnalyticsOptions['social']['facebook'] ? 2 : 0) +
|
121 |
+
(@$betterAnalyticsOptions['social']['twitter'] ? 4 : 0) +
|
122 |
+
// (@$betterAnalyticsOptions['social']['google'] ? 8 : 0) +
|
123 |
+
(@$betterAnalyticsOptions['social']['pinterest'] ? 16 : 0) +
|
124 |
+
(@$betterAnalyticsOptions['social']['linkedin'] ? 32 : 0)
|
125 |
+
;
|
126 |
+
|
127 |
+
$jsonOptions['a'] =
|
128 |
+
(@$betterAnalyticsInternal['v'] ? 1 : 0) +
|
129 |
+
(@$betterAnalyticsOptions['ads']['adsense'] ? 2 : 0) +
|
130 |
+
(@$betterAnalyticsOptions['ads']['outbrain'] ? 4 : 0) +
|
131 |
+
(@$betterAnalyticsOptions['ads']['taboola'] ? 8 : 0) +
|
132 |
+
(@$betterAnalyticsOptions['ads']['digitalpoint'] ? 16 : 0)
|
133 |
+
;
|
134 |
+
|
135 |
+
if (!empty($betterAnalyticsOptions['dimension']['category']) && $baCategories)
|
136 |
+
{
|
137 |
+
$jsonOptions['d']['c'] = array(
|
138 |
+
intval($betterAnalyticsOptions['dimension']['category']),
|
139 |
+
implode(',', $baCategories)
|
140 |
+
);
|
141 |
+
}
|
142 |
+
|
143 |
+
if (!empty($betterAnalyticsOptions['dimension']['author']) && $baAuthor)
|
144 |
+
{
|
145 |
+
$jsonOptions['d']['a'] = array(
|
146 |
+
intval($betterAnalyticsOptions['dimension']['author']),
|
147 |
+
$baAuthor
|
148 |
+
);
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
+
if (!empty($betterAnalyticsOptions['dimension']['tag']) && $baTags)
|
153 |
+
{
|
154 |
+
$jsonOptions['d']['t'] = array(
|
155 |
+
intval($betterAnalyticsOptions['dimension']['tag']),
|
156 |
+
implode(',', $baTags)
|
157 |
+
);
|
158 |
+
}
|
159 |
+
|
160 |
+
if (!empty($betterAnalyticsOptions['dimension']['user']) && @$currentUser->ID > 0)
|
161 |
+
{
|
162 |
+
$jsonOptions['d']['u'] = array(
|
163 |
+
intval($betterAnalyticsOptions['dimension']['user']),
|
164 |
+
intval($currentUser->ID)
|
165 |
+
);
|
166 |
+
}
|
167 |
+
|
168 |
+
if (!array_intersect((array)$currentUser->roles, (array)@$betterAnalyticsOptions['roles_no_track']))
|
169 |
+
{
|
170 |
+
echo "<!-- This site uses the Better Analytics plugin. " . BETTER_ANALYTICS_PRODUCT_URL . " -->
|
171 |
+
<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>";
|
172 |
+
}
|
languages/better-analytics.pot
ADDED
@@ -0,0 +1,1841 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2015 Better Analytics
|
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.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/better-analytics\n"
|
7 |
+
"POT-Creation-Date: 2015-06-01 00:24:16+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
|
12 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
|
15 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:85
|
16 |
+
msgid "Test Analytics Setup"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:86
|
20 |
+
msgid "OAuth2 Endpoint"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:91
|
24 |
+
msgid "Analytics"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:92
|
28 |
+
msgid "Heat Maps"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:92
|
32 |
+
msgid "Reports"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:94
|
36 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:17
|
37 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/events.php:14
|
38 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:13
|
39 |
+
msgid "Charts"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:95
|
43 |
+
msgid "Issue Monitor"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:96
|
47 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:362
|
48 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:416
|
49 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:18
|
50 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/events.php:15
|
51 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:14
|
52 |
+
msgid "Events"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:100
|
56 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:117
|
57 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:198
|
58 |
+
msgid "Settings"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:101
|
62 |
+
msgid "Test Setup"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#. #-#-#-#-# plugin.pot (Better Analytics 1.0.0) #-#-#-#-#
|
66 |
+
#. Plugin Name of the plugin/theme
|
67 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:104
|
68 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:174
|
69 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:306
|
70 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:350
|
71 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:28
|
72 |
+
#: library/DigitalPointBetterAnalytics/Widget/PopularPosts.php:11
|
73 |
+
msgid "Better Analytics"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:126
|
77 |
+
msgid "Pro version not up to date."
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:126
|
81 |
+
msgid "Installed:"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:126
|
85 |
+
msgid "Latest:"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:127
|
89 |
+
msgid "Pro version installed"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:129
|
93 |
+
msgid ""
|
94 |
+
"Pro version installed, but not active. Did you %1$sverify ownership of your "
|
95 |
+
"domain%2$s?"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:131
|
99 |
+
msgid "Pro version not installed."
|
100 |
+
msgstr ""
|
101 |
+
|
102 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:198
|
103 |
+
msgid "Google Analytics Web Property ID not selected."
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:203
|
107 |
+
msgid "Last Analytics Error:"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:238
|
111 |
+
msgid "Invalid method:"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:263
|
115 |
+
msgid "Invalid Google API Code:"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:269
|
119 |
+
msgid "Unknown Google API Error:"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:304
|
123 |
+
msgid "Overview"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:307
|
127 |
+
msgid ""
|
128 |
+
"At the most basic level, it will automatically add Google Analytics "
|
129 |
+
"Universal code to your website. It gives you the flexibility to track "
|
130 |
+
"virtually everything about your site. From page views to YouTube video "
|
131 |
+
"engagement (and everything in between)."
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:314
|
135 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:329
|
136 |
+
msgid "Pro"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:316
|
140 |
+
msgid "Pro Version"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:317
|
144 |
+
msgid ""
|
145 |
+
"There is a Pro version of this plugin that gives you a few added features. "
|
146 |
+
"More metrics/dimensions, more tracking options, etc."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:326
|
150 |
+
msgid "For more information:"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:327
|
154 |
+
msgid "Info"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:328
|
158 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:362
|
159 |
+
msgid "Support"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:341
|
163 |
+
msgid "colossal"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:341
|
167 |
+
msgid "elephantine"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:341
|
171 |
+
msgid "glorious"
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:341
|
175 |
+
msgid "grand"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:341
|
179 |
+
msgid "huge"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:341
|
183 |
+
msgid "mighty"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:341
|
187 |
+
msgid "WTF?"
|
188 |
+
msgstr ""
|
189 |
+
|
190 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:341
|
191 |
+
msgid "sexy"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:349
|
195 |
+
msgid ""
|
196 |
+
"If you like %1$s, please leave us a %2$s rating. A %3$s thank you in advance!"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: library/DigitalPointBetterAnalytics/Base/Admin.php:362
|
200 |
+
msgid "Visit Support Forum"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: library/DigitalPointBetterAnalytics/Base/Public.php:103
|
204 |
+
msgid ""
|
205 |
+
"%1$sBetter Analytics %4$s requires WordPress %5$s or higher.%2$s%3$sPlease "
|
206 |
+
"%6$supgrade WordPress%7$s to a current version."
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: library/DigitalPointBetterAnalytics/Base/Public.php:374
|
210 |
+
msgid "Every Minute"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:39
|
214 |
+
msgid "Organic Search Keywords"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:39
|
218 |
+
msgid "Referring URL"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:39
|
222 |
+
msgid "Current Page"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:39
|
226 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:586
|
227 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:686
|
228 |
+
msgid "Medium"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:39
|
232 |
+
msgid "Devices"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:39
|
236 |
+
msgid "Visitors"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:54
|
240 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:81
|
241 |
+
msgid "Realtime"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:96
|
245 |
+
msgid ""
|
246 |
+
"Not all metrics are available for unlicensed copies of the Better Analytics "
|
247 |
+
"plugin.%1$s%2$sYou can license a copy over here.%3$s%1$sIf this is a valid "
|
248 |
+
"license, make sure the purchaser of the add-on has verified ownership of "
|
249 |
+
"this domain %4$sover here%3$s."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:148
|
253 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:347
|
254 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:401
|
255 |
+
msgid "Invalid number of days."
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:152
|
259 |
+
msgid "Invalid dimension."
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:159
|
263 |
+
msgid ""
|
264 |
+
"Not all dimensions are available for unlicensed copies of the Better "
|
265 |
+
"Analytics plugin.%1$s%2$sYou can license a copy over here.%3$s%1$sIf this is "
|
266 |
+
"a valid license, make sure the purchaser of the add-on has verified "
|
267 |
+
"ownership of this domain %4$sover here%3$s."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:246
|
271 |
+
msgid "Keywords Provided"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:247
|
275 |
+
msgid "Keywords Not Provided"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:315
|
279 |
+
msgid "History for"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:320
|
283 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:380
|
284 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:435
|
285 |
+
msgid "No data for the criteria given"
|
286 |
+
msgstr ""
|
287 |
+
|
288 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:363
|
289 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:417
|
290 |
+
msgid "Category"
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:364
|
294 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:418
|
295 |
+
msgid "Type"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:365
|
299 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:419
|
300 |
+
msgid "Detail"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:452
|
304 |
+
msgid "No Linked Google Analytics Account."
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:454
|
308 |
+
msgid "You can link one in the Better Analytics API settings."
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:466
|
312 |
+
msgid "User"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:467
|
316 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:706
|
317 |
+
msgid "Users"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:469
|
321 |
+
msgid "Session"
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:470
|
325 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:705
|
326 |
+
msgid "Sessions"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:471
|
330 |
+
msgid "Hits"
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:473
|
334 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:584
|
335 |
+
msgid "Traffic Sources"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:474
|
339 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:708
|
340 |
+
msgid "Organic Search"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:476
|
344 |
+
msgid "AdWords"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:477
|
348 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:532
|
349 |
+
msgid "Impressions"
|
350 |
+
msgstr ""
|
351 |
+
|
352 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:478
|
353 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:530
|
354 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:537
|
355 |
+
msgid "Clicks"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:479
|
359 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:531
|
360 |
+
msgid "Cost"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:480
|
364 |
+
msgid "CPM"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:481
|
368 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:528
|
369 |
+
msgid "CPC"
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:483
|
373 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:484
|
374 |
+
msgid "Social Activities"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:486
|
378 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:619
|
379 |
+
msgid "Page Tracking"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:487
|
383 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:704
|
384 |
+
msgid "Page Views"
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:489
|
388 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:616
|
389 |
+
msgid "Internal Search"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:490
|
393 |
+
msgid "Unique Searches"
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:492
|
397 |
+
msgid "Site Speed"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:493
|
401 |
+
msgid "Page Load Time"
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:495
|
405 |
+
msgid "Event Tracking"
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:496
|
409 |
+
msgid "Total Events"
|
410 |
+
msgstr ""
|
411 |
+
|
412 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:497
|
413 |
+
msgid "Unique Events"
|
414 |
+
msgstr ""
|
415 |
+
|
416 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:498
|
417 |
+
msgid "User Registrations"
|
418 |
+
msgstr ""
|
419 |
+
|
420 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:499
|
421 |
+
msgid "Comments Created"
|
422 |
+
msgstr ""
|
423 |
+
|
424 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:500
|
425 |
+
msgid "YouTube Video Played"
|
426 |
+
msgstr ""
|
427 |
+
|
428 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:501
|
429 |
+
msgid "YouTube Video Paused"
|
430 |
+
msgstr ""
|
431 |
+
|
432 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:502
|
433 |
+
msgid "YouTube Video Plays To End"
|
434 |
+
msgstr ""
|
435 |
+
|
436 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:503
|
437 |
+
msgid "Emails Sent"
|
438 |
+
msgstr ""
|
439 |
+
|
440 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:504
|
441 |
+
msgid "Emails Opened"
|
442 |
+
msgstr ""
|
443 |
+
|
444 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:505
|
445 |
+
msgid "External Links Clicked"
|
446 |
+
msgstr ""
|
447 |
+
|
448 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:506
|
449 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:231
|
450 |
+
msgid "File Downloads"
|
451 |
+
msgstr ""
|
452 |
+
|
453 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:507
|
454 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:437
|
455 |
+
msgid "Images Not Loading"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:508
|
459 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:432
|
460 |
+
msgid "Page Not Found (404)"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:509
|
464 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:473
|
465 |
+
msgid "AJAX Requests"
|
466 |
+
msgstr ""
|
467 |
+
|
468 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:510
|
469 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:444
|
470 |
+
msgid "JavaScript Errors"
|
471 |
+
msgstr ""
|
472 |
+
|
473 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:511
|
474 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:449
|
475 |
+
msgid "AJAX Errors"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:512
|
479 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:453
|
480 |
+
msgid "Browser Console Errors"
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:513
|
484 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:457
|
485 |
+
msgid "YouTube Errors"
|
486 |
+
msgstr ""
|
487 |
+
|
488 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:515
|
489 |
+
msgid "Advertisement Clicked"
|
490 |
+
msgstr ""
|
491 |
+
|
492 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:518
|
493 |
+
msgid "Ecommerce"
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:519
|
497 |
+
msgid "Transactions"
|
498 |
+
msgstr ""
|
499 |
+
|
500 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:520
|
501 |
+
msgid "Transaction Revenue"
|
502 |
+
msgstr ""
|
503 |
+
|
504 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:521
|
505 |
+
msgid "Revenue Per Transaction"
|
506 |
+
msgstr ""
|
507 |
+
|
508 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:523
|
509 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:524
|
510 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:622
|
511 |
+
msgid "Social Interactions"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:525
|
515 |
+
msgid "Unique Social Interactions"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:527
|
519 |
+
msgid "DoubleClick Campaign Manager"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:529
|
523 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:539
|
524 |
+
msgid "CTR"
|
525 |
+
msgstr ""
|
526 |
+
|
527 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:534
|
528 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:400
|
529 |
+
msgid "AdSense"
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:535
|
533 |
+
msgid "Revenue"
|
534 |
+
msgstr ""
|
535 |
+
|
536 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:536
|
537 |
+
msgid "Views"
|
538 |
+
msgstr ""
|
539 |
+
|
540 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:538
|
541 |
+
msgid "Page Impressions"
|
542 |
+
msgstr ""
|
543 |
+
|
544 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:540
|
545 |
+
msgid "ECPM"
|
546 |
+
msgstr ""
|
547 |
+
|
548 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:541
|
549 |
+
msgid "Exits"
|
550 |
+
msgstr ""
|
551 |
+
|
552 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:542
|
553 |
+
msgid "Viewable Impressions"
|
554 |
+
msgstr ""
|
555 |
+
|
556 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:543
|
557 |
+
msgid "Coverage"
|
558 |
+
msgstr ""
|
559 |
+
|
560 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:551
|
561 |
+
msgid "Default Segments"
|
562 |
+
msgstr ""
|
563 |
+
|
564 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:552
|
565 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:694
|
566 |
+
msgid "Everything"
|
567 |
+
msgstr ""
|
568 |
+
|
569 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:553
|
570 |
+
msgid "All Visits"
|
571 |
+
msgstr ""
|
572 |
+
|
573 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:554
|
574 |
+
msgid "New Visitors"
|
575 |
+
msgstr ""
|
576 |
+
|
577 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:555
|
578 |
+
msgid "Returning Visitors"
|
579 |
+
msgstr ""
|
580 |
+
|
581 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:556
|
582 |
+
msgid "Paid Search Traffic"
|
583 |
+
msgstr ""
|
584 |
+
|
585 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:557
|
586 |
+
msgid "Non-paid Search Traffic"
|
587 |
+
msgstr ""
|
588 |
+
|
589 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:558
|
590 |
+
msgid "Search Traffic"
|
591 |
+
msgstr ""
|
592 |
+
|
593 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:559
|
594 |
+
msgid "Direct Traffic"
|
595 |
+
msgstr ""
|
596 |
+
|
597 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:560
|
598 |
+
msgid "Referral Traffic"
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:561
|
602 |
+
msgid "Visits with Conversions"
|
603 |
+
msgstr ""
|
604 |
+
|
605 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:562
|
606 |
+
msgid "Visits with Transactions"
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:563
|
610 |
+
msgid "Mobile and Tablet Traffic"
|
611 |
+
msgstr ""
|
612 |
+
|
613 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:564
|
614 |
+
msgid "Non-bounce Visits"
|
615 |
+
msgstr ""
|
616 |
+
|
617 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:565
|
618 |
+
msgid "Tablet Traffic"
|
619 |
+
msgstr ""
|
620 |
+
|
621 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:566
|
622 |
+
msgid "Mobile Traffic"
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:567
|
626 |
+
msgid "Male Users"
|
627 |
+
msgstr ""
|
628 |
+
|
629 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:568
|
630 |
+
msgid "Female Users"
|
631 |
+
msgstr ""
|
632 |
+
|
633 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:579
|
634 |
+
msgid "Visitor"
|
635 |
+
msgstr ""
|
636 |
+
|
637 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:580
|
638 |
+
msgid "Visitor Type"
|
639 |
+
msgstr ""
|
640 |
+
|
641 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:581
|
642 |
+
msgid "Visit Count"
|
643 |
+
msgstr ""
|
644 |
+
|
645 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:582
|
646 |
+
msgid "Days Since Last Visit"
|
647 |
+
msgstr ""
|
648 |
+
|
649 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:585
|
650 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:683
|
651 |
+
msgid "Source"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:587
|
655 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:623
|
656 |
+
msgid "Social Network"
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:588
|
660 |
+
msgid "Search Keywords Provided"
|
661 |
+
msgstr ""
|
662 |
+
|
663 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:589
|
664 |
+
msgid "Organic Search Marketshare"
|
665 |
+
msgstr ""
|
666 |
+
|
667 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:591
|
668 |
+
msgid "Platform"
|
669 |
+
msgstr ""
|
670 |
+
|
671 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:592
|
672 |
+
msgid "Browser"
|
673 |
+
msgstr ""
|
674 |
+
|
675 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:593
|
676 |
+
msgid "Operating System"
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:594
|
680 |
+
msgid "Operating System Version"
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:595
|
684 |
+
msgid "Is Mobile"
|
685 |
+
msgstr ""
|
686 |
+
|
687 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:596
|
688 |
+
msgid "Is Tablet"
|
689 |
+
msgstr ""
|
690 |
+
|
691 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:597
|
692 |
+
msgid "Mobile Operating System"
|
693 |
+
msgstr ""
|
694 |
+
|
695 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:598
|
696 |
+
msgid "Mobile Device Marketing Name"
|
697 |
+
msgstr ""
|
698 |
+
|
699 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:599
|
700 |
+
msgid "Mobile Device Branding"
|
701 |
+
msgstr ""
|
702 |
+
|
703 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:600
|
704 |
+
msgid "Mobile Device Model"
|
705 |
+
msgstr ""
|
706 |
+
|
707 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:601
|
708 |
+
msgid "Mobile Input Selector"
|
709 |
+
msgstr ""
|
710 |
+
|
711 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:602
|
712 |
+
msgid "Mobile Device Info"
|
713 |
+
msgstr ""
|
714 |
+
|
715 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:604
|
716 |
+
msgid "Geo / Network"
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:605
|
720 |
+
msgid "Continent"
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:606
|
724 |
+
msgid "Sub-Continent"
|
725 |
+
msgstr ""
|
726 |
+
|
727 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:607
|
728 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:687
|
729 |
+
msgid "Country"
|
730 |
+
msgstr ""
|
731 |
+
|
732 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:609
|
733 |
+
msgid "System"
|
734 |
+
msgstr ""
|
735 |
+
|
736 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:610
|
737 |
+
msgid "Flash Version"
|
738 |
+
msgstr ""
|
739 |
+
|
740 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:611
|
741 |
+
msgid "Java Enabled"
|
742 |
+
msgstr ""
|
743 |
+
|
744 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:612
|
745 |
+
msgid "Language"
|
746 |
+
msgstr ""
|
747 |
+
|
748 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:613
|
749 |
+
msgid "Screen Colors"
|
750 |
+
msgstr ""
|
751 |
+
|
752 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:614
|
753 |
+
msgid "Screen Resolution"
|
754 |
+
msgstr ""
|
755 |
+
|
756 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:617
|
757 |
+
msgid "Search Used"
|
758 |
+
msgstr ""
|
759 |
+
|
760 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:620
|
761 |
+
msgid "Hostname"
|
762 |
+
msgstr ""
|
763 |
+
|
764 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:624
|
765 |
+
msgid "Social Action"
|
766 |
+
msgstr ""
|
767 |
+
|
768 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:625
|
769 |
+
msgid "Social Network Action"
|
770 |
+
msgstr ""
|
771 |
+
|
772 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:626
|
773 |
+
msgid "Social Engagement Type"
|
774 |
+
msgstr ""
|
775 |
+
|
776 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:628
|
777 |
+
msgid "Custom Variables"
|
778 |
+
msgstr ""
|
779 |
+
|
780 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:629
|
781 |
+
msgid "Custom Dimension 1"
|
782 |
+
msgstr ""
|
783 |
+
|
784 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:630
|
785 |
+
msgid "Custom Dimension 2"
|
786 |
+
msgstr ""
|
787 |
+
|
788 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:631
|
789 |
+
msgid "Custom Dimension 3"
|
790 |
+
msgstr ""
|
791 |
+
|
792 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:632
|
793 |
+
msgid "Custom Dimension 4"
|
794 |
+
msgstr ""
|
795 |
+
|
796 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:633
|
797 |
+
msgid "Custom Dimension 5"
|
798 |
+
msgstr ""
|
799 |
+
|
800 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:634
|
801 |
+
msgid "Custom Variable Value 1"
|
802 |
+
msgstr ""
|
803 |
+
|
804 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:635
|
805 |
+
msgid "Custom Variable Value 2"
|
806 |
+
msgstr ""
|
807 |
+
|
808 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:636
|
809 |
+
msgid "Custom Variable Value 3"
|
810 |
+
msgstr ""
|
811 |
+
|
812 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:637
|
813 |
+
msgid "Custom Variable Value 4"
|
814 |
+
msgstr ""
|
815 |
+
|
816 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:638
|
817 |
+
msgid "Custom Variable Value 5"
|
818 |
+
msgstr ""
|
819 |
+
|
820 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:640
|
821 |
+
msgid "Audience"
|
822 |
+
msgstr ""
|
823 |
+
|
824 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:641
|
825 |
+
msgid "Age Bracket"
|
826 |
+
msgstr ""
|
827 |
+
|
828 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:642
|
829 |
+
msgid "Gender"
|
830 |
+
msgstr ""
|
831 |
+
|
832 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:643
|
833 |
+
msgid "Interest Affinity"
|
834 |
+
msgstr ""
|
835 |
+
|
836 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:644
|
837 |
+
msgid "Interest In Market"
|
838 |
+
msgstr ""
|
839 |
+
|
840 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:645
|
841 |
+
msgid "Interest Other"
|
842 |
+
msgstr ""
|
843 |
+
|
844 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:668
|
845 |
+
msgid "Date"
|
846 |
+
msgstr ""
|
847 |
+
|
848 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:672
|
849 |
+
msgid "Categories"
|
850 |
+
msgstr ""
|
851 |
+
|
852 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:676
|
853 |
+
msgid "Authors"
|
854 |
+
msgstr ""
|
855 |
+
|
856 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:680
|
857 |
+
msgid "Tags"
|
858 |
+
msgstr ""
|
859 |
+
|
860 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:684
|
861 |
+
msgid "Referrer"
|
862 |
+
msgstr ""
|
863 |
+
|
864 |
+
#: library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php:707
|
865 |
+
msgid "Session Length"
|
866 |
+
msgstr ""
|
867 |
+
|
868 |
+
#: library/DigitalPointBetterAnalytics/Helper/Reporting.php:65
|
869 |
+
msgid "No API tokens to refresh."
|
870 |
+
msgstr ""
|
871 |
+
|
872 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:31
|
873 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:156
|
874 |
+
msgid "General"
|
875 |
+
msgstr ""
|
876 |
+
|
877 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:32
|
878 |
+
msgid "Custom Dimensions"
|
879 |
+
msgstr ""
|
880 |
+
|
881 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:33
|
882 |
+
msgid "Social"
|
883 |
+
msgstr ""
|
884 |
+
|
885 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:34
|
886 |
+
msgid "Advertising"
|
887 |
+
msgstr ""
|
888 |
+
|
889 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:35
|
890 |
+
msgid "Monitoring"
|
891 |
+
msgstr ""
|
892 |
+
|
893 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:36
|
894 |
+
msgid "eCommerce"
|
895 |
+
msgstr ""
|
896 |
+
|
897 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:37
|
898 |
+
msgid "API"
|
899 |
+
msgstr ""
|
900 |
+
|
901 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:38
|
902 |
+
msgid "Advanced"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:54
|
906 |
+
msgid "Support / Feature Requests"
|
907 |
+
msgstr ""
|
908 |
+
|
909 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:56
|
910 |
+
msgid ""
|
911 |
+
"Better Analytics is user request driven, so if there's something you want it "
|
912 |
+
"to do that it doesn't already do, or just have a question, simply ask!"
|
913 |
+
msgstr ""
|
914 |
+
|
915 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:56
|
916 |
+
msgid "Setup Test Tool"
|
917 |
+
msgstr ""
|
918 |
+
|
919 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:58
|
920 |
+
msgid "Support / Request Venues"
|
921 |
+
msgstr ""
|
922 |
+
|
923 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:62
|
924 |
+
msgid "Forum"
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:64
|
928 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:371
|
929 |
+
msgid "Twitter"
|
930 |
+
msgstr ""
|
931 |
+
|
932 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:71
|
933 |
+
msgid "Extra Features In Pro Version"
|
934 |
+
msgstr ""
|
935 |
+
|
936 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:75
|
937 |
+
msgid "More Advertising tracking options"
|
938 |
+
msgstr ""
|
939 |
+
|
940 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:78
|
941 |
+
msgid "More options for monitoring issues with site"
|
942 |
+
msgstr ""
|
943 |
+
|
944 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:81
|
945 |
+
msgid "More heat map metrics"
|
946 |
+
msgstr ""
|
947 |
+
|
948 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:84
|
949 |
+
msgid "More charting dimensions"
|
950 |
+
msgstr ""
|
951 |
+
|
952 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:87
|
953 |
+
msgid "eCommerce tracking"
|
954 |
+
msgstr ""
|
955 |
+
|
956 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:90
|
957 |
+
msgid ""
|
958 |
+
"Option for server-side tracking of users (or bots) with Analytics/privacy "
|
959 |
+
"blockers"
|
960 |
+
msgstr ""
|
961 |
+
|
962 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:93
|
963 |
+
msgid "API calls are faster (uses a custom system for parallel requests)"
|
964 |
+
msgstr ""
|
965 |
+
|
966 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:96
|
967 |
+
msgid "Priority Support"
|
968 |
+
msgstr ""
|
969 |
+
|
970 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:101
|
971 |
+
msgid ""
|
972 |
+
"You can %1$sget a license here%2$s.%3$sIf you already have a license, make "
|
973 |
+
"sure your domain is listed under %4$syour verified domains%2$s."
|
974 |
+
msgstr ""
|
975 |
+
|
976 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:118
|
977 |
+
msgid "Google Analytics Web Property ID"
|
978 |
+
msgstr ""
|
979 |
+
|
980 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:136
|
981 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:526
|
982 |
+
msgid "please pick a profile"
|
983 |
+
msgstr ""
|
984 |
+
|
985 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:148
|
986 |
+
msgid "Link Your Google Analytics Account"
|
987 |
+
msgstr ""
|
988 |
+
|
989 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:161
|
990 |
+
msgid "Enhanced Link Attribution"
|
991 |
+
msgstr ""
|
992 |
+
|
993 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:163
|
994 |
+
msgid ""
|
995 |
+
"See separate information for multiple links on a page that all have the same "
|
996 |
+
"destination. For example, if there are two links on the same page that both "
|
997 |
+
"lead to the Contact Us page, then you see separate click information for "
|
998 |
+
"each link.%1$sSee when one page element has multiple destinations. For "
|
999 |
+
"example, a Search button on your page is likely to lead to multiple "
|
1000 |
+
"destinations.%1$sTrack buttons, menus, and actions driven by JavaScript."
|
1001 |
+
msgstr ""
|
1002 |
+
|
1003 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:170
|
1004 |
+
msgid "Track Registered Users By User ID"
|
1005 |
+
msgstr ""
|
1006 |
+
|
1007 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:171
|
1008 |
+
msgid ""
|
1009 |
+
"This feature allows you to utilize %1$ssession unification%2$s within Google "
|
1010 |
+
"Analytics."
|
1011 |
+
msgstr ""
|
1012 |
+
|
1013 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:183
|
1014 |
+
msgid "Events To Track"
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:189
|
1018 |
+
msgid "User Engagement"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:192
|
1022 |
+
msgid "This will give you an %1$sadjusted bounce rate%2$s."
|
1023 |
+
msgstr ""
|
1024 |
+
|
1025 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:201
|
1026 |
+
msgid "User Registration"
|
1027 |
+
msgstr ""
|
1028 |
+
|
1029 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:206
|
1030 |
+
msgid "Comments Being Created"
|
1031 |
+
msgstr ""
|
1032 |
+
|
1033 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:211
|
1034 |
+
msgid "YouTube Video Engagement"
|
1035 |
+
msgstr ""
|
1036 |
+
|
1037 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:212
|
1038 |
+
msgid ""
|
1039 |
+
"This works with the modern IFRAME YouTube embeds. It does not work with the "
|
1040 |
+
"old OBJECT embeds.%1$sTracks things like video plays, pauses, plays to end, "
|
1041 |
+
"etc."
|
1042 |
+
msgstr ""
|
1043 |
+
|
1044 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:221
|
1045 |
+
msgid "Emails Sent/Opened"
|
1046 |
+
msgstr ""
|
1047 |
+
|
1048 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:226
|
1049 |
+
msgid "Clicks On External Links"
|
1050 |
+
msgstr ""
|
1051 |
+
|
1052 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:239
|
1053 |
+
msgid "Privacy"
|
1054 |
+
msgstr ""
|
1055 |
+
|
1056 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:244
|
1057 |
+
msgid "Anonymize IPs"
|
1058 |
+
msgstr ""
|
1059 |
+
|
1060 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:245
|
1061 |
+
msgid ""
|
1062 |
+
"Detailed information about IP Anonymization in Google Analytics can be found "
|
1063 |
+
"%1$sover here%2$s."
|
1064 |
+
msgstr ""
|
1065 |
+
|
1066 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:253
|
1067 |
+
msgid "Demographic & Interest Tracking"
|
1068 |
+
msgstr ""
|
1069 |
+
|
1070 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:254
|
1071 |
+
msgid ""
|
1072 |
+
"This allows you to view extra dimensions about users (Age, Gender, Affinity "
|
1073 |
+
"Categories, In-Market Segments and Other Categories.%1$sThis requires "
|
1074 |
+
"enabling the option in your %2$sGoogle Analytics account%3$s under "
|
1075 |
+
"%4$sProperty Settings%5$s."
|
1076 |
+
msgstr ""
|
1077 |
+
|
1078 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:265
|
1079 |
+
msgid "Force Analytics Traffic Over SSL"
|
1080 |
+
msgstr ""
|
1081 |
+
|
1082 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:266
|
1083 |
+
msgid ""
|
1084 |
+
"If your site is HTTPS based, Analytics traffic will always go over SSL. If "
|
1085 |
+
"you have an insecure site, but wish Analytics traffic to still be secure, "
|
1086 |
+
"use this option. Additionally, SSL traffic is going to be generally faster "
|
1087 |
+
"because it's able to utilize the %1$sSPDY protocol%2$s."
|
1088 |
+
msgstr ""
|
1089 |
+
|
1090 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:276
|
1091 |
+
msgid "Link Source Tracking"
|
1092 |
+
msgstr ""
|
1093 |
+
|
1094 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:281
|
1095 |
+
msgid "RSS"
|
1096 |
+
msgstr ""
|
1097 |
+
|
1098 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:282
|
1099 |
+
msgid ""
|
1100 |
+
"Links within RSS feed will be tagged to track the source/medium as being RSS."
|
1101 |
+
msgstr ""
|
1102 |
+
|
1103 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:287
|
1104 |
+
msgid "Email"
|
1105 |
+
msgstr ""
|
1106 |
+
|
1107 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:288
|
1108 |
+
msgid ""
|
1109 |
+
"Links within RSS feed will be tagged to track the source/medium as being "
|
1110 |
+
"Email."
|
1111 |
+
msgstr ""
|
1112 |
+
|
1113 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:298
|
1114 |
+
msgid ""
|
1115 |
+
"If you want to track custom dimensions, you need to create the custom "
|
1116 |
+
"dimensions in your %1$sGoogle Analytics account settings%2$s (under "
|
1117 |
+
"%3$sCustom Definitions -> Custom Dimension%4$s)%5$sThey should be scoped as "
|
1118 |
+
"\"%3$sHit%4$s\"."
|
1119 |
+
msgstr ""
|
1120 |
+
|
1121 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:309
|
1122 |
+
msgid "Dimension Indexes"
|
1123 |
+
msgstr ""
|
1124 |
+
|
1125 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:310
|
1126 |
+
msgid "Set to 0 to disable."
|
1127 |
+
msgstr ""
|
1128 |
+
|
1129 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:317
|
1130 |
+
msgid "Categories: "
|
1131 |
+
msgstr ""
|
1132 |
+
|
1133 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:326
|
1134 |
+
msgid "Author: "
|
1135 |
+
msgstr ""
|
1136 |
+
|
1137 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:335
|
1138 |
+
msgid "Tags: "
|
1139 |
+
msgstr ""
|
1140 |
+
|
1141 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:344
|
1142 |
+
msgid "Registered User: "
|
1143 |
+
msgstr ""
|
1144 |
+
|
1145 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:360
|
1146 |
+
msgid "Button Engagement To Track"
|
1147 |
+
msgstr ""
|
1148 |
+
|
1149 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:366
|
1150 |
+
msgid "Facebook Like"
|
1151 |
+
msgstr ""
|
1152 |
+
|
1153 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:376
|
1154 |
+
msgid "Google+ (Google Analytics always tracks)"
|
1155 |
+
msgstr ""
|
1156 |
+
|
1157 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:381
|
1158 |
+
msgid "Pinterest"
|
1159 |
+
msgstr ""
|
1160 |
+
|
1161 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:386
|
1162 |
+
msgid "LinkedIn"
|
1163 |
+
msgstr ""
|
1164 |
+
|
1165 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:394
|
1166 |
+
msgid "Advertisement Clicks To Track"
|
1167 |
+
msgstr ""
|
1168 |
+
|
1169 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:405
|
1170 |
+
msgid "Outbrain"
|
1171 |
+
msgstr ""
|
1172 |
+
|
1173 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:410
|
1174 |
+
msgid "Taboola"
|
1175 |
+
msgstr ""
|
1176 |
+
|
1177 |
+
#. #-#-#-#-# plugin.pot (Better Analytics 1.0.0) #-#-#-#-#
|
1178 |
+
#. Author of the plugin/theme
|
1179 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:415
|
1180 |
+
msgid "Digital Point"
|
1181 |
+
msgstr ""
|
1182 |
+
|
1183 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:426
|
1184 |
+
msgid "Site Issues To Track"
|
1185 |
+
msgstr ""
|
1186 |
+
|
1187 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:438
|
1188 |
+
msgid ""
|
1189 |
+
"This relies on the ability of the user's browser to load images which will "
|
1190 |
+
"vary between browsers and Internet connections. This event can be a useful "
|
1191 |
+
"tool for finding missing images, but it keep in mind it will log any image "
|
1192 |
+
"that the end user's browser did not load (for any reason)."
|
1193 |
+
msgstr ""
|
1194 |
+
|
1195 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:458
|
1196 |
+
msgid ""
|
1197 |
+
"This allows you to quickly find old videos that the author has removed or "
|
1198 |
+
"disabled embeding for."
|
1199 |
+
msgstr ""
|
1200 |
+
|
1201 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:467
|
1202 |
+
msgid "Debugging Events"
|
1203 |
+
msgstr ""
|
1204 |
+
|
1205 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:486
|
1206 |
+
msgid "WooCommerce"
|
1207 |
+
msgstr ""
|
1208 |
+
|
1209 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:494
|
1210 |
+
msgid "WooCommerce not enabled/active."
|
1211 |
+
msgstr ""
|
1212 |
+
|
1213 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:497
|
1214 |
+
msgid "More information about %s"
|
1215 |
+
msgstr ""
|
1216 |
+
|
1217 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:499
|
1218 |
+
msgid "View details"
|
1219 |
+
msgstr ""
|
1220 |
+
|
1221 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:521
|
1222 |
+
msgid "Profile Used For Reporting"
|
1223 |
+
msgstr ""
|
1224 |
+
|
1225 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:550
|
1226 |
+
msgid "Link/Authenticate A Different Google Analytics Account"
|
1227 |
+
msgstr ""
|
1228 |
+
|
1229 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:550
|
1230 |
+
msgid "Link/Authenticate Your Google Analytics Account"
|
1231 |
+
msgstr ""
|
1232 |
+
|
1233 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:562
|
1234 |
+
msgid "Use Your Own Project Credentials"
|
1235 |
+
msgstr ""
|
1236 |
+
|
1237 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:563
|
1238 |
+
msgid ""
|
1239 |
+
"If you have your own Google API Project that you wish to use, you can use "
|
1240 |
+
"your credentials for that web application."
|
1241 |
+
msgstr ""
|
1242 |
+
|
1243 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:573
|
1244 |
+
msgid "Configuration"
|
1245 |
+
msgstr ""
|
1246 |
+
|
1247 |
+
#. translators: %1$s = <strong>, %2$s = </strong>
|
1248 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:575
|
1249 |
+
msgid ""
|
1250 |
+
"Project needs to have the %1$sAnalytics API%2$s enabled under %1$sAPIs & "
|
1251 |
+
"auth -> APIs%2$s."
|
1252 |
+
msgstr ""
|
1253 |
+
|
1254 |
+
#. translators: %1$s = <strong>, %2$s = </strong>
|
1255 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:577
|
1256 |
+
msgid ""
|
1257 |
+
"Under %1$sAPIs & auth -> Credentials%2$s, you need to %1$sCreate new Client "
|
1258 |
+
"ID%2$s that is a %1$sWeb application%2$s with an authorized redirect URI of: "
|
1259 |
+
"%1$s%3$s%2$s"
|
1260 |
+
msgstr ""
|
1261 |
+
|
1262 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:584
|
1263 |
+
msgid "Client ID"
|
1264 |
+
msgstr ""
|
1265 |
+
|
1266 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:591
|
1267 |
+
msgid "Client Secret"
|
1268 |
+
msgstr ""
|
1269 |
+
|
1270 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:599
|
1271 |
+
msgid "Roles To Not Track"
|
1272 |
+
msgstr ""
|
1273 |
+
|
1274 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:599
|
1275 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:637
|
1276 |
+
msgid ""
|
1277 |
+
"If a logged in user is part of one of these groups, Analytics will not track "
|
1278 |
+
"them."
|
1279 |
+
msgstr ""
|
1280 |
+
|
1281 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:619
|
1282 |
+
msgid "Roles Able To View Reports/Dashboard"
|
1283 |
+
msgstr ""
|
1284 |
+
|
1285 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:637
|
1286 |
+
msgid "File Extensions To Track As Downloads"
|
1287 |
+
msgstr ""
|
1288 |
+
|
1289 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:644
|
1290 |
+
msgid "Audio Video Interleave (.avi)"
|
1291 |
+
msgstr ""
|
1292 |
+
|
1293 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:645
|
1294 |
+
msgid "Word (.doc)"
|
1295 |
+
msgstr ""
|
1296 |
+
|
1297 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:646
|
1298 |
+
msgid "Executable (.exe)"
|
1299 |
+
msgstr ""
|
1300 |
+
|
1301 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:647
|
1302 |
+
msgid "gzip (.gz)"
|
1303 |
+
msgstr ""
|
1304 |
+
|
1305 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:648
|
1306 |
+
msgid "MPEG-1 Video (.mpg)"
|
1307 |
+
msgstr ""
|
1308 |
+
|
1309 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:649
|
1310 |
+
msgid "MP3 (.mp3)"
|
1311 |
+
msgstr ""
|
1312 |
+
|
1313 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:650
|
1314 |
+
msgid "Acrobat (.pdf)"
|
1315 |
+
msgstr ""
|
1316 |
+
|
1317 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:651
|
1318 |
+
msgid "PowerPoint (.ppt)"
|
1319 |
+
msgstr ""
|
1320 |
+
|
1321 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:652
|
1322 |
+
msgid "Photoshop (.psd)"
|
1323 |
+
msgstr ""
|
1324 |
+
|
1325 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:653
|
1326 |
+
msgid "RAR (.rar)"
|
1327 |
+
msgstr ""
|
1328 |
+
|
1329 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:654
|
1330 |
+
msgid "Windows Media Video (.wmv)"
|
1331 |
+
msgstr ""
|
1332 |
+
|
1333 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:655
|
1334 |
+
msgid "Excel (.xls)"
|
1335 |
+
msgstr ""
|
1336 |
+
|
1337 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:656
|
1338 |
+
msgid "Zip Archive (.zip)"
|
1339 |
+
msgstr ""
|
1340 |
+
|
1341 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:670
|
1342 |
+
msgid "Track Users With Analytics Blockers"
|
1343 |
+
msgstr ""
|
1344 |
+
|
1345 |
+
#. translators: %1$s = <strong>, %2$s = </strong>, %3$s = <p />
|
1346 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:673
|
1347 |
+
msgid ""
|
1348 |
+
"If a user has a mechanism that is blocking them from being tracked with "
|
1349 |
+
"Google Analytics, you can use this option to do server-side page view "
|
1350 |
+
"tracking of that user.%3$s For the most accuracy, %1$sit's not recommended "
|
1351 |
+
"to use this option for anything beyond \"Registered Users\"%2$s (having an "
|
1352 |
+
"account allows the system to track them uniquely on the backend).%3$s "
|
1353 |
+
"Logging page views for \"Humans\" will lead to a lot of niche bots being "
|
1354 |
+
"tracked (ones not popular enough to be widely known as a spider)."
|
1355 |
+
msgstr ""
|
1356 |
+
|
1357 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:679
|
1358 |
+
msgid "Never"
|
1359 |
+
msgstr ""
|
1360 |
+
|
1361 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:684
|
1362 |
+
msgid "Registered Users"
|
1363 |
+
msgstr ""
|
1364 |
+
|
1365 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:689
|
1366 |
+
msgid "Humans"
|
1367 |
+
msgstr ""
|
1368 |
+
|
1369 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:702
|
1370 |
+
msgid "Location For Analytics Code"
|
1371 |
+
msgstr ""
|
1372 |
+
|
1373 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:707
|
1374 |
+
msgid "Header"
|
1375 |
+
msgstr ""
|
1376 |
+
|
1377 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:712
|
1378 |
+
msgid "Footer"
|
1379 |
+
msgstr ""
|
1380 |
+
|
1381 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:717
|
1382 |
+
msgid "No JavaScript (you have your own/other already)"
|
1383 |
+
msgstr ""
|
1384 |
+
|
1385 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:723
|
1386 |
+
msgid "Use In Staff Area (wp-admin)"
|
1387 |
+
msgstr ""
|
1388 |
+
|
1389 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:729
|
1390 |
+
msgid "When To Run Analytics Code"
|
1391 |
+
msgstr ""
|
1392 |
+
|
1393 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:734
|
1394 |
+
msgid "Immediately"
|
1395 |
+
msgstr ""
|
1396 |
+
|
1397 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:739
|
1398 |
+
msgid "After Page Loads"
|
1399 |
+
msgstr ""
|
1400 |
+
|
1401 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:746
|
1402 |
+
msgid "Campaign Tracking Within URLs"
|
1403 |
+
msgstr ""
|
1404 |
+
|
1405 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:751
|
1406 |
+
msgid "In Anchor"
|
1407 |
+
msgstr ""
|
1408 |
+
|
1409 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:756
|
1410 |
+
msgid "In Parameters"
|
1411 |
+
msgstr ""
|
1412 |
+
|
1413 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:763
|
1414 |
+
msgid "Sample Rate"
|
1415 |
+
msgstr ""
|
1416 |
+
|
1417 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:763
|
1418 |
+
msgid ""
|
1419 |
+
"Specifies what percentage of users should be tracked. Very large sites may "
|
1420 |
+
"need to use a lower sample rate to stay within Google Analytics processing "
|
1421 |
+
"limits."
|
1422 |
+
msgstr ""
|
1423 |
+
|
1424 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:784
|
1425 |
+
msgid "Extra JavaScript"
|
1426 |
+
msgstr ""
|
1427 |
+
|
1428 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:784
|
1429 |
+
msgid ""
|
1430 |
+
"This allows you to add your own JavaScript code to the Analytics tracking "
|
1431 |
+
"code. This JavaScript is inserted right before the %1$s function."
|
1432 |
+
msgstr ""
|
1433 |
+
|
1434 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:791
|
1435 |
+
msgid "Debugging"
|
1436 |
+
msgstr ""
|
1437 |
+
|
1438 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:796
|
1439 |
+
msgid "Enable Google Analytics Debugging"
|
1440 |
+
msgstr ""
|
1441 |
+
|
1442 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/config.php:797
|
1443 |
+
msgid "This will display Google Analytics debug data in the browser console."
|
1444 |
+
msgstr ""
|
1445 |
+
|
1446 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:13
|
1447 |
+
msgid "%1$sSet up API access%2$s to utilize Better Analytics charts."
|
1448 |
+
msgstr ""
|
1449 |
+
|
1450 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:49
|
1451 |
+
msgid "by"
|
1452 |
+
msgstr ""
|
1453 |
+
|
1454 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:59
|
1455 |
+
msgid "for last"
|
1456 |
+
msgstr ""
|
1457 |
+
|
1458 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:63
|
1459 |
+
msgid "7 Days"
|
1460 |
+
msgstr ""
|
1461 |
+
|
1462 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:64
|
1463 |
+
msgid "14 Days"
|
1464 |
+
msgstr ""
|
1465 |
+
|
1466 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:65
|
1467 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:57
|
1468 |
+
msgid "1 Month"
|
1469 |
+
msgstr ""
|
1470 |
+
|
1471 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:66
|
1472 |
+
msgid "3 Months"
|
1473 |
+
msgstr ""
|
1474 |
+
|
1475 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:67
|
1476 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:58
|
1477 |
+
msgid "1 Year"
|
1478 |
+
msgstr ""
|
1479 |
+
|
1480 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:68
|
1481 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:60
|
1482 |
+
msgid "5 Years"
|
1483 |
+
msgstr ""
|
1484 |
+
|
1485 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:69
|
1486 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:61
|
1487 |
+
msgid "10 Years"
|
1488 |
+
msgstr ""
|
1489 |
+
|
1490 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php:86
|
1491 |
+
msgid "active users"
|
1492 |
+
msgstr ""
|
1493 |
+
|
1494 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:10
|
1495 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/events.php:7
|
1496 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:8
|
1497 |
+
msgid "Reports & Charts"
|
1498 |
+
msgstr ""
|
1499 |
+
|
1500 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:16
|
1501 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/events.php:13
|
1502 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:12
|
1503 |
+
msgid "Weekly Heat Maps"
|
1504 |
+
msgstr ""
|
1505 |
+
|
1506 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:19
|
1507 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/events.php:16
|
1508 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:15
|
1509 |
+
msgid "Issue Monitoring"
|
1510 |
+
msgstr ""
|
1511 |
+
|
1512 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:29
|
1513 |
+
msgid "Dimension"
|
1514 |
+
msgstr ""
|
1515 |
+
|
1516 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:52
|
1517 |
+
msgid "Time Frame"
|
1518 |
+
msgstr ""
|
1519 |
+
|
1520 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:59
|
1521 |
+
msgid "2 Years"
|
1522 |
+
msgstr ""
|
1523 |
+
|
1524 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:69
|
1525 |
+
msgid "Scope"
|
1526 |
+
msgstr ""
|
1527 |
+
|
1528 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:74
|
1529 |
+
msgid "Day"
|
1530 |
+
msgstr ""
|
1531 |
+
|
1532 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:75
|
1533 |
+
msgid "Month"
|
1534 |
+
msgstr ""
|
1535 |
+
|
1536 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:76
|
1537 |
+
msgid "Year"
|
1538 |
+
msgstr ""
|
1539 |
+
|
1540 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:87
|
1541 |
+
msgid "Minimum Value To Plot"
|
1542 |
+
msgstr ""
|
1543 |
+
|
1544 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:95
|
1545 |
+
msgid "Display Chart As"
|
1546 |
+
msgstr ""
|
1547 |
+
|
1548 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:98
|
1549 |
+
msgid "Stacked Area Percent"
|
1550 |
+
msgstr ""
|
1551 |
+
|
1552 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:99
|
1553 |
+
msgid "Stacked"
|
1554 |
+
msgstr ""
|
1555 |
+
|
1556 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php:100
|
1557 |
+
msgid "Overlap"
|
1558 |
+
msgstr ""
|
1559 |
+
|
1560 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/events.php:26
|
1561 |
+
msgid "Days Back"
|
1562 |
+
msgstr ""
|
1563 |
+
|
1564 |
+
#. translators: Sunday (day of the week), with everything between %s hidden on
|
1565 |
+
#. smaller screens (responsive)
|
1566 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:26
|
1567 |
+
msgid "Sun%sday%s"
|
1568 |
+
msgstr ""
|
1569 |
+
|
1570 |
+
#. translators: Monday (day of the week), with everything between %s hidden on
|
1571 |
+
#. smaller screens (responsive)
|
1572 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:31
|
1573 |
+
msgid "Mon%sday%s"
|
1574 |
+
msgstr ""
|
1575 |
+
|
1576 |
+
#. translators: Tuesday (day of the week), with everything between %s hidden on
|
1577 |
+
#. smaller screens (responsive)
|
1578 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:36
|
1579 |
+
msgid "Tue%ssday%s"
|
1580 |
+
msgstr ""
|
1581 |
+
|
1582 |
+
#. translators: Wednesday (day of the week), with everything between %s hidden
|
1583 |
+
#. on smaller screens (responsive)
|
1584 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:41
|
1585 |
+
msgid "Wed%snesday%s"
|
1586 |
+
msgstr ""
|
1587 |
+
|
1588 |
+
#. translators: Thursday (day of the week), with everything between %s hidden
|
1589 |
+
#. on smaller screens (responsive)
|
1590 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:46
|
1591 |
+
msgid "Thu%srsday%s"
|
1592 |
+
msgstr ""
|
1593 |
+
|
1594 |
+
#. translators: Friday (day of the week), with everything between %s hidden on
|
1595 |
+
#. smaller screens (responsive)
|
1596 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:51
|
1597 |
+
msgid "Fri%sday%s"
|
1598 |
+
msgstr ""
|
1599 |
+
|
1600 |
+
#. translators: Saturday (day of the week), with everything between %s hidden
|
1601 |
+
#. on smaller screens (responsive)
|
1602 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:56
|
1603 |
+
msgid "Sat%surday%s"
|
1604 |
+
msgstr ""
|
1605 |
+
|
1606 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:76
|
1607 |
+
msgid "Metric"
|
1608 |
+
msgstr ""
|
1609 |
+
|
1610 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:99
|
1611 |
+
msgid "Segment"
|
1612 |
+
msgstr ""
|
1613 |
+
|
1614 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:124
|
1615 |
+
msgid "Weeks Of Data, Ending"
|
1616 |
+
msgstr ""
|
1617 |
+
|
1618 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php:125
|
1619 |
+
msgid "Days Ago"
|
1620 |
+
msgstr ""
|
1621 |
+
|
1622 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:32
|
1623 |
+
msgid "Test Analytics Integration"
|
1624 |
+
msgstr ""
|
1625 |
+
|
1626 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:35
|
1627 |
+
msgid ""
|
1628 |
+
"This is a checklist of things for full integration with Google Analytics. "
|
1629 |
+
"You can click on any of the titles to be taken where you need to go to "
|
1630 |
+
"configure that item."
|
1631 |
+
msgstr ""
|
1632 |
+
|
1633 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:37
|
1634 |
+
msgid "Things That Can Be Automatically Checked"
|
1635 |
+
msgstr ""
|
1636 |
+
|
1637 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:40
|
1638 |
+
msgid "Web Property ID Defined"
|
1639 |
+
msgstr ""
|
1640 |
+
|
1641 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:49
|
1642 |
+
msgid "cURL Installed"
|
1643 |
+
msgstr ""
|
1644 |
+
|
1645 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:55
|
1646 |
+
msgid ""
|
1647 |
+
"Not required, but recommended to have the cURL extensions enabled in PHP."
|
1648 |
+
msgstr ""
|
1649 |
+
|
1650 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:75
|
1651 |
+
msgid "Google Analytics Account Linked"
|
1652 |
+
msgstr ""
|
1653 |
+
|
1654 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:82
|
1655 |
+
msgid "Analytics Profile Selected"
|
1656 |
+
msgstr ""
|
1657 |
+
|
1658 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:90
|
1659 |
+
msgid "Site Search Setup"
|
1660 |
+
msgstr ""
|
1661 |
+
|
1662 |
+
#. translators: %1$s = <strong>, %2$s = </strong>
|
1663 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:97
|
1664 |
+
msgid ""
|
1665 |
+
"Found in Google Analytics account under %1$sView Settings -> Query Parameter"
|
1666 |
+
"%2$s (should be set to \"%1$ss%2$s\")."
|
1667 |
+
msgstr ""
|
1668 |
+
|
1669 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:103
|
1670 |
+
msgid "Ecommerce Tracking Enabled"
|
1671 |
+
msgstr ""
|
1672 |
+
|
1673 |
+
#. translators: %1$s = <strong>, %2$s = </strong>
|
1674 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:111
|
1675 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:124
|
1676 |
+
msgid "Found in Google Analytics account under %1$sEcommerce Settings%2$s."
|
1677 |
+
msgstr ""
|
1678 |
+
|
1679 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:117
|
1680 |
+
msgid "Enhanced Ecommerce Tracking Enabled"
|
1681 |
+
msgstr ""
|
1682 |
+
|
1683 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:130
|
1684 |
+
msgid "Industry Vertical Set"
|
1685 |
+
msgstr ""
|
1686 |
+
|
1687 |
+
#. translators: %1$s = <strong>, %2$s = </strong>, %3$s = current setting in
|
1688 |
+
#. Google Analytics account
|
1689 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:137
|
1690 |
+
msgid ""
|
1691 |
+
"Found in Google Analytics account under %1$sProperty Settings%2$s (currently "
|
1692 |
+
"set to %1$s%3$s%2$s)."
|
1693 |
+
msgstr ""
|
1694 |
+
|
1695 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:143
|
1696 |
+
msgid "Custom Dimension For Category Tracking"
|
1697 |
+
msgstr ""
|
1698 |
+
|
1699 |
+
#. translators: %1$s = <strong>, %2$s = </strong> ... %3$s can't be translated
|
1700 |
+
#. - leave
|
1701 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:150
|
1702 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:165
|
1703 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:178
|
1704 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:192
|
1705 |
+
msgid ""
|
1706 |
+
"Found in Google Analytics account under %1$sCustom Definitions -> Custom "
|
1707 |
+
"Dimensions%2$s (should be named \"%1$s%3$s%2$s\" and scoped for \"%1$sHit%2$s"
|
1708 |
+
"\")."
|
1709 |
+
msgstr ""
|
1710 |
+
|
1711 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:156
|
1712 |
+
msgid "Custom Dimension For Author Tracking"
|
1713 |
+
msgstr ""
|
1714 |
+
|
1715 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:171
|
1716 |
+
msgid "Custom Dimension For Tag Tracking"
|
1717 |
+
msgstr ""
|
1718 |
+
|
1719 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:184
|
1720 |
+
msgid "Custom Dimension For User Tracking"
|
1721 |
+
msgstr ""
|
1722 |
+
|
1723 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:199
|
1724 |
+
msgid "Category Tracking Dimension Index Set"
|
1725 |
+
msgstr ""
|
1726 |
+
|
1727 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:208
|
1728 |
+
msgid "Author Tracking Dimension Index Set"
|
1729 |
+
msgstr ""
|
1730 |
+
|
1731 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:216
|
1732 |
+
msgid "Tag Tracking Dimension Index Set"
|
1733 |
+
msgstr ""
|
1734 |
+
|
1735 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:224
|
1736 |
+
msgid "Registered User Tracking Dimension Index Set"
|
1737 |
+
msgstr ""
|
1738 |
+
|
1739 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:232
|
1740 |
+
msgid "Better Analytics Pro License"
|
1741 |
+
msgstr ""
|
1742 |
+
|
1743 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:237
|
1744 |
+
msgid ""
|
1745 |
+
"A few extra advanced features are available when you license the Better "
|
1746 |
+
"Analytics Pro plugin. Please don't steal, a crazy amount of work went into "
|
1747 |
+
"this. Some of the extra features:"
|
1748 |
+
msgstr ""
|
1749 |
+
|
1750 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:241
|
1751 |
+
msgid "More metrics available for %1$sHeat Maps%2$s"
|
1752 |
+
msgstr ""
|
1753 |
+
|
1754 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:246
|
1755 |
+
msgid "More dimensions available for %1$sCharts%2$s"
|
1756 |
+
msgstr ""
|
1757 |
+
|
1758 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:251
|
1759 |
+
msgid "More %1$sadvertising platform click tracking%2$s"
|
1760 |
+
msgstr ""
|
1761 |
+
|
1762 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:256
|
1763 |
+
msgid "More %1$sissue monitoring options%2$s"
|
1764 |
+
msgstr ""
|
1765 |
+
|
1766 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:261
|
1767 |
+
msgid "%1$seCommerce tracking%2$s"
|
1768 |
+
msgstr ""
|
1769 |
+
|
1770 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:266
|
1771 |
+
msgid "Ability to do %1$sserver-side tracking of users%2$s"
|
1772 |
+
msgstr ""
|
1773 |
+
|
1774 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:271
|
1775 |
+
msgid "Faster API calls (utilizes a multi-threaded mechanism)"
|
1776 |
+
msgstr ""
|
1777 |
+
|
1778 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:276
|
1779 |
+
msgid "%1$sPriority support%2$s"
|
1780 |
+
msgstr ""
|
1781 |
+
|
1782 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:281
|
1783 |
+
msgid ""
|
1784 |
+
"A Warm & Fuzzy Feeling knowing you are helping to continue future development"
|
1785 |
+
msgstr ""
|
1786 |
+
|
1787 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:294
|
1788 |
+
msgid "Things That Need To Be Checked Manually"
|
1789 |
+
msgstr ""
|
1790 |
+
|
1791 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:297
|
1792 |
+
msgid "User-ID Tracking"
|
1793 |
+
msgstr ""
|
1794 |
+
|
1795 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:300
|
1796 |
+
msgid ""
|
1797 |
+
"Found in Google Analytics account under %1$sTracking Info -> User-ID%2$s."
|
1798 |
+
msgstr ""
|
1799 |
+
|
1800 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:305
|
1801 |
+
msgid "Demographic and Interest Reports"
|
1802 |
+
msgstr ""
|
1803 |
+
|
1804 |
+
#: library/DigitalPointBetterAnalytics/ViewAdmin/test.php:308
|
1805 |
+
msgid "Found in Google Analytics account under %1$sProperty Settings%1$s."
|
1806 |
+
msgstr ""
|
1807 |
+
|
1808 |
+
#: library/DigitalPointBetterAnalytics/Widget/PopularPosts.php:12
|
1809 |
+
msgid "Display the most popular content right now."
|
1810 |
+
msgstr ""
|
1811 |
+
|
1812 |
+
#: library/DigitalPointBetterAnalytics/Widget/PopularPosts.php:46
|
1813 |
+
msgid ""
|
1814 |
+
"No Linked Google Analytics Account (API access required for this widget). "
|
1815 |
+
"You can link one in the %1$sBetter Analytics API settings%2$s."
|
1816 |
+
msgstr ""
|
1817 |
+
|
1818 |
+
#: library/DigitalPointBetterAnalytics/Widget/PopularPosts.php:51
|
1819 |
+
msgid "Title:"
|
1820 |
+
msgstr ""
|
1821 |
+
|
1822 |
+
#: library/DigitalPointBetterAnalytics/Widget/PopularPosts.php:54
|
1823 |
+
msgid "Number of URLs to show:"
|
1824 |
+
msgstr ""
|
1825 |
+
|
1826 |
+
#. Plugin URI of the plugin/theme
|
1827 |
+
msgid "https://marketplace.digitalpoint.com/better-analytics.3354/item"
|
1828 |
+
msgstr ""
|
1829 |
+
|
1830 |
+
#. Description of the plugin/theme
|
1831 |
+
msgid ""
|
1832 |
+
"Adds Google Universal Analytics code to your WordPress site. Options to "
|
1833 |
+
"track most everything (social button interactions, advertising clicks, "
|
1834 |
+
"emails sent/opened, YouTube video engagement, custom dimension tracking of "
|
1835 |
+
"authors/categories, etc.) Integrates with API for reports/charts on "
|
1836 |
+
"dashboard, heatmaps and realtime traffic tracking."
|
1837 |
+
msgstr ""
|
1838 |
+
|
1839 |
+
#. Author URI of the plugin/theme
|
1840 |
+
msgid "https://www.digitalpoint.com/"
|
1841 |
+
msgstr ""
|
library/DigitalPointBetterAnalytics/Base/Admin.php
ADDED
@@ -0,0 +1,456 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_Base_Admin
|
4 |
+
{
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Protected constructor. Use {@link getInstance()} instead.
|
9 |
+
*/
|
10 |
+
protected function __construct()
|
11 |
+
{
|
12 |
+
}
|
13 |
+
|
14 |
+
public static final function getInstance()
|
15 |
+
{
|
16 |
+
if (!self::$_instance)
|
17 |
+
{
|
18 |
+
$class = __CLASS__;
|
19 |
+
self::$_instance = new $class;
|
20 |
+
|
21 |
+
self::$_instance->_initHooks();
|
22 |
+
}
|
23 |
+
|
24 |
+
return self::$_instance;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function canViewReports()
|
28 |
+
{
|
29 |
+
$currentUser = wp_get_current_user();
|
30 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
31 |
+
|
32 |
+
if (array_intersect((array)$currentUser->roles, (array)@$betterAnalyticsOptions['roles_view_reports']))
|
33 |
+
{
|
34 |
+
return true;
|
35 |
+
}
|
36 |
+
else
|
37 |
+
{
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
protected function _initHooks()
|
43 |
+
{
|
44 |
+
add_action('admin_init', array($this, 'admin_init'), 20);
|
45 |
+
add_action('admin_menu', array($this, 'admin_menu'));
|
46 |
+
add_action('admin_head', array($this, 'admin_head'));
|
47 |
+
|
48 |
+
add_action( 'wp_dashboard_setup', array($this, 'dashboard_setup'));
|
49 |
+
|
50 |
+
add_action('wp_ajax_better-analytics_heatmaps', array($this, 'display_page'));
|
51 |
+
add_action('wp_ajax_better-analytics_area_charts', array($this, 'display_page'));
|
52 |
+
add_action('wp_ajax_better-analytics_monitor', array($this, 'display_page'));
|
53 |
+
add_action('wp_ajax_better-analytics_events', array($this, 'display_page'));
|
54 |
+
|
55 |
+
add_action('wp_ajax_better-analytics_charts', array($this, 'display_charts'));
|
56 |
+
|
57 |
+
add_filter('plugin_action_links', array($this, 'plugin_action_links' ), 10, 2);
|
58 |
+
add_filter('wp_redirect', array($this, 'filter_redirect'));
|
59 |
+
add_filter( 'admin_footer_text', array($this, 'admin_footer_text' ));
|
60 |
+
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
61 |
+
|
62 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
63 |
+
if (!$betterAnalyticsOptions['property_id'])
|
64 |
+
{
|
65 |
+
add_action( 'admin_notices', array($this, 'not_configured' ) );
|
66 |
+
}
|
67 |
+
|
68 |
+
if (get_transient('ba_last_error'))
|
69 |
+
{
|
70 |
+
add_action( 'admin_notices', array($this, 'last_error' ) );
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
public function admin_init()
|
75 |
+
{
|
76 |
+
register_setting('better-analytics-group', 'better_analytics');
|
77 |
+
|
78 |
+
// allows us to use a redirect on the better_analytics-auth page
|
79 |
+
ob_start();
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
public function admin_menu()
|
84 |
+
{
|
85 |
+
$hook = add_management_page( __('Test Analytics Setup', 'better-analytics'), __('Test Analytics Setup', 'better-analytics'), 'manage_options', 'better-analytics_test', array($this, 'display_test_page') );
|
86 |
+
$hook = add_management_page( __('OAuth2 Endpoint', 'better-analytics'), __('OAuth2 Endpoint', 'better-analytics'), 'manage_options', 'better-analytics_auth', array($this, 'api_authentication') );
|
87 |
+
|
88 |
+
|
89 |
+
if ($this->canViewReports())
|
90 |
+
{
|
91 |
+
$hook = add_menu_page(__('Analytics', 'better-analytics'), __('Analytics', 'better-analytics'), 'read', 'better-analytics_heatmaps', null, 'dashicons-chart-line', 3.1975123 );
|
92 |
+
$hook = add_submenu_page( 'better-analytics_heatmaps', __('Heat Maps', 'better-analytics'), __('Reports', 'better-analytics'), 'read', 'better-analytics_heatmaps', array($this, 'display_page') );
|
93 |
+
|
94 |
+
$hook = add_submenu_page( 'better-analytics_heatmaps', __('Charts', 'better-analytics'), __('Charts', 'better-analytics'), 'read', 'better-analytics_areacharts', array($this, 'display_page') );
|
95 |
+
$hook = add_submenu_page( 'better-analytics_heatmaps', __('Issue Monitor', 'better-analytics'), __('Issue Monitor', 'better-analytics'), 'read', 'better-analytics_monitor', array($this, 'display_page') );
|
96 |
+
$hook = add_submenu_page( 'better-analytics_heatmaps', __('Events', 'better-analytics'), __('Events', 'better-analytics'), 'read', 'better-analytics_events', array($this, 'display_page') );
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
$hook = add_submenu_page( 'better-analytics_heatmaps', __('Settings', 'better-analytics'), __('Settings', 'better-analytics'), 'manage_options', 'options-general.php' . '?page=better-analytics' );
|
101 |
+
$hook = add_submenu_page( 'better-analytics_heatmaps', __('Test Setup', 'better-analytics'), __('Test Setup', 'better-analytics'), 'manage_options', 'tools.php' . '?page=better-analytics_test' );
|
102 |
+
|
103 |
+
|
104 |
+
$hook = add_options_page( __('Better Analytics', 'better-analytics'), __('Better Analytics', 'better-analytics'), 'manage_options', 'better-analytics', array($this, 'display_configuration_page'));
|
105 |
+
add_action( "load-$hook", array($this, 'admin_help'));
|
106 |
+
}
|
107 |
+
|
108 |
+
|
109 |
+
public function plugin_action_links( $links, $file)
|
110 |
+
{
|
111 |
+
if ($file == plugin_basename(BETTER_ANALYTICS_PLUGIN_DIR . '/better-analytics.php'))
|
112 |
+
{
|
113 |
+
$betterAnalyticsInternal = get_transient('ba_int');
|
114 |
+
|
115 |
+
wp_enqueue_style('better_analytics_admin_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/css/admin.css', array(), BETTER_ANALYTICS_VERSION);
|
116 |
+
|
117 |
+
$links['settings'] = '<a href="' . esc_url(menu_page_url('better-analytics', false)) . '">' . esc_html__('Settings' , 'better-analytics').'</a>';
|
118 |
+
|
119 |
+
krsort($links);
|
120 |
+
end($links);
|
121 |
+
$key = key($links);
|
122 |
+
$links[$key] .= '<p class="' . (DigitalPointBetterAnalytics_Base_Pro::$installed && @$betterAnalyticsInternal['v'] && @$betterAnalyticsInternal['l'] == DigitalPointBetterAnalytics_Base_Pro::$version ? 'green' : 'orange') . '"> ' .
|
123 |
+
(DigitalPointBetterAnalytics_Base_Pro::$installed ?
|
124 |
+
(@$betterAnalyticsInternal['v'] ?
|
125 |
+
(@$betterAnalyticsInternal['l'] != DigitalPointBetterAnalytics_Base_Pro::$version ?
|
126 |
+
sprintf('<a href="%1$s" target="_blank">%2$s</a><br />%3$s %4$s<br />%5$s %6$s',
|
127 |
+
esc_url(BETTER_ANALYTICS_PRO_PRODUCT_URL . '#utm_source=admin_plugins&utm_medium=wordpress&utm_campaign=plugin'),
|
128 |
+
__('Pro version not up to date.', 'better-analytics'),
|
129 |
+
__('Installed:', 'better-analytics'),
|
130 |
+
DigitalPointBetterAnalytics_Base_Pro::$version,
|
131 |
+
__('Latest:', 'better-analytics'),
|
132 |
+
@$betterAnalyticsInternal['l']
|
133 |
+
) :
|
134 |
+
sprintf('<a href="%1$s" target="_blank">%2$s</a> (%3$s)',
|
135 |
+
esc_url(BETTER_ANALYTICS_PRO_PRODUCT_URL . '#utm_source=admin_plugins&utm_medium=wordpress&utm_campaign=plugin'),
|
136 |
+
__('Pro version installed', 'better-analytics'),
|
137 |
+
@$betterAnalyticsInternal['l']
|
138 |
+
)
|
139 |
+
) :
|
140 |
+
sprintf(__('Pro version installed, but not active. Did you %1$sverify ownership of your domain%2$s?', 'better-analytics'),
|
141 |
+
'<a href="' . esc_url('https://forums.digitalpoint.com/marketplace/domain-verification#utm_source=admin_plugins&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">',
|
142 |
+
'</a>'
|
143 |
+
)
|
144 |
+
) :
|
145 |
+
sprintf('<a href="%1$s" target="_blank">%2$s</a>',
|
146 |
+
esc_url(BETTER_ANALYTICS_PRO_PRODUCT_URL . '#utm_source=admin_plugins&utm_medium=wordpress&utm_campaign=plugin'),
|
147 |
+
__('Pro version not installed.', 'better-analytics')
|
148 |
+
)
|
149 |
+
) .
|
150 |
+
'</p>';
|
151 |
+
}
|
152 |
+
|
153 |
+
return $links;
|
154 |
+
}
|
155 |
+
|
156 |
+
public function admin_head()
|
157 |
+
{
|
158 |
+
remove_submenu_page( 'tools.php', 'better-analytics_auth' );
|
159 |
+
|
160 |
+
$_reportingPages = array(
|
161 |
+
'better-analytics_heatmaps',
|
162 |
+
'better-analytics_areacharts',
|
163 |
+
'better-analytics_monitor',
|
164 |
+
'better-analytics_events'
|
165 |
+
);
|
166 |
+
|
167 |
+
$currentPage = (empty($GLOBALS['plugin_page']) || array_search($GLOBALS['plugin_page'], $_reportingPages) === false ? $_reportingPages[0] : $GLOBALS['plugin_page']);
|
168 |
+
|
169 |
+
foreach($_reportingPages as $page)
|
170 |
+
{
|
171 |
+
if ($currentPage != $page)
|
172 |
+
{
|
173 |
+
remove_submenu_page( 'better-analytics_heatmaps', $page);
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
178 |
+
if (@$betterAnalyticsOptions['javascript']['use_in_admin'])
|
179 |
+
{
|
180 |
+
include(BETTER_ANALYTICS_PLUGIN_DIR . 'js/universal.php');
|
181 |
+
}
|
182 |
+
|
183 |
+
}
|
184 |
+
|
185 |
+
public function dashboard_setup()
|
186 |
+
{
|
187 |
+
if ($this->canViewReports())
|
188 |
+
{
|
189 |
+
wp_add_dashboard_widget(
|
190 |
+
'better-analytics',
|
191 |
+
__('Better Analytics', 'better-analytics'),
|
192 |
+
array($this, 'dashboard_display')
|
193 |
+
);
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
public function dashboard_display()
|
198 |
+
{
|
199 |
+
$this->view('dashboard');
|
200 |
+
}
|
201 |
+
|
202 |
+
public function filter_redirect($location)
|
203 |
+
{
|
204 |
+
// Kind of a janky way to redirect back to the right tab... boo.
|
205 |
+
if (strpos($location, '/wp-admin/options-general.php?page=better-analytics&settings-updated=true') !== false && !empty($_POST['current_tab']))
|
206 |
+
{
|
207 |
+
$location .= '#top#' . $_POST['current_tab'];
|
208 |
+
}
|
209 |
+
|
210 |
+
return $location;
|
211 |
+
}
|
212 |
+
|
213 |
+
public function not_configured()
|
214 |
+
{
|
215 |
+
$this->_displayError(sprintf('%1$s<p><a href="%2$s" class="button button-primary">%3$s</a></p>', __('Google Analytics Web Property ID not selected.', 'better-analytics'), esc_url(menu_page_url('better-analytics', false)), __('Settings', 'better-analytics')));
|
216 |
+
}
|
217 |
+
|
218 |
+
public function last_error()
|
219 |
+
{
|
220 |
+
$this->_displayError(sprintf('<strong>%1$s</strong><br /><br />%2$s', __('Last Analytics Error:'), get_transient('ba_last_error')));
|
221 |
+
}
|
222 |
+
|
223 |
+
protected function _displayError($error)
|
224 |
+
{
|
225 |
+
echo '<div class="error"><p>' . $error . '</p></div>';
|
226 |
+
|
227 |
+
}
|
228 |
+
|
229 |
+
|
230 |
+
public function display_configuration_page()
|
231 |
+
{
|
232 |
+
$this->view('config');
|
233 |
+
}
|
234 |
+
|
235 |
+
public function display_test_page()
|
236 |
+
{
|
237 |
+
$this->view('test');
|
238 |
+
}
|
239 |
+
|
240 |
+
public function display_page()
|
241 |
+
{
|
242 |
+
if ($this->canViewReports())
|
243 |
+
{
|
244 |
+
global $plugin_page;
|
245 |
+
|
246 |
+
$method = 'action' . ucwords(strtolower(preg_replace('#[^a-z0-9]#i', '', substr($plugin_page ? $plugin_page : @$_REQUEST['action'], 17))));
|
247 |
+
|
248 |
+
$controller = $this->_getController();
|
249 |
+
if (method_exists($controller, $method))
|
250 |
+
{
|
251 |
+
$this->_getController()->$method();
|
252 |
+
}
|
253 |
+
else
|
254 |
+
{
|
255 |
+
echo sprintf('%1$s %2$s', __('Invalid method:', 'better-analytics'), $method);
|
256 |
+
}
|
257 |
+
}
|
258 |
+
}
|
259 |
+
|
260 |
+
|
261 |
+
public function display_charts()
|
262 |
+
{
|
263 |
+
if ($this->canViewReports())
|
264 |
+
{
|
265 |
+
$this->_getController()->actionCharts();
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
|
270 |
+
public function api_authentication()
|
271 |
+
{
|
272 |
+
if(!empty($_REQUEST['code']))
|
273 |
+
{
|
274 |
+
$code = $_REQUEST['code'];
|
275 |
+
|
276 |
+
$response = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->exchangeCodeForToken($code);
|
277 |
+
|
278 |
+
if (!empty($response->error) && !empty($response->error_description))
|
279 |
+
{
|
280 |
+
echo sprintf('%1$s<br /><br /><b>%2$s</b>: %3$s', __('Invalid Google API Code:', 'better-analytics'), $response->error, $response->error_description);
|
281 |
+
return;
|
282 |
+
}
|
283 |
+
|
284 |
+
if (empty($response->expires_in))
|
285 |
+
{
|
286 |
+
echo sprintf('%1$s:<br /><br />%2$s', __('Unknown Google API Error:', 'better-analytics'), nl2br(var_export($response, true)));
|
287 |
+
return;
|
288 |
+
}
|
289 |
+
|
290 |
+
$response->expires_at = time() + $response->expires_in - 100;
|
291 |
+
unset($response->expires_in);
|
292 |
+
|
293 |
+
update_option('ba_tokens', json_encode($response));
|
294 |
+
DigitalPointBetterAnalytics_CronEntry_Jobs::hour(true);
|
295 |
+
|
296 |
+
wp_redirect(menu_page_url('better-analytics', false) . '#top#api', 302);
|
297 |
+
|
298 |
+
return;
|
299 |
+
}
|
300 |
+
|
301 |
+
wp_redirect(DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getAuthenticationUrl(menu_page_url('better-analytics_auth', false)), 302);
|
302 |
+
}
|
303 |
+
|
304 |
+
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Add help to the Better Analytics page
|
308 |
+
*
|
309 |
+
* @return false if not the Better Analytics page
|
310 |
+
*/
|
311 |
+
public function admin_help() {
|
312 |
+
$current_screen = get_current_screen();
|
313 |
+
|
314 |
+
// Screen Content
|
315 |
+
if ( current_user_can( 'manage_options' ))
|
316 |
+
{
|
317 |
+
//configuration page
|
318 |
+
$current_screen->add_help_tab(
|
319 |
+
array(
|
320 |
+
'id' => 'overview',
|
321 |
+
'title' => __( 'Overview' , 'better-analytics'),
|
322 |
+
'content' =>
|
323 |
+
'<p><strong>' . esc_html__( 'Better Analytics' , 'better-analytics') . '</strong></p>' .
|
324 |
+
'<p>' . esc_html__( 'At the most basic level, it will automatically add Google Analytics Universal code to your website. It gives you the flexibility to track virtually everything about your site. From page views to YouTube video engagement (and everything in between).' , 'better-analytics') . '</p>',
|
325 |
+
)
|
326 |
+
);
|
327 |
+
|
328 |
+
$current_screen->add_help_tab(
|
329 |
+
array(
|
330 |
+
'id' => 'pro',
|
331 |
+
'title' => __( 'Pro' , 'better-analytics'),
|
332 |
+
'content' =>
|
333 |
+
'<p><strong>' . esc_html__( 'Pro Version' , 'better-analytics') . '</strong></p>' .
|
334 |
+
'<p>' . esc_html__( 'There is a Pro version of this plugin that gives you a few added features. More metrics/dimensions, more tracking options, etc.' , 'better-analytics') . '</p>' .
|
335 |
+
''
|
336 |
+
)
|
337 |
+
);
|
338 |
+
|
339 |
+
}
|
340 |
+
|
341 |
+
// Help Sidebar
|
342 |
+
$current_screen->set_help_sidebar(
|
343 |
+
'<p><strong>' . esc_html__( 'For more information:' , 'better-analytics') . '</strong></p>' .
|
344 |
+
'<p><a href="' . esc_url(BETTER_ANALYTICS_PRODUCT_URL . '#utm_source=admin_settings_help&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">' . esc_html__( 'Info' , 'better-analytics') . '</a></p>' .
|
345 |
+
'<p><a href="' . esc_url(BETTER_ANALYTICS_SUPPORT_URL . '#utm_source=admin_settings_help&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">' . esc_html__( 'Support' , 'better-analytics') . '</a></p>' .
|
346 |
+
'<p><a href="' . esc_url(BETTER_ANALYTICS_PRO_PRODUCT_URL . '#utm_source=admin_settings_help&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">' . esc_html__( 'Pro' , 'better-analytics') . '</a></p>'
|
347 |
+
|
348 |
+
);
|
349 |
+
}
|
350 |
+
|
351 |
+
|
352 |
+
public function admin_footer_text($footerText)
|
353 |
+
{
|
354 |
+
$currentScreen = get_current_screen();
|
355 |
+
|
356 |
+
if (isset($currentScreen->id) && strpos($currentScreen->id, 'better-analytics') !== false)
|
357 |
+
{
|
358 |
+
$_type = array(__('colossal', 'better-analytics'), __('elephantine', 'better-analytics'), __('glorious', 'better-analytics'), __('grand', 'better-analytics'), __('huge', 'better-analytics'), __('mighty', 'better-analytics'), sprintf('<span class="tooltip" title="%1$s">%2$s</span>', __('WTF?', 'better-analytics'), __('sexy', 'better-analytics')));
|
359 |
+
$_type = $_type[array_rand($_type)];
|
360 |
+
if (strpos($_type, '"tooltip"') !== false)
|
361 |
+
{
|
362 |
+
wp_enqueue_script('tooltipster_js', esc_url(BETTER_ANALYTICS_PLUGIN_URL . 'assets/tooltipster/js/jquery.tooltipster.min.js'), array(), BETTER_ANALYTICS_VERSION );
|
363 |
+
wp_enqueue_style('tooltipster_css', esc_url(BETTER_ANALYTICS_PLUGIN_URL . 'assets/tooltipster/css/tooltipster.css'), array(), BETTER_ANALYTICS_VERSION);
|
364 |
+
}
|
365 |
+
|
366 |
+
$footerText = sprintf(__('If you like %1$s, please leave us a %2$s rating. A %3$s thank you in advance!', 'better-analytics'),
|
367 |
+
'<strong>' . __('Better Analytics', 'better-analytics') . '</strong>',
|
368 |
+
'<a href="https://wordpress.org/support/view/plugin-reviews/better-analytics?filter=5#postform" target="_blank">★★★★★</a>',
|
369 |
+
$_type
|
370 |
+
);
|
371 |
+
}
|
372 |
+
return $footerText;
|
373 |
+
}
|
374 |
+
|
375 |
+
public function plugin_row_meta($links, $file)
|
376 |
+
{
|
377 |
+
if ($file == plugin_basename(BETTER_ANALYTICS_PLUGIN_DIR . '/better-analytics.php'))
|
378 |
+
{
|
379 |
+
$links['support'] = '<a href="' . esc_url(BETTER_ANALYTICS_SUPPORT_URL ) . '" title="' . esc_attr( __( 'Visit Support Forum', 'better-analytics' ) ) . '">' . __( 'Support', 'better-analytics' ) . '</a>';
|
380 |
+
}
|
381 |
+
|
382 |
+
return $links;
|
383 |
+
}
|
384 |
+
|
385 |
+
public static function getProfilePropertyIds($profiles)
|
386 |
+
{
|
387 |
+
$profilesOutput = array();
|
388 |
+
|
389 |
+
if (count($profiles) > 0)
|
390 |
+
{
|
391 |
+
foreach ($profiles as $profile)
|
392 |
+
{
|
393 |
+
if (empty($profilesOutput[$profile['webPropertyId']]))
|
394 |
+
{
|
395 |
+
$profilesOutput[$profile['webPropertyId']] = array($profile['websiteUrl'], $profile['name']);
|
396 |
+
}
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
return $profilesOutput;
|
401 |
+
}
|
402 |
+
|
403 |
+
|
404 |
+
public static function groupProfiles($profiles)
|
405 |
+
{
|
406 |
+
$profileOptions = array();
|
407 |
+
|
408 |
+
if (!empty($profiles))
|
409 |
+
{
|
410 |
+
$internalWebPropertyId = null;
|
411 |
+
$groupName = null;
|
412 |
+
$group = array();
|
413 |
+
|
414 |
+
foreach ($profiles as &$profile)
|
415 |
+
{
|
416 |
+
|
417 |
+
if ($profile['internalWebPropertyId'] != $internalWebPropertyId)
|
418 |
+
{
|
419 |
+
if (!empty($groupName))
|
420 |
+
{
|
421 |
+
$profileOptions[$groupName] = $group;
|
422 |
+
}
|
423 |
+
$group = array();
|
424 |
+
$groupName = $profile['websiteUrl'];
|
425 |
+
}
|
426 |
+
$group[$profile['id']] = $profile['name'];
|
427 |
+
|
428 |
+
$internalWebPropertyId = $profile['internalWebPropertyId'];
|
429 |
+
}
|
430 |
+
$profileOptions[$groupName] = $group;
|
431 |
+
|
432 |
+
}
|
433 |
+
return $profileOptions;
|
434 |
+
}
|
435 |
+
|
436 |
+
public function view($name, array $args = array())
|
437 |
+
{
|
438 |
+
// Shouldn't happen, but sanitize anyway
|
439 |
+
$name = preg_replace('#[^a-z0-9\/\_\-]#i' ,'', $name);
|
440 |
+
|
441 |
+
$args = apply_filters('better_analytics_view_arguments', $args, $name);
|
442 |
+
|
443 |
+
foreach ($args AS $key => $val)
|
444 |
+
{
|
445 |
+
$$key = $val;
|
446 |
+
}
|
447 |
+
|
448 |
+
include(BETTER_ANALYTICS_PLUGIN_DIR . 'library/DigitalPointBetterAnalytics/ViewAdmin/'. $name . '.php');
|
449 |
+
}
|
450 |
+
|
451 |
+
protected function _getController()
|
452 |
+
{
|
453 |
+
return new DigitalPointBetterAnalytics_ControllerAdmin_Analytics();
|
454 |
+
}
|
455 |
+
|
456 |
+
}
|
library/DigitalPointBetterAnalytics/Base/Pro.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_Base_Pro
|
4 |
+
{
|
5 |
+
public static $installed = false;
|
6 |
+
public static $version = null;
|
7 |
+
|
8 |
+
|
9 |
+
public static function track_blocked()
|
10 |
+
{
|
11 |
+
}
|
12 |
+
}
|
library/DigitalPointBetterAnalytics/Base/Public.php
ADDED
@@ -0,0 +1,448 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_Base_Public
|
4 |
+
{
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Protected constructor. Use {@link getInstance()} instead.
|
9 |
+
*/
|
10 |
+
protected function __construct()
|
11 |
+
{
|
12 |
+
}
|
13 |
+
|
14 |
+
public static final function getInstance()
|
15 |
+
{
|
16 |
+
if (!self::$_instance)
|
17 |
+
{
|
18 |
+
$class = __CLASS__;
|
19 |
+
self::$_instance = new $class;
|
20 |
+
|
21 |
+
self::$_instance->_initHooks();
|
22 |
+
}
|
23 |
+
|
24 |
+
return self::$_instance;
|
25 |
+
}
|
26 |
+
|
27 |
+
public static function autoload($class)
|
28 |
+
{
|
29 |
+
$filename = self::_autoloaderClassToFile($class);
|
30 |
+
if (!$filename)
|
31 |
+
{
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
|
35 |
+
$proLocation = substr_replace(BETTER_ANALYTICS_PLUGIN_DIR, '-pro', -1);
|
36 |
+
|
37 |
+
$allowed = false;
|
38 |
+
|
39 |
+
if (file_exists($proLocation . $filename))
|
40 |
+
{
|
41 |
+
$betterAnalyticsInternal = get_transient('ba_int');
|
42 |
+
|
43 |
+
if (@$betterAnalyticsInternal['v'] || strpos(@$_SERVER['SCRIPT_NAME'], '/plugins.php') !== false || $class == 'DigitalPointBetterAnalytics_Helper_Api')
|
44 |
+
{
|
45 |
+
$allowed = true;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
if($allowed)
|
50 |
+
{
|
51 |
+
include($proLocation . $filename);
|
52 |
+
return (class_exists($class, false) || interface_exists($class, false));
|
53 |
+
}
|
54 |
+
elseif (file_exists(BETTER_ANALYTICS_PLUGIN_DIR . $filename))
|
55 |
+
{
|
56 |
+
include(BETTER_ANALYTICS_PLUGIN_DIR . $filename);
|
57 |
+
return (class_exists($class, false) || interface_exists($class, false));
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
protected static function _autoloaderClassToFile($class)
|
62 |
+
{
|
63 |
+
if (preg_match('#[^a-zA-Z0-9_\\\\]#', $class))
|
64 |
+
{
|
65 |
+
return false;
|
66 |
+
}
|
67 |
+
|
68 |
+
return '/library/' . str_replace(array('_', '\\'), '/', $class) . '.php';
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Initializes WordPress hooks
|
75 |
+
*/
|
76 |
+
protected function _initHooks()
|
77 |
+
{
|
78 |
+
add_action( 'wp_loaded', array($this, 'track_blocked' ));
|
79 |
+
|
80 |
+
add_action( 'wp_head', array($this, 'insert_code_head' ));
|
81 |
+
add_action( 'wp_footer', array($this, 'insert_code_footer' ));
|
82 |
+
|
83 |
+
add_action( 'user_register', array($this, 'user_register' ));
|
84 |
+
|
85 |
+
add_action( 'wp_insert_comment', array($this, 'insert_comment'), 10, 2);
|
86 |
+
|
87 |
+
add_filter( 'wp_mail', array($this, 'filter_mail' ));
|
88 |
+
add_filter( 'the_permalink_rss', array($this, 'fiter_rss_links' ));
|
89 |
+
add_filter( 'the_content_feed', array($this, 'filter_rss_content' ));
|
90 |
+
|
91 |
+
add_action( 'better_analytics_cron_minutely', array('DigitalPointBetterAnalytics_CronEntry_Jobs', 'minute' ));
|
92 |
+
add_action( 'better_analytics_cron_hourly', array('DigitalPointBetterAnalytics_CronEntry_Jobs', 'hour' ));
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Do something on activation?
|
97 |
+
* @static
|
98 |
+
*/
|
99 |
+
public static function plugin_activation()
|
100 |
+
{
|
101 |
+
if (version_compare($GLOBALS['wp_version'], BETTER_ANALYTICS_MINIMUM_WP_VERSION, '<' ))
|
102 |
+
{
|
103 |
+
$message = sprintf(__('%1$sBetter Analytics %4$s requires WordPress %5$s or higher.%2$s%3$sPlease %6$supgrade WordPress%7$s to a current version.', 'better-analytics'),
|
104 |
+
'<strong>',
|
105 |
+
'</strong>',
|
106 |
+
'<br />',
|
107 |
+
BETTER_ANALYTICS_VERSION,
|
108 |
+
BETTER_ANALYTICS_MINIMUM_WP_VERSION,
|
109 |
+
'<a href="' . esc_url('https://codex.wordpress.org/Upgrading_WordPress') . '" target="_blank">',
|
110 |
+
'</a>'
|
111 |
+
);
|
112 |
+
|
113 |
+
self::_bailOnActivation($message);
|
114 |
+
}
|
115 |
+
|
116 |
+
wp_schedule_event(time(), 'minutely', 'better_analytics_cron_minutely');
|
117 |
+
wp_schedule_event(time(), 'hourly', 'better_analytics_cron_hourly');
|
118 |
+
|
119 |
+
if (!get_option('better_analytics'))
|
120 |
+
{
|
121 |
+
$_defaultOptions = array(
|
122 |
+
'property_id' => '',
|
123 |
+
'track_userid' => 1,
|
124 |
+
'events' => array(
|
125 |
+
'user_registration' => 1,
|
126 |
+
'create_comment' => 1,
|
127 |
+
'youtube' => 1,
|
128 |
+
'email' => 1,
|
129 |
+
'link_click' => 1,
|
130 |
+
'downloads' => 1,
|
131 |
+
'missing_images' => 1,
|
132 |
+
'error_404' => 1,
|
133 |
+
'ajax_request' => 1,
|
134 |
+
'error_js' => 1,
|
135 |
+
'error_ajax' => 1,
|
136 |
+
'error_console' => 1,
|
137 |
+
'error_youtube' => 1
|
138 |
+
),
|
139 |
+
'demographic_tracking' => 1,
|
140 |
+
'force_ssl' => 1,
|
141 |
+
'source_link' => array(
|
142 |
+
'rss' => 1,
|
143 |
+
'email' => 1
|
144 |
+
),
|
145 |
+
'roles_view_reports' => array('administrator'),
|
146 |
+
'file_extensions' => array(
|
147 |
+
'avi', 'doc', 'exe', 'gz', 'mpg', 'mp3', 'pdf', 'ppt', 'psd', 'rar', 'wmv', 'xls', 'zip'
|
148 |
+
),
|
149 |
+
'track_blocked' => 'never',
|
150 |
+
'javascript' => array(
|
151 |
+
'location' => 'header',
|
152 |
+
'run_time' => 'ready'
|
153 |
+
),
|
154 |
+
'campaign_tracking' => 'anchor',
|
155 |
+
|
156 |
+
'sample_rate' => 100
|
157 |
+
);
|
158 |
+
|
159 |
+
update_option('better_analytics', $_defaultOptions);
|
160 |
+
}
|
161 |
+
|
162 |
+
DigitalPointBetterAnalytics_Helper_Api::check(true);
|
163 |
+
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Do something on deactivation?
|
168 |
+
* @static
|
169 |
+
*/
|
170 |
+
public static function plugin_deactivation()
|
171 |
+
{
|
172 |
+
wp_clear_scheduled_hook('better_analytics_cron_minutely');
|
173 |
+
wp_clear_scheduled_hook('better_analytics_cron_hourly');
|
174 |
+
}
|
175 |
+
|
176 |
+
|
177 |
+
private static function _bailOnActivation($message, $deactivate = true)
|
178 |
+
{
|
179 |
+
?>
|
180 |
+
<!doctype html>
|
181 |
+
<html>
|
182 |
+
<head>
|
183 |
+
<meta charset="<?php bloginfo('charset'); ?>">
|
184 |
+
<style>
|
185 |
+
* {
|
186 |
+
text-align: center;
|
187 |
+
margin: 0;
|
188 |
+
padding: 0;
|
189 |
+
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
190 |
+
}
|
191 |
+
p {
|
192 |
+
margin-top: 1em;
|
193 |
+
font-size: 18px;
|
194 |
+
}
|
195 |
+
</style>
|
196 |
+
<body>
|
197 |
+
<p><?php echo ($message ); ?></p>
|
198 |
+
</body>
|
199 |
+
</html>
|
200 |
+
<?php
|
201 |
+
if ($deactivate)
|
202 |
+
{
|
203 |
+
$plugins = get_option('active_plugins');
|
204 |
+
$betterAnalytics = plugin_basename(BETTER_ANALYTICS_PLUGIN_DIR . 'better-analytics.php');
|
205 |
+
$update = false;
|
206 |
+
foreach ($plugins as $i => $plugin )
|
207 |
+
{
|
208 |
+
if ($plugin === $betterAnalytics)
|
209 |
+
{
|
210 |
+
$plugins[$i] = false;
|
211 |
+
$update = true;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
if ($update)
|
216 |
+
{
|
217 |
+
update_option( 'active_plugins', array_filter($plugins));
|
218 |
+
}
|
219 |
+
}
|
220 |
+
exit;
|
221 |
+
}
|
222 |
+
|
223 |
+
|
224 |
+
|
225 |
+
public function track_blocked()
|
226 |
+
{
|
227 |
+
wp_enqueue_script('jquery');
|
228 |
+
|
229 |
+
DigitalPointBetterAnalytics_Base_Pro::track_blocked();
|
230 |
+
}
|
231 |
+
|
232 |
+
|
233 |
+
public function insert_code_head()
|
234 |
+
{
|
235 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
236 |
+
if ($betterAnalyticsOptions['javascript']['location'] == 'header')
|
237 |
+
{
|
238 |
+
include(BETTER_ANALYTICS_PLUGIN_DIR . 'js/universal.php');
|
239 |
+
}
|
240 |
+
}
|
241 |
+
|
242 |
+
public function insert_code_footer()
|
243 |
+
{
|
244 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
245 |
+
if ($betterAnalyticsOptions['javascript']['location'] == 'footer')
|
246 |
+
{
|
247 |
+
include(BETTER_ANALYTICS_PLUGIN_DIR . 'js/universal.php');
|
248 |
+
}
|
249 |
+
}
|
250 |
+
|
251 |
+
|
252 |
+
public function user_register($userId)
|
253 |
+
{
|
254 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
255 |
+
|
256 |
+
if ($betterAnalyticsOptions['events']['user_registration'])
|
257 |
+
{
|
258 |
+
$analyticsClientId = self::getAnalyticsId();
|
259 |
+
|
260 |
+
DigitalPointBetterAnalytics_Helper_Analytics::getInstance()->event(
|
261 |
+
$betterAnalyticsOptions['property_id'],
|
262 |
+
$analyticsClientId,
|
263 |
+
$userId,
|
264 |
+
@$_SERVER['REMOTE_ADDR'],
|
265 |
+
'User',
|
266 |
+
'Registration'
|
267 |
+
);
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
+
public function insert_comment($id, $commentObject)
|
272 |
+
{
|
273 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
274 |
+
|
275 |
+
if ($betterAnalyticsOptions['events']['create_comment'])
|
276 |
+
{
|
277 |
+
$analyticsClientId = self::getAnalyticsId();
|
278 |
+
|
279 |
+
DigitalPointBetterAnalytics_Helper_Analytics::getInstance()->event(
|
280 |
+
$betterAnalyticsOptions['property_id'],
|
281 |
+
$analyticsClientId,
|
282 |
+
$commentObject->user_id,
|
283 |
+
@$_SERVER['REMOTE_ADDR'],
|
284 |
+
'Content',
|
285 |
+
'Comment',
|
286 |
+
@$_SERVER['HTTP_REFERER']
|
287 |
+
|
288 |
+
);
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
public function fiter_rss_links($link)
|
293 |
+
{
|
294 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
295 |
+
|
296 |
+
if (is_feed() && $betterAnalyticsOptions['source_link']['rss'])
|
297 |
+
{
|
298 |
+
if ($betterAnalyticsOptions['$betterAnalyticsOptions'] == 'anchor')
|
299 |
+
{
|
300 |
+
$urlDelimiter = '#';
|
301 |
+
}
|
302 |
+
elseif (strpos($link, '?') !== false)
|
303 |
+
{
|
304 |
+
$urlDelimiter = '&';
|
305 |
+
}
|
306 |
+
else
|
307 |
+
{
|
308 |
+
$urlDelimiter = '?';
|
309 |
+
}
|
310 |
+
return $link . $urlDelimiter . 'utm_source=rss&utm_medium=rss'; // '&utm_campaign=' . urlencode($post->post_title)
|
311 |
+
}
|
312 |
+
|
313 |
+
return $link;
|
314 |
+
}
|
315 |
+
|
316 |
+
public function filter_rss_content ($content)
|
317 |
+
{
|
318 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
319 |
+
|
320 |
+
if ($betterAnalyticsOptions['source_link']['rss'])
|
321 |
+
{
|
322 |
+
$content = preg_replace_callback(
|
323 |
+
'#(?<=[^a-z0-9@-]|^)(https?://|www\.)[^\s"><]+#iu',
|
324 |
+
array(__CLASS__, '_autoLinkUrlCallbackRss'),
|
325 |
+
$content
|
326 |
+
);
|
327 |
+
}
|
328 |
+
return $content;
|
329 |
+
}
|
330 |
+
|
331 |
+
|
332 |
+
public function filter_mail($atts)
|
333 |
+
{
|
334 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
335 |
+
$betterAnalyticsInternal = get_transient('ba_int');
|
336 |
+
|
337 |
+
if ($betterAnalyticsOptions['source_link']['email'])
|
338 |
+
{
|
339 |
+
$atts['message'] = preg_replace_callback(
|
340 |
+
'#(?<=[^a-z0-9@-]|^)(https?://|www\.)[^\s"><]+#iu',
|
341 |
+
array(__CLASS__, '_autoLinkUrlCallbackEmail'),
|
342 |
+
$atts['message']
|
343 |
+
);
|
344 |
+
}
|
345 |
+
|
346 |
+
if (!empty($betterAnalyticsOptions['property_id']) && @$betterAnalyticsOptions['events']['email'] && @$betterAnalyticsInternal['v'])
|
347 |
+
{
|
348 |
+
$analyticsClientId = uniqid();
|
349 |
+
|
350 |
+
$atts['message'] = '<html><body>' . nl2br(htmlentities($atts['message'])) . '<img src="https://www.google-analytics.com/collect?v=1&tid=' . urlencode($betterAnalyticsOptions['property_id']) . '&cid=' . $analyticsClientId . '&t=event&ec=Email&ea=Open&el=' . urlencode($atts['subject']) . '&cm=email&z=' . uniqid() . '" /></body></html>';
|
351 |
+
$atts['headers']['content_type'] = 'Content-Type: text/html; charset=UTF-8';
|
352 |
+
|
353 |
+
DigitalPointBetterAnalytics_Helper_Analytics::getInstance()->event(
|
354 |
+
$betterAnalyticsOptions['property_id'],
|
355 |
+
$analyticsClientId,
|
356 |
+
null,
|
357 |
+
null,
|
358 |
+
'Email',
|
359 |
+
'Send',
|
360 |
+
$atts['subject'],
|
361 |
+
'email',
|
362 |
+
true
|
363 |
+
);
|
364 |
+
}
|
365 |
+
|
366 |
+
return $atts;
|
367 |
+
}
|
368 |
+
|
369 |
+
|
370 |
+
public static function filter_cron_schedules($schedules)
|
371 |
+
{
|
372 |
+
$schedules['minutely'] = array(
|
373 |
+
'interval' => 60,
|
374 |
+
'display' => __('Every Minute', 'better-analytics')
|
375 |
+
);
|
376 |
+
return $schedules;
|
377 |
+
}
|
378 |
+
|
379 |
+
private static function _autoLinkUrlCallbackEmail($match)
|
380 |
+
{
|
381 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
382 |
+
|
383 |
+
if ($betterAnalyticsOptions['$betterAnalyticsOptions'] == 'anchor')
|
384 |
+
{
|
385 |
+
$urlDelimiter = '#';
|
386 |
+
}
|
387 |
+
elseif (strpos($match[0], '?') !== false)
|
388 |
+
{
|
389 |
+
$urlDelimiter = '&';
|
390 |
+
}
|
391 |
+
else
|
392 |
+
{
|
393 |
+
$urlDelimiter = '?';
|
394 |
+
}
|
395 |
+
|
396 |
+
return $match[0] . $urlDelimiter . 'utm_source=email&utm_medium=email';
|
397 |
+
|
398 |
+
}
|
399 |
+
|
400 |
+
private static function _autoLinkUrlCallbackRss($match)
|
401 |
+
{
|
402 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
403 |
+
|
404 |
+
if ($betterAnalyticsOptions['$betterAnalyticsOptions'] == 'anchor')
|
405 |
+
{
|
406 |
+
$urlDelimiter = '#';
|
407 |
+
}
|
408 |
+
elseif (strpos($match[0], '?') !== false)
|
409 |
+
{
|
410 |
+
$urlDelimiter = '&';
|
411 |
+
}
|
412 |
+
else
|
413 |
+
{
|
414 |
+
$urlDelimiter = '?';
|
415 |
+
}
|
416 |
+
|
417 |
+
return $match[0] . $urlDelimiter . 'utm_source=rss&utm_medium=rss';
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Log debugging info to the error log.
|
422 |
+
*
|
423 |
+
* Enabled when WP_DEBUG_LOG is enabled, but can be disabled via the better_analytics_debug_log filter.
|
424 |
+
*
|
425 |
+
* @param mixed $better_analytics_debug The data to log.
|
426 |
+
*/
|
427 |
+
public static function log( $better_analytics_debug )
|
428 |
+
{
|
429 |
+
if (apply_filters( 'better_analytics_debug_log', defined('WP_DEBUG_LOG') && WP_DEBUG_LOG ))
|
430 |
+
{
|
431 |
+
error_log( print_r( compact( 'better_analytics_debug' ), true ) );
|
432 |
+
}
|
433 |
+
}
|
434 |
+
|
435 |
+
public static function getAnalyticsId()
|
436 |
+
{
|
437 |
+
if (!empty($_COOKIE['_ga']))
|
438 |
+
{
|
439 |
+
$analyticsClientId = $_COOKIE['_ga'];
|
440 |
+
}
|
441 |
+
else
|
442 |
+
{
|
443 |
+
$analyticsClientId = null;
|
444 |
+
}
|
445 |
+
|
446 |
+
return $analyticsClientId;
|
447 |
+
}
|
448 |
+
}
|
library/DigitalPointBetterAnalytics/ControllerAdmin/Analytics.php
ADDED
@@ -0,0 +1,718 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_ControllerAdmin_Analytics
|
4 |
+
{
|
5 |
+
|
6 |
+
public function actionCharts()
|
7 |
+
{
|
8 |
+
// sanitize
|
9 |
+
$_POST['dimension'] = preg_replace('#[^a-z0-9\:]#i' ,'', @$_POST['dimension']);
|
10 |
+
$_POST['metric'] = preg_replace('#[^a-z0-9\:]#i' ,'', @$_POST['metric']);
|
11 |
+
$_POST['days'] = absint(@$_POST['days']);
|
12 |
+
$_POST['realtime'] = absint(@$_POST['realtime']);
|
13 |
+
|
14 |
+
$dimension = substr($_POST['dimension'], 2);
|
15 |
+
$type = substr($_POST['dimension'], 0, 1);
|
16 |
+
|
17 |
+
$betterAnalyticsPick = get_option('ba_dashboard_pick');
|
18 |
+
|
19 |
+
if ($_POST['dimension'] != @$betterAnalyticsPick['dimension'] || $_POST['metric'] != @$betterAnalyticsPick['metric'] || $_POST['days'] != @$betterAnalyticsPick['days'] || $_POST['realtime'] != @$betterAnalyticsPick['realtime'])
|
20 |
+
{
|
21 |
+
update_option('ba_dashboard_pick', array('dimension' => $_POST['dimension'], 'metric' => $_POST['metric'], 'days' => $_POST['days'], 'realtime' => $_POST['realtime']));
|
22 |
+
}
|
23 |
+
|
24 |
+
if (!empty($_POST['realtime']))
|
25 |
+
{
|
26 |
+
if (!$realTime = get_transient('ba_realtime'))
|
27 |
+
{
|
28 |
+
$realTime = DigitalPointBetterAnalytics_Model_Widget::getRealtimeData(55, true);
|
29 |
+
}
|
30 |
+
|
31 |
+
$realTimeOutput = array('users' => 0);
|
32 |
+
|
33 |
+
if (!empty($realTime))
|
34 |
+
{
|
35 |
+
foreach ($realTime as $key => $value)
|
36 |
+
{
|
37 |
+
if (is_array($value))
|
38 |
+
{
|
39 |
+
$realTimeOutput[$key][] = array(ucwords(strtolower(($key == 'keywords' ? __('Organic Search Keywords', 'better-analytics') : ($key == 'referral_path' ? __('Referring URL', 'better-analytics') : ($key == 'page_path' ? __('Current Page', 'better-analytics') : ($key == 'medium' ? __('Medium', 'better-analytics') : ($key == 'devices' ? __('Devices', 'better-analytics') : ''))))))), __('Visitors', 'better-analytics'));
|
40 |
+
foreach ($value as $name => $amount)
|
41 |
+
{
|
42 |
+
$realTimeOutput[$key][] = array($name, intval($amount));
|
43 |
+
}
|
44 |
+
}
|
45 |
+
else
|
46 |
+
{
|
47 |
+
$realTimeOutput[$key] = intval($value);
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
wp_send_json(array(
|
53 |
+
'realtime_data' => $realTimeOutput,
|
54 |
+
'title' => __('Realtime', 'better-analytics')
|
55 |
+
));
|
56 |
+
|
57 |
+
}
|
58 |
+
else
|
59 |
+
{
|
60 |
+
$validDimensions = $this->getDimensionsForCharts();
|
61 |
+
$validMetrics = $this->getMetricsForCharts();
|
62 |
+
|
63 |
+
$chartData = array_merge(array(array($validDimensions[$_POST['dimension']], $validMetrics[$_POST['metric']])), DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getChart(1, intval($_POST['days']), $_POST['metric'], $dimension));
|
64 |
+
wp_send_json(array(
|
65 |
+
'chart_data' => $chartData,
|
66 |
+
'title' => ($dimension == 'ga:date' ? $validMetrics[$_POST['metric']] : $validDimensions[$_POST['dimension']]),
|
67 |
+
'type' => $type
|
68 |
+
));
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
public function actionHeatmaps()
|
74 |
+
{
|
75 |
+
if (!$this->_assertLinkedAccount())
|
76 |
+
{
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
if ($_SERVER['REQUEST_METHOD'] == 'POST')
|
81 |
+
{
|
82 |
+
// sanitize
|
83 |
+
$regEx = '#[^a-z0-9\:\-\=\|\ \;]#i';
|
84 |
+
$_POST['metric'] = preg_replace($regEx ,'', @$_POST['metric']);
|
85 |
+
$_POST['segment'] = preg_replace($regEx ,'', @$_POST['segment']);
|
86 |
+
$_POST['end'] = absint(@$_POST['end']);
|
87 |
+
$_POST['weeks'] = absint(@$_POST['weeks']);
|
88 |
+
|
89 |
+
|
90 |
+
|
91 |
+
if (!DigitalPointBetterAnalytics_Helper_Api::check())
|
92 |
+
{
|
93 |
+
if (array_search($_POST['metric'], array('ga:users', 'ga:sessions', 'ga:hits', 'ga:organicSearches')) === false)
|
94 |
+
{
|
95 |
+
|
96 |
+
wp_send_json(array('error' => sprintf(__('Not all metrics are available for unlicensed copies of the Better Analytics plugin.%1$s%2$sYou can license a copy over here.%3$s%1$sIf this is a valid license, make sure the purchaser of the add-on has verified ownership of this domain %4$sover here%3$s.', 'better-analytics'),
|
97 |
+
'<br /><br />',
|
98 |
+
'<a href="' . esc_url(BETTER_ANALYTICS_PRO_PRODUCT_URL . '#utm_source=admin_reports_ajax&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">',
|
99 |
+
'</a>',
|
100 |
+
'<a href="' . esc_url('https://forums.digitalpoint.com/marketplace/domain-verification#utm_source=admin_reports_ajax&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">'
|
101 |
+
)));
|
102 |
+
}
|
103 |
+
}
|
104 |
+
$heatmapData = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getWeeklyHeatmap($_POST['end'], $_POST['weeks'], $_POST['metric'], $_POST['segment']);
|
105 |
+
|
106 |
+
wp_send_json(array('heatmap_data' => $heatmapData));
|
107 |
+
}
|
108 |
+
|
109 |
+
$heatmapData = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getWeeklyHeatmap(7, 10, 'ga:sessions');
|
110 |
+
$_hourMap = array();
|
111 |
+
for($i = 0; $i < 24; $i++)
|
112 |
+
{
|
113 |
+
$_hourMap[$i] = date('g A', $i * 3600);
|
114 |
+
}
|
115 |
+
|
116 |
+
$this->_view('reports/heatmaps', array(
|
117 |
+
'heatmap_data' => $heatmapData,
|
118 |
+
'metrics' => $this->_getMetrics(),
|
119 |
+
'segments' => $this->_getSegments(),
|
120 |
+
'hour_map' => $_hourMap
|
121 |
+
));
|
122 |
+
}
|
123 |
+
|
124 |
+
|
125 |
+
public function actionAreacharts()
|
126 |
+
{
|
127 |
+
if (!$this->_assertLinkedAccount())
|
128 |
+
{
|
129 |
+
return;
|
130 |
+
}
|
131 |
+
|
132 |
+
if ($_SERVER['REQUEST_METHOD'] == 'POST')
|
133 |
+
{
|
134 |
+
// sanitize
|
135 |
+
$_POST['dimension'] = preg_replace('#[^a-z0-9]#i' ,'', @$_POST['dimension']);
|
136 |
+
$_POST['scope'] = preg_replace('#[^a-z0-9]#i' ,'', @$_POST['scope']);
|
137 |
+
$_POST['time_frame'] = absint(@$_POST['time_frame']);
|
138 |
+
$_POST['minimum'] = absint(@$_POST['minimum']);
|
139 |
+
$_POST['chart_type'] = preg_replace('#[^a-z]#i' ,'', @$_POST['chart_type']);
|
140 |
+
if (!$_POST['chart_type'])
|
141 |
+
{
|
142 |
+
$_POST['chart_type'] = false;
|
143 |
+
}
|
144 |
+
|
145 |
+
|
146 |
+
if (!$_POST['time_frame'])
|
147 |
+
{
|
148 |
+
wp_send_json(array('error' => __('Invalid number of days.', 'better-analytics')));
|
149 |
+
}
|
150 |
+
elseif (!$_POST['dimension'])
|
151 |
+
{
|
152 |
+
wp_send_json(array('error' => __('Invalid dimension.', 'better-analytics')));
|
153 |
+
}
|
154 |
+
elseif (!DigitalPointBetterAnalytics_Helper_Api::check())
|
155 |
+
{
|
156 |
+
if (array_search($_POST['dimension'], array('browser', 'operatingSystem', 'source', 'medium')) === false)
|
157 |
+
{
|
158 |
+
|
159 |
+
wp_send_json(array('error' => sprintf(__('Not all dimensions are available for unlicensed copies of the Better Analytics plugin.%1$s%2$sYou can license a copy over here.%3$s%1$sIf this is a valid license, make sure the purchaser of the add-on has verified ownership of this domain %4$sover here%3$s.', 'better-analytics'),
|
160 |
+
'<br /><br />',
|
161 |
+
'<a href="' . esc_url(BETTER_ANALYTICS_PRO_PRODUCT_URL . '#utm_source=admin_reports_ajax&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">',
|
162 |
+
'</a>',
|
163 |
+
'<a href="' . esc_url('https://forums.digitalpoint.com/marketplace/domain-verification#utm_source=admin_reports_ajax&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">'
|
164 |
+
)));
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
|
169 |
+
$dateStart = date("Y-m-d", max(1104580800, time() - (86400 * ($_POST['time_frame'] + 1))));
|
170 |
+
$dateEnd = date("Y-m-d", time() - (86400));
|
171 |
+
|
172 |
+
switch ($_POST['scope'])
|
173 |
+
{
|
174 |
+
case 'month':
|
175 |
+
$scope = 'yearMonth';
|
176 |
+
break;
|
177 |
+
case 'year':
|
178 |
+
$scope = 'year';
|
179 |
+
break;
|
180 |
+
default:
|
181 |
+
$scope = 'date';
|
182 |
+
}
|
183 |
+
$originalDimension = $_POST['dimension'];
|
184 |
+
|
185 |
+
if ($_POST['dimension'] == 'searchNotProvided')
|
186 |
+
{
|
187 |
+
$extraFilter = ';ga:medium==organic;ga:keyword==(not provided)';
|
188 |
+
$_POST['dimension'] = 'keyword';
|
189 |
+
}
|
190 |
+
elseif ($_POST['dimension'] == 'oraganicSearchMarketshare')
|
191 |
+
{
|
192 |
+
$extraFilter = ';ga:medium==organic';
|
193 |
+
$_POST['dimension'] = 'source,ga:medium';
|
194 |
+
|
195 |
+
}
|
196 |
+
elseif ($_POST['dimension'] == 'mobileOperatingSystem')
|
197 |
+
{
|
198 |
+
$extraFilter = ';ga:isMobile==Yes';
|
199 |
+
$_POST['dimension'] = 'operatingSystem';
|
200 |
+
}
|
201 |
+
else
|
202 |
+
{
|
203 |
+
$extraFilter = '';
|
204 |
+
}
|
205 |
+
|
206 |
+
$cacheKey = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getData(
|
207 |
+
$dateStart,
|
208 |
+
$dateEnd,
|
209 |
+
'ga:sessions', // metric
|
210 |
+
'ga:' . $scope . ',ga:' . $_POST['dimension'], // dimensions
|
211 |
+
'ga:' . $scope . ',-ga:sessions', // sort
|
212 |
+
'ga:sessions>' . $_POST['minimum'] . $extraFilter // filters
|
213 |
+
);
|
214 |
+
|
215 |
+
if ($originalDimension == 'searchNotProvided')
|
216 |
+
{
|
217 |
+
$cacheKey2 = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getData(
|
218 |
+
$dateStart,
|
219 |
+
$dateEnd,
|
220 |
+
'ga:sessions', // metric
|
221 |
+
'ga:' . $scope, // dimensions
|
222 |
+
'ga:' . $scope . ',-ga:sessions', // sort
|
223 |
+
'ga:sessions>' . $_POST['minimum'] . ';ga:medium==organic'// filters
|
224 |
+
);
|
225 |
+
}
|
226 |
+
|
227 |
+
$results = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getResults($cacheKey);
|
228 |
+
|
229 |
+
if ($originalDimension == 'searchNotProvided')
|
230 |
+
{
|
231 |
+
$resultTotal = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getResults($cacheKey2);
|
232 |
+
|
233 |
+
$totalNotProvided = $consolidated = array();
|
234 |
+
|
235 |
+
if (!empty($results['rows']))
|
236 |
+
{
|
237 |
+
foreach ($results['rows'] as $row)
|
238 |
+
{
|
239 |
+
if ($row[1] == '(not provided)')
|
240 |
+
{
|
241 |
+
$totalNotProvided[$row[0]] = $row[2];
|
242 |
+
}
|
243 |
+
}
|
244 |
+
foreach ($resultTotal['rows'] as $row)
|
245 |
+
{
|
246 |
+
$consolidated[] = array_merge(array($row[0]), array(__('Keywords Provided', 'better-analytics'), $row[1] - @$totalNotProvided[$row[0]]));
|
247 |
+
$consolidated[] = array_merge(array($row[0]), array(__('Keywords Not Provided', 'better-analytics'), @$totalNotProvided[$row[0]] + 0));
|
248 |
+
}
|
249 |
+
|
250 |
+
$results['rows'] = $consolidated;
|
251 |
+
}
|
252 |
+
|
253 |
+
|
254 |
+
|
255 |
+
}
|
256 |
+
elseif ($originalDimension == 'oraganicSearchMarketshare')
|
257 |
+
{
|
258 |
+
|
259 |
+
if (!empty($results['rows']))
|
260 |
+
{
|
261 |
+
foreach ($results['rows'] as &$row)
|
262 |
+
{
|
263 |
+
$row[2] = $row[3];
|
264 |
+
$row[1] = (strlen($row[1]) > 3 ? ucwords($row[1]) : strtoupper($row[1]));
|
265 |
+
unset($row[3]);
|
266 |
+
}
|
267 |
+
}
|
268 |
+
}
|
269 |
+
|
270 |
+
$resultsOrdered = $resultsOutput = $allLabels = array();
|
271 |
+
if (!empty($results['rows']))
|
272 |
+
{
|
273 |
+
foreach ($results['rows'] as $row)
|
274 |
+
{
|
275 |
+
$allLabels[$row[1]] = null;
|
276 |
+
$resultsOrdered[$row[0]][$row[1]] = intval($row[2]);
|
277 |
+
}
|
278 |
+
|
279 |
+
ksort($allLabels, SORT_STRING);
|
280 |
+
|
281 |
+
foreach ($resultsOrdered as &$labels)
|
282 |
+
{
|
283 |
+
$labels = array_merge($labels, array_diff_key($allLabels, $labels));
|
284 |
+
ksort($labels, SORT_STRING);
|
285 |
+
}
|
286 |
+
|
287 |
+
$resultsOutput = array(array_merge(array('Date'), array_keys($allLabels)));
|
288 |
+
foreach ($resultsOutput[0] as &$item)
|
289 |
+
{
|
290 |
+
$item = (string)$item;
|
291 |
+
}
|
292 |
+
|
293 |
+
foreach ($resultsOrdered as $date => $values)
|
294 |
+
{
|
295 |
+
$resultsOutput[] = array_merge(array($date), array_values($values));
|
296 |
+
}
|
297 |
+
|
298 |
+
$title = '';
|
299 |
+
$dimensions = $this->_getDimensions();
|
300 |
+
foreach ($dimensions as $group)
|
301 |
+
{
|
302 |
+
foreach ($group as $key => $value)
|
303 |
+
{
|
304 |
+
if ($originalDimension == $key)
|
305 |
+
{
|
306 |
+
$title = $value;
|
307 |
+
break;
|
308 |
+
}
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
wp_send_json(array(
|
313 |
+
'chart_data' => $resultsOutput,
|
314 |
+
'chart_type' => $_POST['chart_type'],
|
315 |
+
'title' =>sprintf('%1$s %2$s', __('History for', 'better-analytics'), esc_html__($title))
|
316 |
+
));
|
317 |
+
}
|
318 |
+
|
319 |
+
wp_send_json(array(
|
320 |
+
'error' => __('No data for the criteria given', 'better-analytics')
|
321 |
+
));
|
322 |
+
|
323 |
+
|
324 |
+
}
|
325 |
+
|
326 |
+
|
327 |
+
|
328 |
+
$this->_view('reports/area_charts', array(
|
329 |
+
'dimensions' => $this->_getDimensions(),
|
330 |
+
));
|
331 |
+
}
|
332 |
+
|
333 |
+
public function actionMonitor()
|
334 |
+
{
|
335 |
+
if (!$this->_assertLinkedAccount())
|
336 |
+
{
|
337 |
+
return;
|
338 |
+
}
|
339 |
+
|
340 |
+
if ($_SERVER['REQUEST_METHOD'] == 'POST')
|
341 |
+
{
|
342 |
+
// sanitize
|
343 |
+
$_POST['days'] = absint(@$_POST['days']);
|
344 |
+
|
345 |
+
if (!$_POST['days'])
|
346 |
+
{
|
347 |
+
wp_send_json(array('error' => __('Invalid number of days.', 'better-analytics')));
|
348 |
+
}
|
349 |
+
|
350 |
+
$cacheKey = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getData(
|
351 |
+
$_POST['days'] . 'daysAgo',
|
352 |
+
'yesterday',
|
353 |
+
'ga:totalEvents', // metric
|
354 |
+
'ga:eventCategory,ga:eventAction,ga:eventLabel', // dimensions
|
355 |
+
'-ga:totalEvents,ga:eventCategory,ga:eventAction,ga:eventLabel', // sort
|
356 |
+
'ga:eventCategory==Error,ga:eventCategory==Image' // filters
|
357 |
+
);
|
358 |
+
|
359 |
+
$results = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getResults($cacheKey);
|
360 |
+
|
361 |
+
$chartOutput = array(array(
|
362 |
+
__('Events', 'better-analytics'),
|
363 |
+
__('Category', 'better-analytics'),
|
364 |
+
__('Type', 'better-analytics'),
|
365 |
+
__('Detail', 'better-analytics')
|
366 |
+
));
|
367 |
+
if (@$results['rows'])
|
368 |
+
{
|
369 |
+
foreach ($results['rows'] as $row)
|
370 |
+
{
|
371 |
+
$chartOutput[] = array(absint($row[3]), $row[0], $row[1], $row[2]);
|
372 |
+
}
|
373 |
+
|
374 |
+
wp_send_json(array(
|
375 |
+
'chart_data' => $chartOutput
|
376 |
+
));
|
377 |
+
}
|
378 |
+
|
379 |
+
wp_send_json(array(
|
380 |
+
'error' => __('No data for the criteria given', 'better-analytics')
|
381 |
+
));
|
382 |
+
}
|
383 |
+
|
384 |
+
$this->_view('reports/events', array('type' => 'monitor'));
|
385 |
+
}
|
386 |
+
|
387 |
+
public function actionEvents()
|
388 |
+
{
|
389 |
+
if (!$this->_assertLinkedAccount())
|
390 |
+
{
|
391 |
+
return;
|
392 |
+
}
|
393 |
+
|
394 |
+
if ($_SERVER['REQUEST_METHOD'] == 'POST')
|
395 |
+
{
|
396 |
+
// sanitize
|
397 |
+
$_POST['days'] = absint(@$_POST['days']);
|
398 |
+
|
399 |
+
if (!$_POST['days'])
|
400 |
+
{
|
401 |
+
wp_send_json(array('error' => __('Invalid number of days.', 'better-analytics')));
|
402 |
+
}
|
403 |
+
|
404 |
+
$cacheKey = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getData(
|
405 |
+
$_POST['days'] . 'daysAgo',
|
406 |
+
'yesterday',
|
407 |
+
'ga:totalEvents', // metric
|
408 |
+
'ga:eventCategory,ga:eventAction,ga:eventLabel', // dimensions
|
409 |
+
'-ga:totalEvents,ga:eventCategory,ga:eventAction,ga:eventLabel', // sort
|
410 |
+
'ga:eventCategory!=Error;ga:eventCategory!=Image' // filters
|
411 |
+
);
|
412 |
+
|
413 |
+
$results = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getResults($cacheKey);
|
414 |
+
|
415 |
+
$chartOutput = array(array(
|
416 |
+
__('Events', 'better-analytics'),
|
417 |
+
__('Category', 'better-analytics'),
|
418 |
+
__('Type', 'better-analytics'),
|
419 |
+
__('Detail', 'better-analytics')
|
420 |
+
));
|
421 |
+
if (@$results['rows'])
|
422 |
+
{
|
423 |
+
foreach ($results['rows'] as $row)
|
424 |
+
{
|
425 |
+
$chartOutput[] = array(absint($row[3]), $row[0], $row[1], $row[2]);
|
426 |
+
}
|
427 |
+
|
428 |
+
wp_send_json(array(
|
429 |
+
'chart_data' => $chartOutput
|
430 |
+
));
|
431 |
+
}
|
432 |
+
|
433 |
+
|
434 |
+
wp_send_json(array(
|
435 |
+
'error' => __('No data for the criteria given', 'better-analytics')
|
436 |
+
));
|
437 |
+
}
|
438 |
+
|
439 |
+
$this->_view('reports/events', array('type' => 'events'));
|
440 |
+
}
|
441 |
+
|
442 |
+
|
443 |
+
|
444 |
+
|
445 |
+
protected function _assertLinkedAccount()
|
446 |
+
{
|
447 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
448 |
+
|
449 |
+
if (!get_option('ba_tokens') || !@$betterAnalyticsOptions['api']['profile'])
|
450 |
+
{
|
451 |
+
$this->_responseException(sprintf('%1$s <a href="%2$s">%3$s</a>',
|
452 |
+
__('No Linked Google Analytics Account.', 'better-analytics'),
|
453 |
+
menu_page_url('better-analytics', false) . '#top#api',
|
454 |
+
__('You can link one in the Better Analytics API settings.', 'better-analytics')
|
455 |
+
));
|
456 |
+
|
457 |
+
return false;
|
458 |
+
}
|
459 |
+
return true;
|
460 |
+
}
|
461 |
+
|
462 |
+
|
463 |
+
protected function _getMetrics()
|
464 |
+
{
|
465 |
+
return array(
|
466 |
+
__('User', 'better-analytics') => array(
|
467 |
+
'ga:users' => __('Users', 'better-analytics'),
|
468 |
+
),
|
469 |
+
__('Session', 'better-analytics') => array(
|
470 |
+
'ga:sessions' => __('Sessions', 'better-analytics'),
|
471 |
+
'ga:hits' => __('Hits', 'better-analytics'),
|
472 |
+
),
|
473 |
+
__('Traffic Sources', 'better-analytics') => array(
|
474 |
+
'ga:organicSearches' => __('Organic Search', 'better-analytics'),
|
475 |
+
),
|
476 |
+
__('AdWords', 'better-analytics') => array(
|
477 |
+
'ga:impressions' => __('Impressions', 'better-analytics'),
|
478 |
+
'ga:adClicks' => __('Clicks', 'better-analytics'),
|
479 |
+
'ga:adCost' => __('Cost', 'better-analytics'),
|
480 |
+
'ga:CPM' => __('CPM', 'better-analytics'),
|
481 |
+
'ga:CPC' => __('CPC', 'better-analytics'),
|
482 |
+
),
|
483 |
+
__('Social Activities', 'better-analytics') => array(
|
484 |
+
'ga:socialActivities' => __('Social Activities', 'better-analytics'),
|
485 |
+
),
|
486 |
+
__('Page Tracking', 'better-analytics') => array(
|
487 |
+
'ga:pageviews' => __('Page Views', 'better-analytics'),
|
488 |
+
),
|
489 |
+
__('Internal Search', 'better-analytics') => array(
|
490 |
+
'ga:searchUniques' => __('Unique Searches', 'better-analytics'),
|
491 |
+
),
|
492 |
+
__('Site Speed', 'better-analytics') => array(
|
493 |
+
'ga:pageLoadTime' => __('Page Load Time', 'better-analytics'),
|
494 |
+
),
|
495 |
+
__('Event Tracking', 'better-analytics') => array(
|
496 |
+
'ga:totalEvents' => __('Total Events', 'better-analytics'),
|
497 |
+
'ga:uniqueEvents' => __('Unique Events', 'better-analytics'),
|
498 |
+
'ga:totalEvents|ga:eventCategory==User;ga:eventAction==Registration' => __('User Registrations', 'better-analytics'),
|
499 |
+
'ga:totalEvents|ga:eventCategory==Content;ga:eventAction==Comment' => __('Comments Created', 'better-analytics'),
|
500 |
+
'ga:totalEvents|ga:eventCategory==YouTube Video;ga:eventAction==Playing' => __('YouTube Video Played', 'better-analytics'),
|
501 |
+
'ga:totalEvents|ga:eventCategory==YouTube Video;ga:eventAction==Paused' => __('YouTube Video Paused', 'better-analytics'),
|
502 |
+
'ga:totalEvents|ga:eventCategory==YouTube Video;ga:eventAction==Ended' => __('YouTube Video Plays To End', 'better-analytics'),
|
503 |
+
'ga:totalEvents|ga:eventCategory==Email;ga:eventAction==Send' => __('Emails Sent', 'better-analytics'),
|
504 |
+
'ga:totalEvents|ga:eventCategory==Email;ga:eventAction==Open' => __('Emails Opened', 'better-analytics'),
|
505 |
+
'ga:totalEvents|ga:eventCategory==Link;ga:eventAction==Click' => __('External Links Clicked', 'better-analytics'),
|
506 |
+
'ga:totalEvents|ga:eventCategory==Link;ga:eventAction==Download' => __('File Downloads', 'better-analytics'),
|
507 |
+
'ga:totalEvents|ga:eventCategory==Image;ga:eventAction==Not Loaded' => __('Images Not Loading', 'better-analytics'),
|
508 |
+
'ga:totalEvents|ga:eventCategory==Error;ga:eventAction==Page Not Found' => __('Page Not Found (404)', 'better-analytics'),
|
509 |
+
'ga:totalEvents|ga:eventCategory==AJAX Request;ga:eventAction==Trigger' => __('AJAX Requests', 'better-analytics'),
|
510 |
+
'ga:totalEvents|ga:eventCategory==Error;ga:eventAction==JavaScript' => __('JavaScript Errors', 'better-analytics'),
|
511 |
+
'ga:totalEvents|ga:eventCategory==Error;ga:eventAction==AJAX' => __('AJAX Errors', 'better-analytics'),
|
512 |
+
'ga:totalEvents|ga:eventCategory==Error;ga:eventAction==Browser Console' => __('Browser Console Errors', 'better-analytics'),
|
513 |
+
'ga:totalEvents|ga:eventCategory==Error;ga:eventAction=~^YouTube' => __('YouTube Errors', 'better-analytics'),
|
514 |
+
|
515 |
+
'ga:totalEvents|ga:eventCategory==Advertisement;ga:eventAction==Click' => __('Advertisement Clicked', 'better-analytics'),
|
516 |
+
|
517 |
+
),
|
518 |
+
__('Ecommerce', 'better-analytics') => array(
|
519 |
+
'ga:transactions' => __('Transactions', 'better-analytics'),
|
520 |
+
'ga:transactionRevenue' => __('Transaction Revenue', 'better-analytics'),
|
521 |
+
'ga:revenuePerTransaction' => __('Revenue Per Transaction', 'better-analytics'),
|
522 |
+
),
|
523 |
+
__('Social Interactions', 'better-analytics') => array(
|
524 |
+
'ga:socialInteractions' => __('Social Interactions', 'better-analytics'),
|
525 |
+
'ga:uniqueSocialInteractions' => __('Unique Social Interactions', 'better-analytics'),
|
526 |
+
),
|
527 |
+
__('DoubleClick Campaign Manager', 'better-analytics') => array(
|
528 |
+
'ga:dcmCPC' => __('CPC', 'better-analytics'),
|
529 |
+
'ga:dcmCTR' => __('CTR', 'better-analytics'),
|
530 |
+
'ga:dcmClicks' => __('Clicks', 'better-analytics'),
|
531 |
+
'ga:dcmCost' => __('Cost', 'better-analytics'),
|
532 |
+
'ga:dcmImpressions' => __('Impressions', 'better-analytics'),
|
533 |
+
),
|
534 |
+
__('AdSense', 'better-analytics') => array(
|
535 |
+
'ga:adsenseRevenue' => __('Revenue', 'better-analytics'),
|
536 |
+
'ga:adsenseAdsViewed' => __('Views', 'better-analytics'),
|
537 |
+
'ga:adsenseAdsClicks' => __('Clicks', 'better-analytics'),
|
538 |
+
'ga:adsensePageImpressions' => __('Page Impressions', 'better-analytics'),
|
539 |
+
'ga:adsenseCTR' => __('CTR', 'better-analytics'),
|
540 |
+
'ga:adsenseECPM' => __('ECPM', 'better-analytics'),
|
541 |
+
'ga:adsenseExits' => __('Exits', 'better-analytics'),
|
542 |
+
'ga:adsenseViewableImpressionPercent' => __('Viewable Impressions', 'better-analytics'),
|
543 |
+
'ga:adsenseCoverage' => __('Coverage', 'better-analytics'),
|
544 |
+
)
|
545 |
+
);
|
546 |
+
}
|
547 |
+
|
548 |
+
protected function _getSegments()
|
549 |
+
{
|
550 |
+
return array(
|
551 |
+
__('Default Segments', 'better-analytics') => array(
|
552 |
+
'' => __('Everything', 'better-analytics'),
|
553 |
+
'gaid::-1' => __('All Visits', 'better-analytics'),
|
554 |
+
'gaid::-2' => __('New Visitors', 'better-analytics'),
|
555 |
+
'gaid::-3' => __('Returning Visitors', 'better-analytics'),
|
556 |
+
'gaid::-4' => __('Paid Search Traffic', 'better-analytics'),
|
557 |
+
'gaid::-5' => __('Non-paid Search Traffic', 'better-analytics'),
|
558 |
+
'gaid::-6' => __('Search Traffic', 'better-analytics'),
|
559 |
+
'gaid::-7' => __('Direct Traffic', 'better-analytics'),
|
560 |
+
'gaid::-8' => __('Referral Traffic', 'better-analytics'),
|
561 |
+
'gaid::-9' => __('Visits with Conversions', 'better-analytics'),
|
562 |
+
'gaid::-10' => __('Visits with Transactions', 'better-analytics'),
|
563 |
+
'gaid::-11' => __('Mobile and Tablet Traffic', 'better-analytics'),
|
564 |
+
'gaid::-12' => __('Non-bounce Visits', 'better-analytics'),
|
565 |
+
'gaid::-13' => __('Tablet Traffic', 'better-analytics'),
|
566 |
+
'gaid::-14' => __('Mobile Traffic', 'better-analytics'),
|
567 |
+
'dynamic::ga:userGender==male' => __('Male Users', 'better-analytics'),
|
568 |
+
'dynamic::ga:userGender==female' => __('Female Users', 'better-analytics'),
|
569 |
+
|
570 |
+
)
|
571 |
+
);
|
572 |
+
}
|
573 |
+
|
574 |
+
|
575 |
+
|
576 |
+
protected function _getDimensions()
|
577 |
+
{
|
578 |
+
return array(
|
579 |
+
__('Visitor', 'better-analytics') => array(
|
580 |
+
'visitorType' => __('Visitor Type', 'better-analytics'),
|
581 |
+
'visitCount' => __('Visit Count', 'better-analytics'),
|
582 |
+
'daysSinceLastVisit' => __('Days Since Last Visit', 'better-analytics'),
|
583 |
+
),
|
584 |
+
__('Traffic Sources', 'better-analytics') => array(
|
585 |
+
'source' => __('Source', 'better-analytics'),
|
586 |
+
'medium' => __('Medium', 'better-analytics'),
|
587 |
+
'socialNetwork' => __('Social Network', 'better-analytics'),
|
588 |
+
'searchNotProvided' => __('Search Keywords Provided', 'better-analytics'),
|
589 |
+
'oraganicSearchMarketshare' => __('Organic Search Marketshare', 'better-analytics'),
|
590 |
+
),
|
591 |
+
__('Platform', 'better-analytics') => array(
|
592 |
+
'browser' => __('Browser', 'better-analytics'),
|
593 |
+
'operatingSystem' => __('Operating System', 'better-analytics'),
|
594 |
+
'operatingSystemVersion' => __('Operating System Version', 'better-analytics'),
|
595 |
+
'isMobile' => __('Is Mobile', 'better-analytics'),
|
596 |
+
'isTablet' => __('Is Tablet', 'better-analytics'),
|
597 |
+
'mobileOperatingSystem' => __('Mobile Operating System', 'better-analytics'),
|
598 |
+
'mobileDeviceMarketingName' => __('Mobile Device Marketing Name', 'better-analytics'),
|
599 |
+
'mobileDeviceBranding' => __('Mobile Device Branding', 'better-analytics'),
|
600 |
+
'mobileDeviceModel' => __('Mobile Device Model', 'better-analytics'),
|
601 |
+
'mobileInputSelector' => __('Mobile Input Selector', 'better-analytics'),
|
602 |
+
'mobileDeviceInfo' => __('Mobile Device Info', 'better-analytics'),
|
603 |
+
),
|
604 |
+
__('Geo / Network', 'better-analytics') => array(
|
605 |
+
'continent' => __('Continent', 'better-analytics'),
|
606 |
+
'subContinent' => __('Sub-Continent', 'better-analytics'),
|
607 |
+
'country' => __('Country', 'better-analytics'),
|
608 |
+
),
|
609 |
+
__('System', 'better-analytics') => array(
|
610 |
+
'flashVersion' => __('Flash Version', 'better-analytics'),
|
611 |
+
'javaEnabled' => __('Java Enabled', 'better-analytics'),
|
612 |
+
'language' => __('Language', 'better-analytics'),
|
613 |
+
'screenColors' => __('Screen Colors', 'better-analytics'),
|
614 |
+
'screenResolution' => __('Screen Resolution', 'better-analytics'),
|
615 |
+
),
|
616 |
+
__('Internal Search', 'better-analytics') => array(
|
617 |
+
'searchUsed' => __('Search Used', 'better-analytics'),
|
618 |
+
),
|
619 |
+
__('Page Tracking', 'better-analytics') => array(
|
620 |
+
'hostname' => __('Hostname', 'better-analytics'),
|
621 |
+
),
|
622 |
+
__('Social Interactions', 'better-analytics') => array(
|
623 |
+
'socialInteractionNetwork' => __('Social Network', 'better-analytics'),
|
624 |
+
'socialInteractionAction' => __('Social Action', 'better-analytics'),
|
625 |
+
'socialInteractionNetworkAction' => __('Social Network Action', 'better-analytics'),
|
626 |
+
'socialEngagementType' => __('Social Engagement Type', 'better-analytics'),
|
627 |
+
),
|
628 |
+
__('Custom Variables', 'better-analytics') => array(
|
629 |
+
'dimension1' => __('Custom Dimension 1', 'better-analytics'),
|
630 |
+
'dimension2' => __('Custom Dimension 2', 'better-analytics'),
|
631 |
+
'dimension3' => __('Custom Dimension 3', 'better-analytics'),
|
632 |
+
'dimension4' => __('Custom Dimension 4', 'better-analytics'),
|
633 |
+
'dimension5' => __('Custom Dimension 5', 'better-analytics'),
|
634 |
+
'customVarValue1' => __('Custom Variable Value 1', 'better-analytics'),
|
635 |
+
'customVarValue2' => __('Custom Variable Value 2', 'better-analytics'),
|
636 |
+
'customVarValue3' => __('Custom Variable Value 3', 'better-analytics'),
|
637 |
+
'customVarValue4' => __('Custom Variable Value 4', 'better-analytics'),
|
638 |
+
'customVarValue5' => __('Custom Variable Value 5', 'better-analytics'),
|
639 |
+
),
|
640 |
+
__('Audience', 'better-analytics') => array(
|
641 |
+
'visitorAgeBracket' => __('Age Bracket', 'better-analytics'),
|
642 |
+
'visitorGender' => __('Gender', 'better-analytics'),
|
643 |
+
'interestAffinityCategory' => __('Interest Affinity', 'better-analytics'),
|
644 |
+
'interestInMarketCategory' => __('Interest In Market', 'better-analytics'),
|
645 |
+
'interestOtherCategory' => __('Interest Other', 'better-analytics'),
|
646 |
+
),
|
647 |
+
);
|
648 |
+
}
|
649 |
+
|
650 |
+
|
651 |
+
|
652 |
+
protected function _responseException($error)
|
653 |
+
{
|
654 |
+
echo '<div class="error"><p>' . $error . '</p></div>';
|
655 |
+
}
|
656 |
+
|
657 |
+
protected function _responseError($error)
|
658 |
+
{
|
659 |
+
echo '<div class="error"><p>' . $error . '</p></div>';
|
660 |
+
}
|
661 |
+
|
662 |
+
static public function getDimensionsForCharts()
|
663 |
+
{
|
664 |
+
$dimensions = array();
|
665 |
+
|
666 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
667 |
+
|
668 |
+
$dimensions['l:ga:date'] = __('Date', 'better-analytics');
|
669 |
+
|
670 |
+
if (!empty($betterAnalyticsOptions['dimension']['category']))
|
671 |
+
{
|
672 |
+
$dimensions['p:ga:dimension' . $betterAnalyticsOptions['dimension']['category']] = __('Categories', 'better-analytics');
|
673 |
+
}
|
674 |
+
if (!empty($betterAnalyticsOptions['dimension']['author']))
|
675 |
+
{
|
676 |
+
$dimensions['p:ga:dimension' . $betterAnalyticsOptions['dimension']['author']] = __('Authors', 'better-analytics');
|
677 |
+
}
|
678 |
+
if (!empty($betterAnalyticsOptions['dimension']['tag']))
|
679 |
+
{
|
680 |
+
$dimensions['p:ga:dimension' . $betterAnalyticsOptions['dimension']['tag']] = __('Tags', 'better-analytics');
|
681 |
+
}
|
682 |
+
|
683 |
+
$dimensions['p:ga:source'] = __('Source', 'better-analytics');
|
684 |
+
$dimensions['p:ga:fullReferrer'] = __('Referrer', 'better-analytics');
|
685 |
+
|
686 |
+
$dimensions['p:ga:medium'] = __('Medium', 'better-analytics');
|
687 |
+
$dimensions['g:ga:country'] = __('Country', 'better-analytics');
|
688 |
+
//$dimensions['g:ga:region'] = __('Region', 'better-analytics');
|
689 |
+
//$dimensions['g:ga:city'] = __('City', 'better-analytics');
|
690 |
+
|
691 |
+
|
692 |
+
/*
|
693 |
+
if (!empty($betterAnalyticsOptions['dimension']['user']))
|
694 |
+
{
|
695 |
+
$dimensions['p:ga:dimension' . $betterAnalyticsOptions['dimension']['user']] = __('Top Registered Users', 'better-analytics');
|
696 |
+
}
|
697 |
+
*/
|
698 |
+
return $dimensions;
|
699 |
+
}
|
700 |
+
|
701 |
+
static public function getMetricsForCharts()
|
702 |
+
{
|
703 |
+
$metrics = array(
|
704 |
+
'ga:pageviews' => __('Page Views', 'better-analytics'),
|
705 |
+
'ga:sessions' => __('Sessions', 'better-analytics'),
|
706 |
+
'ga:users' => __('Users', 'better-analytics'),
|
707 |
+
'ga:avgSessionDuration' => __('Session Length', 'better-analytics'),
|
708 |
+
'ga:organicSearches' => __('Organic Search', 'better-analytics')
|
709 |
+
);
|
710 |
+
|
711 |
+
return $metrics;
|
712 |
+
}
|
713 |
+
|
714 |
+
protected function _view($name, array $args = array())
|
715 |
+
{
|
716 |
+
DigitalPointBetterAnalytics_Base_Admin::getInstance()->view($name, $args);
|
717 |
+
}
|
718 |
+
}
|
library/DigitalPointBetterAnalytics/CronEntry/Jobs.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_CronEntry_Jobs
|
4 |
+
{
|
5 |
+
public static function minute()
|
6 |
+
{
|
7 |
+
if (is_active_widget(false, false, 'better-analytics_popular_widget'))
|
8 |
+
{
|
9 |
+
DigitalPointBetterAnalytics_Model_Widget::getRealtimeData();
|
10 |
+
}
|
11 |
+
}
|
12 |
+
|
13 |
+
public static function hour($all = false)
|
14 |
+
{
|
15 |
+
// This really should be a core WordPress function (deleting expired transients), but w/e...
|
16 |
+
|
17 |
+
global $wpdb;
|
18 |
+
|
19 |
+
if (!$all)
|
20 |
+
{
|
21 |
+
$time = time();
|
22 |
+
}
|
23 |
+
else
|
24 |
+
{
|
25 |
+
$time = time() + (86400 * 365);
|
26 |
+
}
|
27 |
+
|
28 |
+
$sql = "DELETE a, b FROM $wpdb->options a, $wpdb->options b
|
29 |
+
WHERE a.option_name LIKE %s
|
30 |
+
AND a.option_name NOT LIKE %s
|
31 |
+
AND b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) )
|
32 |
+
AND b.option_value < %d";
|
33 |
+
$wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_transient_ba_' ) . '%', $wpdb->esc_like( '_transient_timeout_' ) . '%', $time ) );
|
34 |
+
}
|
35 |
+
}
|
library/DigitalPointBetterAnalytics/Helper/Analytics.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_Helper_Analytics extends DigitalPointBetterAnalytics_Helper_Analytics_Advanced
|
4 |
+
{
|
5 |
+
protected $_urlInfo = array();
|
6 |
+
|
7 |
+
protected function _getOption($option)
|
8 |
+
{
|
9 |
+
switch ($option)
|
10 |
+
{
|
11 |
+
case 'userDimensionIndex':
|
12 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
13 |
+
return @$betterAnalyticsOptions['dimension']['user'];
|
14 |
+
|
15 |
+
case 'internalV':
|
16 |
+
$betterAnalyticsOptions = get_transient('ba_int');
|
17 |
+
return @$betterAnalyticsOptions['v'];
|
18 |
+
|
19 |
+
default:
|
20 |
+
return false;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
protected function _initHttp($url)
|
25 |
+
{
|
26 |
+
$this->_urlInfo['url'] = $url;
|
27 |
+
}
|
28 |
+
|
29 |
+
protected function _setParamsAction($params)
|
30 |
+
{
|
31 |
+
$this->_urlInfo['params'] = $params;
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function _execHandlerAction()
|
35 |
+
{
|
36 |
+
wp_remote_post($this->_urlInfo['url'],
|
37 |
+
array(
|
38 |
+
'body' => $this->_urlInfo['params']
|
39 |
+
)
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
library/DigitalPointBetterAnalytics/Helper/Analytics/Abstract.php
ADDED
@@ -0,0 +1,292 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
abstract class DigitalPointBetterAnalytics_Helper_Analytics_Abstract
|
4 |
+
{
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
protected static $_analyticsEndPoint = 'https://www.google-analytics.com/collect';
|
8 |
+
|
9 |
+
protected static $_options = null;
|
10 |
+
|
11 |
+
protected $_currentHandle = null;
|
12 |
+
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Protected constructor. Use {@link getInstance()} instead.
|
16 |
+
*/
|
17 |
+
protected function __construct()
|
18 |
+
{
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Need to put this method in the abstract class unfortunately because PHP 5.2 doesn't support late static binding
|
23 |
+
*/
|
24 |
+
protected static final function _resolveClass()
|
25 |
+
{
|
26 |
+
if(class_exists('XenForo_Application'))
|
27 |
+
{
|
28 |
+
$class = XenForo_Application::resolveDynamicClass('DigitalPointBetterAnalytics_Helper_Analytics');
|
29 |
+
self::$_instance = new $class();
|
30 |
+
}
|
31 |
+
else
|
32 |
+
{
|
33 |
+
self::$_instance = new DigitalPointBetterAnalytics_Helper_Analytics();
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
protected function _postResolveClass()
|
38 |
+
{
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Gets the single instance of class.
|
44 |
+
*
|
45 |
+
* @return DigitalPointBetterAnalytics_Helper_Analytics
|
46 |
+
*/
|
47 |
+
public static final function getInstance()
|
48 |
+
{
|
49 |
+
if (!self::$_instance)
|
50 |
+
{
|
51 |
+
self::_resolveClass();
|
52 |
+
self::$_instance->_postResolveClass();
|
53 |
+
}
|
54 |
+
|
55 |
+
return self::$_instance;
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
abstract protected function _getOption($type);
|
60 |
+
|
61 |
+
abstract protected function _initHttp($url);
|
62 |
+
|
63 |
+
abstract protected function _setParamsAction($params);
|
64 |
+
|
65 |
+
abstract protected function _execHandlerAction();
|
66 |
+
|
67 |
+
|
68 |
+
public function transaction($trackingId, $clientId, $userId, $ipAddress, $transactionId, $transactionRevenue, $currencyCode = false, array $items, $affiliation = false)
|
69 |
+
{
|
70 |
+
$this->prepareClientId($clientId);
|
71 |
+
|
72 |
+
$this->_getHandler();
|
73 |
+
|
74 |
+
$params = array(
|
75 |
+
'tid' => $trackingId,
|
76 |
+
'cid' => $clientId,
|
77 |
+
'uid' => $userId,
|
78 |
+
'uip' => $ipAddress,
|
79 |
+
't' => 'transaction',
|
80 |
+
'ni' => 1,
|
81 |
+
'ti' => $transactionId,
|
82 |
+
|
83 |
+
'tr' => $transactionRevenue
|
84 |
+
);
|
85 |
+
|
86 |
+
$dimensionIndex = $this->_getOption('userDimensionIndex');
|
87 |
+
if ($dimensionIndex)
|
88 |
+
{
|
89 |
+
$params['cd' . $dimensionIndex] = $userId;
|
90 |
+
}
|
91 |
+
|
92 |
+
if ($affiliation)
|
93 |
+
{
|
94 |
+
$params['ta'] = $affiliation;
|
95 |
+
}
|
96 |
+
if ($currencyCode)
|
97 |
+
{
|
98 |
+
$params['cu'] = $currencyCode;
|
99 |
+
}
|
100 |
+
|
101 |
+
$this->_setParams($params);
|
102 |
+
$this->_execHandler();
|
103 |
+
|
104 |
+
if ($items)
|
105 |
+
{
|
106 |
+
foreach ($items as $item)
|
107 |
+
{
|
108 |
+
$this->_getHandler();
|
109 |
+
|
110 |
+
$params = array(
|
111 |
+
'tid' => $trackingId,
|
112 |
+
'cid' => $clientId,
|
113 |
+
'uid' => $userId,
|
114 |
+
'uip' => $ipAddress,
|
115 |
+
't' => 'item',
|
116 |
+
'ni' => 1,
|
117 |
+
'ti' => $transactionId,
|
118 |
+
|
119 |
+
'in' => $item['name'],
|
120 |
+
'ip' => $item['price'],
|
121 |
+
'iq' => $item['quantity'],
|
122 |
+
'ic' => $item['code'],
|
123 |
+
'iv' => $item['category'],
|
124 |
+
|
125 |
+
'pa' => $item['action']
|
126 |
+
);
|
127 |
+
|
128 |
+
if ($dimensionIndex)
|
129 |
+
{
|
130 |
+
$params['cd' . $dimensionIndex] = $userId;
|
131 |
+
}
|
132 |
+
|
133 |
+
if ($affiliation)
|
134 |
+
{
|
135 |
+
$params['ta'] = $affiliation;
|
136 |
+
}
|
137 |
+
if ($currencyCode)
|
138 |
+
{
|
139 |
+
$params['cu'] = $currencyCode;
|
140 |
+
}
|
141 |
+
|
142 |
+
$this->_setParams($params);
|
143 |
+
$this->_execHandler();
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
public function social($trackingId, $clientId, $userId, $ipAddress, $socialNetwork, $socialAction, $socialActionTarget)
|
149 |
+
{
|
150 |
+
$this->prepareClientId($clientId);
|
151 |
+
|
152 |
+
$this->_getHandler();
|
153 |
+
|
154 |
+
$params = array(
|
155 |
+
'tid' => $trackingId,
|
156 |
+
'cid' => $clientId,
|
157 |
+
'uid' => $userId,
|
158 |
+
'uip' => $ipAddress,
|
159 |
+
't' => 'social',
|
160 |
+
|
161 |
+
'sn' => $socialNetwork,
|
162 |
+
'sa' => $socialAction,
|
163 |
+
'st' => $socialActionTarget
|
164 |
+
);
|
165 |
+
|
166 |
+
$dimensionIndex = $this->_getOption('userDimensionIndex');
|
167 |
+
if ($dimensionIndex)
|
168 |
+
{
|
169 |
+
$params['cd' . $dimensionIndex] = $userId;
|
170 |
+
}
|
171 |
+
|
172 |
+
$this->_setParams($params);
|
173 |
+
$this->_execHandler();
|
174 |
+
}
|
175 |
+
|
176 |
+
public function event($trackingId, $clientId, $userId, $ipAddress, $category, $action, $label = null, $campaignMedium = null, $nonInteractive = false)
|
177 |
+
{
|
178 |
+
$this->prepareClientId($clientId);
|
179 |
+
|
180 |
+
$this->_getHandler();
|
181 |
+
|
182 |
+
$params = array(
|
183 |
+
'tid' => $trackingId,
|
184 |
+
'cid' => $clientId,
|
185 |
+
't' => 'event',
|
186 |
+
|
187 |
+
'ec' => $category,
|
188 |
+
'ea' => $action
|
189 |
+
);
|
190 |
+
|
191 |
+
if($label)
|
192 |
+
{
|
193 |
+
$params['el'] = $label;
|
194 |
+
}
|
195 |
+
|
196 |
+
if($ipAddress)
|
197 |
+
{
|
198 |
+
$params['uip'] = $ipAddress;
|
199 |
+
}
|
200 |
+
|
201 |
+
if($nonInteractive)
|
202 |
+
{
|
203 |
+
$params['ni'] = 1;
|
204 |
+
}
|
205 |
+
|
206 |
+
if($campaignMedium)
|
207 |
+
{
|
208 |
+
$params['cm'] = $campaignMedium;
|
209 |
+
}
|
210 |
+
|
211 |
+
$userId = intval($userId);
|
212 |
+
if ($userId)
|
213 |
+
{
|
214 |
+
$params['uid'] = $userId;
|
215 |
+
|
216 |
+
$dimensionIndex = $this->_getOption('userDimensionIndex');
|
217 |
+
if ($dimensionIndex)
|
218 |
+
{
|
219 |
+
$params['cd' . $dimensionIndex] = $userId;
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
$this->_setParams($params);
|
224 |
+
$this->_execHandler();
|
225 |
+
}
|
226 |
+
|
227 |
+
public function pageview($trackingId, $clientId, $userId, $params)
|
228 |
+
{
|
229 |
+
$this->prepareClientId($clientId);
|
230 |
+
|
231 |
+
$this->_getHandler();
|
232 |
+
|
233 |
+
$params = array(
|
234 |
+
'tid' => $trackingId,
|
235 |
+
'cid' => $clientId,
|
236 |
+
't' => 'pageview',
|
237 |
+
) + $params;
|
238 |
+
|
239 |
+
$userId = intval($userId);
|
240 |
+
if ($userId)
|
241 |
+
{
|
242 |
+
$params['uid'] = $userId;
|
243 |
+
|
244 |
+
$dimensionIndex = $this->_getOption('userDimensionIndex');
|
245 |
+
if ($dimensionIndex)
|
246 |
+
{
|
247 |
+
$params['cd' . $dimensionIndex] = $userId;
|
248 |
+
}
|
249 |
+
}
|
250 |
+
|
251 |
+
$this->_setParams($params);
|
252 |
+
$this->_execHandler();
|
253 |
+
}
|
254 |
+
|
255 |
+
public function prepareClientId(&$clientId)
|
256 |
+
{
|
257 |
+
if (substr($clientId, 0, 6) == 'GA1.2.')
|
258 |
+
{
|
259 |
+
$clientId = substr($clientId, 6);
|
260 |
+
}
|
261 |
+
|
262 |
+
if (!$clientId)
|
263 |
+
{
|
264 |
+
$clientId = uniqid('', true);
|
265 |
+
}
|
266 |
+
}
|
267 |
+
|
268 |
+
protected function _canUseCurlMulti()
|
269 |
+
{
|
270 |
+
return false;
|
271 |
+
}
|
272 |
+
|
273 |
+
|
274 |
+
protected function _getHandler()
|
275 |
+
{
|
276 |
+
$this->_currentHandle = $this->_initHttp(self::$_analyticsEndPoint);
|
277 |
+
}
|
278 |
+
|
279 |
+
protected function _setParams(array $params)
|
280 |
+
{
|
281 |
+
$params['v'] = 1;
|
282 |
+
$params['ds'] = 'server side';
|
283 |
+
|
284 |
+
$this->_setParamsAction($params);
|
285 |
+
}
|
286 |
+
|
287 |
+
protected function _execHandler()
|
288 |
+
{
|
289 |
+
$this->_execHandlerAction();
|
290 |
+
}
|
291 |
+
|
292 |
+
}
|
library/DigitalPointBetterAnalytics/Helper/Analytics/Advanced.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
abstract class DigitalPointBetterAnalytics_Helper_Analytics_Advanced extends DigitalPointBetterAnalytics_Helper_Analytics_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
library/DigitalPointBetterAnalytics/Helper/Api.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_Helper_Api
|
4 |
+
{
|
5 |
+
public static function check($force = false)
|
6 |
+
{
|
7 |
+
$betterAnalyticsInternal = get_transient('ba_int');
|
8 |
+
|
9 |
+
if ($force || @$betterAnalyticsInternal['d'] + 21600 < time()) // 6 hours
|
10 |
+
{
|
11 |
+
set_transient('ba_int', array('d' => time(), 'l' => null, 'v' => false));
|
12 |
+
return false;
|
13 |
+
}
|
14 |
+
else
|
15 |
+
{
|
16 |
+
return @$betterAnalyticsInternal['v'];
|
17 |
+
}
|
18 |
+
}
|
19 |
+
}
|
library/DigitalPointBetterAnalytics/Helper/Reporting.php
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_Helper_Reporting extends DigitalPointBetterAnalytics_Helper_Reporting_Advanced
|
4 |
+
{
|
5 |
+
protected $_credentials = array(
|
6 |
+
'client_id' => '416831151869-fks5s6f1d9q3a1j6ua0158hqclde21ta.apps.googleusercontent.com',
|
7 |
+
'client_secret' => 'zkhfn3qPn0y-Dg8ZXHBeHBR9',
|
8 |
+
'auth_url' => 'https://api.digitalpoint.com/v1/better-analytics/link'
|
9 |
+
);
|
10 |
+
|
11 |
+
protected $_urlInfo = array();
|
12 |
+
|
13 |
+
protected function _getOption($option)
|
14 |
+
{
|
15 |
+
switch ($option)
|
16 |
+
{
|
17 |
+
case 'apiClientId':
|
18 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
19 |
+
if (@$betterAnalyticsOptions['api']['use_own'])
|
20 |
+
{
|
21 |
+
return @$betterAnalyticsOptions['api']['client_id'];
|
22 |
+
}
|
23 |
+
else
|
24 |
+
{
|
25 |
+
return $this->_credentials['client_id'];
|
26 |
+
}
|
27 |
+
case 'apiClientSecret':
|
28 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
29 |
+
if (@$betterAnalyticsOptions['api']['use_own'])
|
30 |
+
{
|
31 |
+
return @$betterAnalyticsOptions['api']['client_secret'];
|
32 |
+
}
|
33 |
+
else
|
34 |
+
{
|
35 |
+
return $this->_credentials['client_secret'];
|
36 |
+
}
|
37 |
+
case 'apiProfile':
|
38 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
39 |
+
return @$betterAnalyticsOptions['api']['profile'];
|
40 |
+
|
41 |
+
case 'tokens':
|
42 |
+
return @json_decode(get_option('ba_tokens'));
|
43 |
+
|
44 |
+
case 'internalV':
|
45 |
+
$betterAnalyticsOptions = get_transient('ba_int');
|
46 |
+
return @$betterAnalyticsOptions['v'];
|
47 |
+
|
48 |
+
default:
|
49 |
+
return false;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
protected function _saveTokens($tokens)
|
54 |
+
{
|
55 |
+
update_option('ba_tokens', json_encode($tokens));
|
56 |
+
}
|
57 |
+
|
58 |
+
protected function _deleteTokens()
|
59 |
+
{
|
60 |
+
delete_option('ba_tokens');
|
61 |
+
}
|
62 |
+
|
63 |
+
protected function _throwException()
|
64 |
+
{
|
65 |
+
$this->_cacheSave('ba_last_error', __('No API tokens to refresh.', 'better-analytics'), 0.15); // 9 seconds
|
66 |
+
|
67 |
+
return;
|
68 |
+
}
|
69 |
+
|
70 |
+
protected function _showException($message)
|
71 |
+
{
|
72 |
+
$this->_cacheSave('ba_last_error', $message, 0.15); // 9 seconds
|
73 |
+
error_log($message);
|
74 |
+
return;
|
75 |
+
}
|
76 |
+
|
77 |
+
protected function _getAdminAuthUrl()
|
78 |
+
{
|
79 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
80 |
+
if (@$betterAnalyticsOptions['api']['use_own'])
|
81 |
+
{
|
82 |
+
return menu_page_url('better-analytics_auth', false);
|
83 |
+
}
|
84 |
+
else
|
85 |
+
{
|
86 |
+
return $this->_credentials['auth_url'];
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
|
91 |
+
protected function _initHttp($url)
|
92 |
+
{
|
93 |
+
$this->_urlInfo['url'] = $url;
|
94 |
+
}
|
95 |
+
|
96 |
+
protected function _setParamsAction($params)
|
97 |
+
{
|
98 |
+
$this->_urlInfo['params'] = $params;
|
99 |
+
}
|
100 |
+
|
101 |
+
protected function _execHandlerAction($action = 'POST')
|
102 |
+
{
|
103 |
+
if ($action == 'POST')
|
104 |
+
{
|
105 |
+
$response = wp_remote_post($this->_urlInfo['url'],
|
106 |
+
array(
|
107 |
+
'body' => $this->_urlInfo['params']
|
108 |
+
)
|
109 |
+
);
|
110 |
+
}
|
111 |
+
else
|
112 |
+
{
|
113 |
+
$response = wp_remote_get($this->_urlInfo['url'] . '?' . http_build_query($this->_urlInfo['params']));
|
114 |
+
}
|
115 |
+
|
116 |
+
return $response['body'];
|
117 |
+
}
|
118 |
+
|
119 |
+
|
120 |
+
protected function _cacheLoad($cacheKey)
|
121 |
+
{
|
122 |
+
$result = get_transient($cacheKey);
|
123 |
+
|
124 |
+
self::$_cachedResults[$cacheKey] = $result;
|
125 |
+
|
126 |
+
return $result;
|
127 |
+
}
|
128 |
+
|
129 |
+
protected function _cacheSave($cacheKey, $data, $minutes)
|
130 |
+
{
|
131 |
+
if (!empty($data['id']) || !empty($data['totalResults']))
|
132 |
+
{
|
133 |
+
set_transient($cacheKey, $data, intval($minutes * 60));
|
134 |
+
|
135 |
+
self::$_cachedResults[$cacheKey] = $data;
|
136 |
+
}
|
137 |
+
elseif (!empty($data['error']['message']))
|
138 |
+
{
|
139 |
+
set_transient('ba_last_error', $data['error']['message'], 10);
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
protected function _cacheDelete($cacheKey)
|
144 |
+
{
|
145 |
+
delete_transient($cacheKey);
|
146 |
+
}
|
147 |
+
|
148 |
+
}
|
library/DigitalPointBetterAnalytics/Helper/Reporting/Abstract.php
ADDED
@@ -0,0 +1,551 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
abstract class DigitalPointBetterAnalytics_Helper_Reporting_Abstract
|
4 |
+
{
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
protected static $_oAuthEndpoint = 'https://accounts.google.com/o/oauth2/';
|
8 |
+
protected static $_dataEndpoint = 'https://www.googleapis.com/analytics/v3/data/ga';
|
9 |
+
protected static $_realtimeEndpoint = 'https://www.googleapis.com/analytics/v3/data/realtime';
|
10 |
+
|
11 |
+
protected static $_webPropertiesEndpoint = 'https://www.googleapis.com/analytics/v3/management/accounts/%s/webproperties/';
|
12 |
+
|
13 |
+
protected static $_profilesEndpoint = '%s/profiles';
|
14 |
+
protected static $_dimensionsEndpoint = '%s/customDimensions';
|
15 |
+
|
16 |
+
protected static $_curlHandles = array();
|
17 |
+
|
18 |
+
protected static $_cachedResults = array();
|
19 |
+
|
20 |
+
protected $_currentHandle = null;
|
21 |
+
protected $_url = null;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Protected constructor. Use {@link getInstance()} instead.
|
25 |
+
*/
|
26 |
+
protected function __construct()
|
27 |
+
{
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Need to put this method in the abstract class unfortunately because PHP 5.2 doesn't support late static binding
|
32 |
+
*/
|
33 |
+
protected static function _resolveClass()
|
34 |
+
{
|
35 |
+
if(class_exists('XenForo_Application'))
|
36 |
+
{
|
37 |
+
$class = XenForo_Application::resolveDynamicClass('DigitalPointBetterAnalytics_Helper_Reporting');
|
38 |
+
self::$_instance = new $class();
|
39 |
+
}
|
40 |
+
else
|
41 |
+
{
|
42 |
+
self::$_instance = new DigitalPointBetterAnalytics_Helper_Reporting();
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function _postResolveClass()
|
47 |
+
{
|
48 |
+
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Gets the single instance of class.
|
54 |
+
*
|
55 |
+
* @return DigitalPointBetterAnalytics_Helper_Reporting
|
56 |
+
*/
|
57 |
+
public static final function getInstance()
|
58 |
+
{
|
59 |
+
if (!self::$_instance)
|
60 |
+
{
|
61 |
+
self::_resolveClass();
|
62 |
+
self::$_instance->_postResolveClass();
|
63 |
+
}
|
64 |
+
|
65 |
+
return self::$_instance;
|
66 |
+
}
|
67 |
+
|
68 |
+
abstract protected function _getOption($type);
|
69 |
+
|
70 |
+
abstract protected function _saveTokens($tokens);
|
71 |
+
|
72 |
+
abstract protected function _deleteTokens();
|
73 |
+
|
74 |
+
abstract protected function _throwException();
|
75 |
+
|
76 |
+
abstract protected function _showException($message);
|
77 |
+
|
78 |
+
abstract protected function _getAdminAuthUrl();
|
79 |
+
|
80 |
+
abstract protected function _initHttp($url);
|
81 |
+
|
82 |
+
abstract protected function _setParamsAction($params);
|
83 |
+
|
84 |
+
abstract protected function _execHandlerAction($action = 'POST');
|
85 |
+
|
86 |
+
abstract protected function _cacheLoad($cacheKey);
|
87 |
+
|
88 |
+
abstract protected function _cacheSave($cacheKey, $data, $minutes);
|
89 |
+
|
90 |
+
abstract protected function _cacheDelete($cacheKey);
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
public function getAuthenticationUrl($state = null)
|
95 |
+
{
|
96 |
+
return self::$_oAuthEndpoint . 'auth?redirect_uri=' . urlencode($this->_getAdminAuthUrl()) . ($state ? '&state=' . urlencode($state) : '') . '&response_type=code&client_id=' . urlencode($this->_getOption('apiClientId')) . '&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics&approval_prompt=force&access_type=offline';
|
97 |
+
}
|
98 |
+
|
99 |
+
public function exchangeCodeForToken($code)
|
100 |
+
{
|
101 |
+
$this->_cacheDelete('analytics_profiles');
|
102 |
+
|
103 |
+
$this->_initHttp(self::$_oAuthEndpoint . 'token');
|
104 |
+
$this->_setParamsAction(array(
|
105 |
+
'code' => $code,
|
106 |
+
'redirect_uri' => $this->_getAdminAuthUrl(),
|
107 |
+
'client_id' => $this->_getOption('apiClientId'),
|
108 |
+
// 'scope' => '',
|
109 |
+
'client_secret' => $this->_getOption('apiClientSecret'),
|
110 |
+
'grant_type' => 'authorization_code'
|
111 |
+
));
|
112 |
+
return json_decode($this->_execHandlerAction());
|
113 |
+
}
|
114 |
+
|
115 |
+
public function checkAccessToken($throwException = true)
|
116 |
+
{
|
117 |
+
$tokens = $this->_getOption('tokens');
|
118 |
+
|
119 |
+
if (empty($tokens->refresh_token))
|
120 |
+
{
|
121 |
+
if ($throwException)
|
122 |
+
{
|
123 |
+
$this->_throwException();
|
124 |
+
}
|
125 |
+
else
|
126 |
+
{
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
if ($tokens->expires_at <= time())
|
132 |
+
{
|
133 |
+
// token has expired... exchange for new one.
|
134 |
+
$this->_initHttp(self::$_oAuthEndpoint . 'token');
|
135 |
+
$this->_setParamsAction(array(
|
136 |
+
'client_id' => $this->_getOption('apiClientId'),
|
137 |
+
'client_secret' => $this->_getOption('apiClientSecret'),
|
138 |
+
'grant_type' => 'refresh_token',
|
139 |
+
'refresh_token' => $tokens->refresh_token
|
140 |
+
));
|
141 |
+
$response = json_decode($this->_execHandlerAction());
|
142 |
+
|
143 |
+
if (!empty($response->error) && $response->error == 'unauthorized_client')
|
144 |
+
{
|
145 |
+
$this->_deleteTokens();
|
146 |
+
return;
|
147 |
+
}
|
148 |
+
else
|
149 |
+
{
|
150 |
+
$tokens->access_token = $response->access_token;
|
151 |
+
$tokens->token_type = $response->token_type;
|
152 |
+
$tokens->expires_at = time() + $response->expires_in - 100;
|
153 |
+
|
154 |
+
$this->_saveTokens($tokens);
|
155 |
+
return $tokens;
|
156 |
+
|
157 |
+
}
|
158 |
+
|
159 |
+
}
|
160 |
+
return $tokens;
|
161 |
+
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
public function getProfiles($accountId = '~all', $profileId = '~all')
|
166 |
+
{
|
167 |
+
$cacheKey = 'ba_prof_' . md5($accountId . '-' . $profileId);
|
168 |
+
|
169 |
+
$profiles = $this->_cacheLoad($cacheKey);
|
170 |
+
|
171 |
+
if (!$profiles)
|
172 |
+
{
|
173 |
+
$fromCache = false;
|
174 |
+
|
175 |
+
if ($tokens = $this->checkAccessToken())
|
176 |
+
{
|
177 |
+
if ($profileId)
|
178 |
+
{
|
179 |
+
$url = sprintf(self::$_webPropertiesEndpoint . self::$_profilesEndpoint, $accountId, $profileId);
|
180 |
+
}
|
181 |
+
else
|
182 |
+
{
|
183 |
+
$url = sprintf(self::$_webPropertiesEndpoint, $accountId);
|
184 |
+
}
|
185 |
+
|
186 |
+
$this->_initHttp($url);
|
187 |
+
$this->_setParamsAction(array('access_token' => $tokens->access_token));
|
188 |
+
|
189 |
+
$response = $this->_execHandlerAction('GET');
|
190 |
+
|
191 |
+
$profiles = json_decode($response, true);
|
192 |
+
|
193 |
+
if (!empty($profiles['error']['errors']))
|
194 |
+
{
|
195 |
+
$this->_showException(@$profiles['error']['errors'][0]['domain'] . ' / ' . @$profiles['error']['errors'][0]['reason'] . ': ' . @$profiles['error']['errors'][0]['message'] . ' ' . @$profiles['error']['errors'][0]['extendedHelp']);
|
196 |
+
}
|
197 |
+
|
198 |
+
}
|
199 |
+
}
|
200 |
+
else
|
201 |
+
{
|
202 |
+
$fromCache = true;
|
203 |
+
}
|
204 |
+
|
205 |
+
if (!$fromCache)
|
206 |
+
{
|
207 |
+
$this->_cacheSave($cacheKey, $profiles, 1);
|
208 |
+
}
|
209 |
+
return $profiles;
|
210 |
+
}
|
211 |
+
|
212 |
+
|
213 |
+
public function getDimensions($accountId = '~all', $propertyId = '~all')
|
214 |
+
{
|
215 |
+
$cacheKey = 'ba_dim_' . md5($accountId . '-' . $propertyId);
|
216 |
+
|
217 |
+
$dimensions = $this->_cacheLoad($cacheKey);
|
218 |
+
|
219 |
+
$dimensions = false;
|
220 |
+
|
221 |
+
if (!$dimensions)
|
222 |
+
{
|
223 |
+
$fromCache = false;
|
224 |
+
|
225 |
+
if ($tokens = $this->checkAccessToken())
|
226 |
+
{
|
227 |
+
if ($propertyId)
|
228 |
+
{
|
229 |
+
$url = sprintf(self::$_webPropertiesEndpoint . self::$_dimensionsEndpoint, $accountId, $propertyId);
|
230 |
+
}
|
231 |
+
else
|
232 |
+
{
|
233 |
+
$url = sprintf(self::$_webPropertiesEndpoint, $accountId);
|
234 |
+
}
|
235 |
+
|
236 |
+
$this->_initHttp($url);
|
237 |
+
$this->_setParamsAction(array('access_token' => $tokens->access_token));
|
238 |
+
|
239 |
+
$response = $this->_execHandlerAction('GET');
|
240 |
+
|
241 |
+
$dimensions = json_decode($response, true);
|
242 |
+
}
|
243 |
+
}
|
244 |
+
else
|
245 |
+
{
|
246 |
+
$fromCache = true;
|
247 |
+
}
|
248 |
+
|
249 |
+
if (!$fromCache)
|
250 |
+
{
|
251 |
+
$this->_cacheSave($cacheKey, $dimensions, 1);
|
252 |
+
}
|
253 |
+
return $dimensions;
|
254 |
+
}
|
255 |
+
|
256 |
+
|
257 |
+
|
258 |
+
|
259 |
+
public function getDimensionsByPropertyId($accountId, $propertyId, $names)
|
260 |
+
{
|
261 |
+
$dimensions = $this->getDimensions($accountId, $propertyId);
|
262 |
+
|
263 |
+
$foundDimensions = array();
|
264 |
+
if(!empty($dimensions['items']))
|
265 |
+
{
|
266 |
+
foreach ($dimensions['items'] as $dimension)
|
267 |
+
{
|
268 |
+
$key = array_search($dimension['name'], $names);
|
269 |
+
|
270 |
+
if ($key !== false && $dimension['scope'] == 'HIT')
|
271 |
+
{
|
272 |
+
$foundDimensions[$dimension['name']] = $dimension;
|
273 |
+
}
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
return $foundDimensions;
|
278 |
+
}
|
279 |
+
|
280 |
+
|
281 |
+
|
282 |
+
public function getProfileByPropertyId($propertyId)
|
283 |
+
{
|
284 |
+
$profiles = $this->getProfiles();
|
285 |
+
|
286 |
+
$foundProfile = null;
|
287 |
+
if(!empty($profiles['items']))
|
288 |
+
{
|
289 |
+
foreach ($profiles['items'] as $profile)
|
290 |
+
{
|
291 |
+
if ($profile['webPropertyId'] == $propertyId)
|
292 |
+
{
|
293 |
+
$foundProfile = $profile;
|
294 |
+
break;
|
295 |
+
}
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
+
return $foundProfile;
|
300 |
+
}
|
301 |
+
|
302 |
+
// this is a little weird... getting profiles with ~all doesn't return industryVertical, but this does. Bug on their end?
|
303 |
+
public function getPropertyByPropertyId($accountId, $propertyId)
|
304 |
+
{
|
305 |
+
$profiles = $this->getProfiles($accountId, null);
|
306 |
+
|
307 |
+
$foundProfile = null;
|
308 |
+
if(!empty($profiles['items']))
|
309 |
+
{
|
310 |
+
foreach ($profiles['items'] as $profile)
|
311 |
+
{
|
312 |
+
if ($profile['id'] == $propertyId)
|
313 |
+
{
|
314 |
+
$foundProfile = $profile;
|
315 |
+
break;
|
316 |
+
}
|
317 |
+
}
|
318 |
+
}
|
319 |
+
|
320 |
+
return $foundProfile;
|
321 |
+
}
|
322 |
+
|
323 |
+
|
324 |
+
|
325 |
+
public function getWeeklyHeatmap($endDaysAgo, $weeks, $metric, $segment = null)
|
326 |
+
{
|
327 |
+
$filters = null;
|
328 |
+
|
329 |
+
if (strpos($metric, '|'))
|
330 |
+
{
|
331 |
+
$split = explode('|', $metric);
|
332 |
+
$metric = $split[0];
|
333 |
+
$filters = $split[1];
|
334 |
+
}
|
335 |
+
|
336 |
+
$cacheKey = $this->getData(($endDaysAgo + ($weeks * 7) - 1) . 'daysAgo', $endDaysAgo . 'daysAgo', $metric, 'ga:hour,ga:dayOfWeek', 'ga:hour,ga:dayOfWeek', $filters, $segment);
|
337 |
+
$data = $this->getResults($cacheKey);
|
338 |
+
|
339 |
+
$preparedData = array();
|
340 |
+
|
341 |
+
for ($i = 0; $i < 24; $i++)
|
342 |
+
{
|
343 |
+
$preparedData[$i] = array_fill(0, 7, 0);
|
344 |
+
}
|
345 |
+
|
346 |
+
if (!empty($data['rows']))
|
347 |
+
{
|
348 |
+
foreach ($data['rows'] as &$row)
|
349 |
+
{
|
350 |
+
$preparedData[intval($row[0])][intval($row[1])] = intval($row[2]);
|
351 |
+
}
|
352 |
+
}
|
353 |
+
|
354 |
+
return $preparedData;
|
355 |
+
}
|
356 |
+
|
357 |
+
|
358 |
+
public function getChart($endDaysAgo, $days, $metric, $dimension, $segment = null)
|
359 |
+
{
|
360 |
+
$filters = null;
|
361 |
+
|
362 |
+
if (strpos($metric, '|'))
|
363 |
+
{
|
364 |
+
$split = explode('|', $metric);
|
365 |
+
$metric = $split[0];
|
366 |
+
$filters = $split[1];
|
367 |
+
}
|
368 |
+
|
369 |
+
$cacheKey = $this->getData(($endDaysAgo + $days - 1) . 'daysAgo', $endDaysAgo . 'daysAgo', $metric, $dimension, ($dimension == 'ga:date' ? $dimension : '-' . $metric), $filters, $segment);
|
370 |
+
$data = $this->getResults($cacheKey);
|
371 |
+
|
372 |
+
if ($dimension == 'ga:date')
|
373 |
+
{
|
374 |
+
return $data['rows'];
|
375 |
+
}
|
376 |
+
|
377 |
+
$chartData = $outputData = array();
|
378 |
+
if (!empty($data['rows']))
|
379 |
+
{
|
380 |
+
foreach($data['rows'] as $row)
|
381 |
+
{
|
382 |
+
$split = explode(',', $row[0]);
|
383 |
+
foreach ($split as $name)
|
384 |
+
{
|
385 |
+
$name = trim($name);
|
386 |
+
@$chartData[$name] += $row[1];
|
387 |
+
}
|
388 |
+
}
|
389 |
+
}
|
390 |
+
|
391 |
+
arsort($chartData);
|
392 |
+
if ($chartData)
|
393 |
+
{
|
394 |
+
foreach ($chartData as $name => $value)
|
395 |
+
{
|
396 |
+
$outputData[] = array($name, $value);
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
return $outputData;
|
401 |
+
}
|
402 |
+
|
403 |
+
|
404 |
+
|
405 |
+
public function getData($startDate, $endDate, $metrics, $dimensions = null, $sort = null, $filters = null, $segment = null, $samplingLevel = null, $maxResults = 10000, $output = 'json', $userIp = null)
|
406 |
+
{
|
407 |
+
$profile = $this->_getOption('apiProfile');
|
408 |
+
$cacheKey = 'ba_data_' . md5($profile . ' ' . $startDate . ' ' . $endDate . ' ' . $metrics . ' ' . $dimensions . ' ' . $sort . ' ' . $filters . ' ' . $segment . ' ' . $samplingLevel . ' ' . $maxResults . ' ' . $output);
|
409 |
+
|
410 |
+
if (!$data = $this->_cacheLoad($cacheKey))
|
411 |
+
{
|
412 |
+
$tokens = $this->checkAccessToken();
|
413 |
+
|
414 |
+
$this->_getHandler(self::$_dataEndpoint);
|
415 |
+
|
416 |
+
$params = array(
|
417 |
+
'ids' => 'ga:' . $profile,
|
418 |
+
'start-date' => $startDate,
|
419 |
+
'end-date' => $endDate,
|
420 |
+
'metrics' => $metrics,
|
421 |
+
'max-results' => $maxResults,
|
422 |
+
'output' => $output,
|
423 |
+
'access_token' => $tokens->access_token
|
424 |
+
);
|
425 |
+
|
426 |
+
if (!empty($dimensions))
|
427 |
+
{
|
428 |
+
$params['dimensions'] = $dimensions;
|
429 |
+
}
|
430 |
+
|
431 |
+
if (!empty($sort))
|
432 |
+
{
|
433 |
+
$params['sort'] = $sort;
|
434 |
+
}
|
435 |
+
|
436 |
+
if (!empty($filters))
|
437 |
+
{
|
438 |
+
$params['filters'] = $filters;
|
439 |
+
}
|
440 |
+
|
441 |
+
if (!empty($segment))
|
442 |
+
{
|
443 |
+
$params['segment'] = $segment;
|
444 |
+
}
|
445 |
+
|
446 |
+
if (!empty($samplingLevel))
|
447 |
+
{
|
448 |
+
$params['samplingLevel'] = $samplingLevel;
|
449 |
+
}
|
450 |
+
|
451 |
+
if (!empty($userIp))
|
452 |
+
{
|
453 |
+
$params['userIp'] = $userIp;
|
454 |
+
}
|
455 |
+
elseif (!empty($_SERVER['REMOTE_ADDR']))
|
456 |
+
{
|
457 |
+
$params['userIp'] = $_SERVER['REMOTE_ADDR'];
|
458 |
+
}
|
459 |
+
|
460 |
+
$this->_setParams($params);
|
461 |
+
$this->_execHandler($cacheKey);
|
462 |
+
}
|
463 |
+
|
464 |
+
return $cacheKey;
|
465 |
+
}
|
466 |
+
|
467 |
+
public function getRealtime($metrics, $dimensions = null, $sort = null, $filters = null, $maxResults = 10000)
|
468 |
+
{
|
469 |
+
$profile = $this->_getOption('apiProfile');
|
470 |
+
$cacheKey = 'ba_rt_' . md5($profile . ' ' . $metrics . ' ' . $dimensions . ' ' . $sort . ' ' . $filters . ' ' . $maxResults);
|
471 |
+
|
472 |
+
//if (!$data = self::_cacheLoad($cacheKey))
|
473 |
+
//{
|
474 |
+
$tokens = $this->checkAccessToken();
|
475 |
+
|
476 |
+
$this->_getHandler(self::$_realtimeEndpoint);
|
477 |
+
|
478 |
+
$params = array(
|
479 |
+
'ids' => 'ga:' . $profile,
|
480 |
+
'metrics' => $metrics,
|
481 |
+
'max-results' => $maxResults,
|
482 |
+
'access_token' => $tokens->access_token
|
483 |
+
);
|
484 |
+
|
485 |
+
if (!empty($dimensions))
|
486 |
+
{
|
487 |
+
$params['dimensions'] = $dimensions;
|
488 |
+
}
|
489 |
+
|
490 |
+
if (!empty($sort))
|
491 |
+
{
|
492 |
+
$params['sort'] = $sort;
|
493 |
+
}
|
494 |
+
|
495 |
+
if (!empty($filters))
|
496 |
+
{
|
497 |
+
$params['filters'] = $filters;
|
498 |
+
}
|
499 |
+
|
500 |
+
$this->_setParams($params);
|
501 |
+
$this->_execHandler($cacheKey);
|
502 |
+
//}
|
503 |
+
|
504 |
+
return $cacheKey;
|
505 |
+
}
|
506 |
+
|
507 |
+
protected function _canUseCurlMulti()
|
508 |
+
{
|
509 |
+
return false;
|
510 |
+
}
|
511 |
+
|
512 |
+
|
513 |
+
protected function _getHandler($url)
|
514 |
+
{
|
515 |
+
$this->_currentHandle = $this->_initHttp($url);
|
516 |
+
}
|
517 |
+
|
518 |
+
protected function _setParams(array $params)
|
519 |
+
{
|
520 |
+
$params['v'] = 1;
|
521 |
+
$params['ds'] = 'server side';
|
522 |
+
|
523 |
+
$this->_setParamsAction($params);
|
524 |
+
}
|
525 |
+
|
526 |
+
|
527 |
+
protected function _execHandler($cacheKey)
|
528 |
+
{
|
529 |
+
$this->_currentHandle = $this->_execHandlerAction('GET');
|
530 |
+
|
531 |
+
self::$_curlHandles[$cacheKey] = $this->_currentHandle;
|
532 |
+
}
|
533 |
+
|
534 |
+
|
535 |
+
|
536 |
+
public function getResults($cacheKey)
|
537 |
+
{
|
538 |
+
$results = @json_decode(self::$_curlHandles[$cacheKey], true);
|
539 |
+
$this->_cacheSave($cacheKey, $results, 60);
|
540 |
+
|
541 |
+
|
542 |
+
if (!empty(self::$_cachedResults[$cacheKey]))
|
543 |
+
{
|
544 |
+
return self::$_cachedResults[$cacheKey];
|
545 |
+
}
|
546 |
+
else
|
547 |
+
{
|
548 |
+
return false;
|
549 |
+
}
|
550 |
+
}
|
551 |
+
}
|
library/DigitalPointBetterAnalytics/Helper/Reporting/Advanced.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
abstract class DigitalPointBetterAnalytics_Helper_Reporting_Advanced extends DigitalPointBetterAnalytics_Helper_Reporting_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
library/DigitalPointBetterAnalytics/Install.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_Install
|
4 |
+
{
|
5 |
+
public static function uninstall()
|
6 |
+
{
|
7 |
+
if (is_multisite()) // Multi-site install
|
8 |
+
{
|
9 |
+
foreach (wp_get_sites() as $blog)
|
10 |
+
{
|
11 |
+
switch_to_blog($blog['blog_id']);
|
12 |
+
|
13 |
+
self::_uninstallAction();
|
14 |
+
|
15 |
+
restore_current_blog();
|
16 |
+
}
|
17 |
+
// delete_site_option('better_analytics_network_options');
|
18 |
+
// delete_site_transient('some_option');
|
19 |
+
}
|
20 |
+
else
|
21 |
+
{ // Cleanup Single install
|
22 |
+
self::_uninstallAction();
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
protected static function _uninstallAction()
|
27 |
+
{
|
28 |
+
// Delete transients
|
29 |
+
DigitalPointBetterAnalytics_CronEntry_Jobs::hour(true);
|
30 |
+
|
31 |
+
delete_option('ba_dashboard_pick');
|
32 |
+
delete_option('ba_tokens');
|
33 |
+
delete_option('better_analytics');
|
34 |
+
}
|
35 |
+
}
|
library/DigitalPointBetterAnalytics/Model/Widget.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DigitalPointBetterAnalytics_Model_Widget
|
4 |
+
{
|
5 |
+
public static function getRealtimeData($secondsToCache = 300, $returnData = false)
|
6 |
+
{
|
7 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
8 |
+
if (get_option('ba_tokens') && @$betterAnalyticsOptions['api']['profile'])
|
9 |
+
{
|
10 |
+
$reportingObject = DigitalPointBetterAnalytics_Helper_Reporting::getInstance();
|
11 |
+
$cacheKey = $reportingObject->getRealtime('rt:activeUsers', 'rt:source,rt:medium,rt:referralPath,rt:pagePath,rt:deviceCategory,rt:country,rt:keyword');
|
12 |
+
$data = $reportingObject->getResults($cacheKey);
|
13 |
+
|
14 |
+
$realTimeOutput = array('users' => intval(@$data['totalsForAllResults']['rt:activeUsers']));
|
15 |
+
if ($data['rows'])
|
16 |
+
{
|
17 |
+
foreach ($data['rows'] as $row)
|
18 |
+
{
|
19 |
+
if (strlen($row[1]) < 4)
|
20 |
+
{
|
21 |
+
$medium = strtoupper($row[1]);
|
22 |
+
}
|
23 |
+
else
|
24 |
+
{
|
25 |
+
$medium = ucwords(strtolower($row[1]));
|
26 |
+
}
|
27 |
+
|
28 |
+
$realTimeOutput['medium'][$medium] += $row[7];
|
29 |
+
|
30 |
+
if ($row[1] == 'REFERRAL')
|
31 |
+
{
|
32 |
+
$realTimeOutput['referral_path'][$row[0] . $row[2]] += $row[7];
|
33 |
+
}
|
34 |
+
$realTimeOutput['page_path'][$row[3]] += $row[7];
|
35 |
+
|
36 |
+
$deviceCategory = ucwords(strtolower($row[4]));
|
37 |
+
|
38 |
+
$realTimeOutput['devices'][$deviceCategory] += $row[7];
|
39 |
+
$realTimeOutput['country'][$row[5]] += $row[7];
|
40 |
+
if ($row[1] == 'ORGANIC')
|
41 |
+
{
|
42 |
+
$keywords = trim(strtolower($row[6]));
|
43 |
+
$realTimeOutput['keywords'][$keywords] += $row[7];
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
foreach ($realTimeOutput as &$array)
|
48 |
+
{
|
49 |
+
if (is_array($array))
|
50 |
+
{
|
51 |
+
arsort($array);
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
set_transient('ba_realtime', $realTimeOutput, $secondsToCache);
|
57 |
+
|
58 |
+
if ($returnData)
|
59 |
+
{
|
60 |
+
return $realTimeOutput;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
}
|
66 |
+
}
|
library/DigitalPointBetterAnalytics/ViewAdmin/config.php
ADDED
@@ -0,0 +1,810 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
wp_enqueue_script('tooltipster_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/tooltipster/js/jquery.tooltipster.min.js', array(), BETTER_ANALYTICS_VERSION );
|
3 |
+
wp_enqueue_style('tooltipster_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/tooltipster/css/tooltipster.css', array(), BETTER_ANALYTICS_VERSION);
|
4 |
+
|
5 |
+
wp_enqueue_script('chosen_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/chosen/chosen.jquery.min.js', array(), BETTER_ANALYTICS_VERSION );
|
6 |
+
wp_enqueue_style('chosen_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/chosen/chosen.min.css', array(), BETTER_ANALYTICS_VERSION);
|
7 |
+
|
8 |
+
wp_enqueue_script('better-analytics_admin_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/js/admin.js', array(), BETTER_ANALYTICS_VERSION );
|
9 |
+
wp_enqueue_style('better-analytics_admin_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/css/admin.css', array(), BETTER_ANALYTICS_VERSION);
|
10 |
+
|
11 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
12 |
+
$betterAnalyticsInternal = get_transient('ba_int');
|
13 |
+
|
14 |
+
if (DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->checkAccessToken(false))
|
15 |
+
{
|
16 |
+
$profiles = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getProfiles();
|
17 |
+
}
|
18 |
+
else
|
19 |
+
{
|
20 |
+
$profiles = array();
|
21 |
+
}
|
22 |
+
|
23 |
+
?>
|
24 |
+
|
25 |
+
|
26 |
+
<div class="wrap" id="better-analytics_settings">
|
27 |
+
|
28 |
+
<h2><?php esc_html_e( 'Better Analytics' , 'better-analytics');?></h2>
|
29 |
+
|
30 |
+
<h3 class="nav-tab-wrapper" id="better-analytics_tabs">
|
31 |
+
<a class="nav-tab" id="general-tab" href="#top#general"><?php _e( 'General', 'better-analytics' ); ?></a>
|
32 |
+
<a class="nav-tab" id="dimensions-tab" href="#top#dimensions"><?php _e( 'Custom Dimensions', 'better-analytics' ); ?></a>
|
33 |
+
<a class="nav-tab" id="social-tab" href="#top#social"><?php _e( 'Social', 'better-analytics' ); ?></a>
|
34 |
+
<a class="nav-tab" id="advertising-tab" href="#top#advertising"><?php _e( 'Advertising', 'better-analytics' ); ?></a>
|
35 |
+
<a class="nav-tab" id="monitor-tab" href="#top#monitor"><?php _e( 'Monitoring', 'better-analytics' ); ?></a>
|
36 |
+
<a class="nav-tab" id="ecommerce-tab" href="#top#ecommerce"><?php _e( 'eCommerce', 'better-analytics' ); ?></a>
|
37 |
+
<a class="nav-tab" id="api-tab" href="#top#api"><?php _e('API', 'better-analytics' ); ?></a>
|
38 |
+
<a class="nav-tab" id="advanced-tab" href="#top#advanced"><?php _e('Advanced', 'better-analytics' ); ?></a>
|
39 |
+
</h3>
|
40 |
+
|
41 |
+
|
42 |
+
<form method="post" action="options.php">
|
43 |
+
<input type="hidden" id="ba_current_tab" name="current_tab" value="general" />
|
44 |
+
<?php
|
45 |
+
settings_fields('better-analytics-group' );
|
46 |
+
do_settings_sections('better-analytics-group');
|
47 |
+
?>
|
48 |
+
|
49 |
+
|
50 |
+
<aside id="better-analytics_sidebar_wrapper">
|
51 |
+
<div id="better-analytics_sidebar">
|
52 |
+
|
53 |
+
<div class="postbox support">
|
54 |
+
<h4><?php _e('Support / Feature Requests', 'better-analytics'); ?></h4>
|
55 |
+
<div>
|
56 |
+
<?php _e('Better Analytics is user request driven, so if there\'s something you want it to do that it doesn\'t already do, or just have a question, simply ask!') . printf('<br /><br /><a class="button button-primary" href="%1$s">%2$s</a>', esc_url(menu_page_url('better-analytics_test', false)), __('Setup Test Tool', 'better-analytics')); ?>
|
57 |
+
</div>
|
58 |
+
<h4 style="margin-top:2em;"><?php _e('Support / Request Venues', 'better-analytics'); ?></h4>
|
59 |
+
<div>
|
60 |
+
<?php printf('<a class="button button-primary" href="%1$s" target="_blank">%2$s</a> <a class="button button-primary" href="%3$s" target="_blank"><span class="dashicons dashicons-twitter"></span> %4$s</a>',
|
61 |
+
esc_url(BETTER_ANALYTICS_SUPPORT_URL . '#utm_source=admin_settings&utm_medium=wordpress&utm_campaign=plugin'),
|
62 |
+
__('Forum', 'better-analytics'),
|
63 |
+
esc_url('https://twitter.com/digitalpoint'),
|
64 |
+
__('Twitter', 'better-analytics')
|
65 |
+
); ?>
|
66 |
+
</div>
|
67 |
+
|
68 |
+
</div>
|
69 |
+
|
70 |
+
<div class="postbox pro">
|
71 |
+
<h4><?php _e('Extra Features In Pro Version', 'better-analytics'); ?></h4>
|
72 |
+
<div>
|
73 |
+
<ul>
|
74 |
+
<li>
|
75 |
+
<?php _e('More Advertising tracking options', 'better-analytics'); ?>
|
76 |
+
</li>
|
77 |
+
<li>
|
78 |
+
<?php _e('More options for monitoring issues with site', 'better-analytics'); ?>
|
79 |
+
</li>
|
80 |
+
<li>
|
81 |
+
<?php _e('More heat map metrics', 'better-analytics'); ?>
|
82 |
+
</li>
|
83 |
+
<li>
|
84 |
+
<?php _e('More charting dimensions', 'better-analytics'); ?>
|
85 |
+
</li>
|
86 |
+
<li>
|
87 |
+
<?php _e('eCommerce tracking', 'better-analytics'); ?>
|
88 |
+
</li>
|
89 |
+
<li>
|
90 |
+
<?php _e('Option for server-side tracking of users (or bots) with Analytics/privacy blockers', 'better-analytics'); ?>
|
91 |
+
</li>
|
92 |
+
<li>
|
93 |
+
<?php _e('API calls are faster (uses a custom system for parallel requests)', 'better-analytics'); ?>
|
94 |
+
</li>
|
95 |
+
<li>
|
96 |
+
<?php _e('Priority Support', 'better-analytics'); ?>
|
97 |
+
</li>
|
98 |
+
</ul>
|
99 |
+
<?php
|
100 |
+
|
101 |
+
printf(__('You can %1$sget a license here%2$s.%3$sIf you already have a license, make sure your domain is listed under %4$syour verified domains%2$s.', 'better-analytics'),
|
102 |
+
'<a href="' . esc_url(BETTER_ANALYTICS_PRO_PRODUCT_URL . '#utm_source=admin_settings&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">',
|
103 |
+
'</a>',
|
104 |
+
'<br /><br />',
|
105 |
+
'<a href="https://forums.digitalpoint.com/marketplace/domain-verification#utm_source=admin_settings&utm_medium=wordpress&utm_campaign=plugin" target="_blank">'
|
106 |
+
);
|
107 |
+
?>
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
|
111 |
+
</div>
|
112 |
+
</aside>
|
113 |
+
|
114 |
+
<table class="form-table" id="ba_settings">
|
115 |
+
|
116 |
+
|
117 |
+
<tr valign="top" class="group_general tab_content">
|
118 |
+
<th scope="row"><?php esc_html_e('Google Analytics Web Property ID', 'better-analytics');?></th>
|
119 |
+
<td>
|
120 |
+
<input type="text" name="better_analytics[property_id]" id="ba_property_id" placeholder="UA-000000-01" style="width: 25%;" value="<?php echo esc_attr( @$betterAnalyticsOptions['property_id'] ); ?>" />
|
121 |
+
<?php
|
122 |
+
|
123 |
+
|
124 |
+
$profilePick = array();
|
125 |
+
if (!empty($profiles['items']))
|
126 |
+
{
|
127 |
+
$profilePick = DigitalPointBetterAnalytics_Base_Admin::getProfilePropertyIds($profiles['items']);
|
128 |
+
}
|
129 |
+
|
130 |
+
if ($profilePick)
|
131 |
+
{
|
132 |
+
$siteHostname = parse_url(site_url(), PHP_URL_HOST);
|
133 |
+
|
134 |
+
echo '<select data-placeholder="Pick profile" id="ba_pick_profile" class="chosen-select">';
|
135 |
+
|
136 |
+
echo '<option value="">' . __('please pick a profile', 'better-analytics') . '</option>';
|
137 |
+
|
138 |
+
foreach ($profilePick as $key => $profile)
|
139 |
+
{
|
140 |
+
$profileHostname = parse_url($profile[0], PHP_URL_HOST);
|
141 |
+
|
142 |
+
echo '<optgroup label="' . htmlentities($profile[0]) . '"><option value="' . $key . '"' . ($profileHostname == $siteHostname ? ' style="background-color:#ffffc8"' : '') . '' . ($key == @$betterAnalyticsOptions['property_id'] ? ' selected="selected"' : '') . '>' . htmlentities($profile[1] . ' (' . $key . ')') . '</option></optgroup>';
|
143 |
+
}
|
144 |
+
echo '</select>';
|
145 |
+
}
|
146 |
+
else
|
147 |
+
{
|
148 |
+
echo '<a id="ba_select_profile" class="button" href="' . menu_page_url('better-analytics_auth', false) . '">' . __('Link Your Google Analytics Account', 'better-analytics') . '</a>';
|
149 |
+
}
|
150 |
+
?>
|
151 |
+
</td>
|
152 |
+
</tr>
|
153 |
+
|
154 |
+
|
155 |
+
<tr valign="top" class="group_general tab_content">
|
156 |
+
<th scope="row"><?php esc_html_e('General', 'better-analytics');?></th>
|
157 |
+
<td>
|
158 |
+
<fieldset>
|
159 |
+
<label for="ba_link_attribution">
|
160 |
+
<input name="better_analytics[link_attribution]" type="checkbox" id="ba_link_attribution" value="1" <?php checked('1', @$betterAnalyticsOptions['link_attribution'] ); ?>>
|
161 |
+
<?php esc_html_e('Enhanced Link Attribution', 'better-analytics');?></label>
|
162 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php
|
163 |
+
printf(esc_html__('See separate information for multiple links on a page that all have the same destination. For example, if there are two links on the same page that both lead to the Contact Us page, then you see separate click information for each link.%1$sSee when one page element has multiple destinations. For example, a Search button on your page is likely to lead to multiple destinations.%1$sTrack buttons, menus, and actions driven by JavaScript.', 'better-analytics'),
|
164 |
+
'<p />'
|
165 |
+
); ?>"></span>
|
166 |
+
<br />
|
167 |
+
|
168 |
+
<label for="ba_track_userid">
|
169 |
+
<input name="better_analytics[track_userid]" type="checkbox" id="ba_track_userid" value="1" <?php checked('1', @$betterAnalyticsOptions['track_userid'] ); ?>>
|
170 |
+
<?php esc_html_e('Track Registered Users By User ID', 'better-analytics');?></label>
|
171 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php echo htmlspecialchars(sprintf(__('This feature allows you to utilize %1$ssession unification%2$s within Google Analytics.', 'better-analytics'),
|
172 |
+
'<a href="' . esc_url('https://support.google.com/analytics/answer/4574780') . '" target="_blank">',
|
173 |
+
'</a>'
|
174 |
+
));
|
175 |
+
?>"></span>
|
176 |
+
</fieldset>
|
177 |
+
|
178 |
+
</td>
|
179 |
+
</tr>
|
180 |
+
|
181 |
+
|
182 |
+
<tr valign="top" class="group_general tab_content">
|
183 |
+
<th scope="row"><?php esc_html_e('Events To Track', 'better-analytics');?></th>
|
184 |
+
<td>
|
185 |
+
<fieldset>
|
186 |
+
<label for="ba_events_user_engagement">
|
187 |
+
<input name="better_analytics[events][user_engagement]" type="checkbox" id="ba_events_user_engagement" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['user_engagement'] ); ?>>
|
188 |
+
<?php
|
189 |
+
esc_html_e('User Engagement','better-analytics');
|
190 |
+
?>
|
191 |
+
</label>
|
192 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php echo htmlspecialchars(sprintf(__('This will give you an %1$sadjusted bounce rate%2$s.', 'better-analytics'),
|
193 |
+
'<a href="' . esc_url('http://analytics.blogspot.com/2012/07/tracking-adjusted-bounce-rate-in-google.html') . '" target="_blank">',
|
194 |
+
'</a>'
|
195 |
+
));
|
196 |
+
?>"></span>
|
197 |
+
<br />
|
198 |
+
|
199 |
+
<label for="ba_events_user_registration">
|
200 |
+
<input name="better_analytics[events][user_registration]" type="checkbox" id="ba_events_user_registration" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['user_registration'] ); ?>>
|
201 |
+
<?php esc_html_e('User Registration', 'better-analytics');?></label>
|
202 |
+
<br />
|
203 |
+
|
204 |
+
<label for="ba_events_create_comment">
|
205 |
+
<input name="better_analytics[events][create_comment]" type="checkbox" id="ba_events_create_comment" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['create_comment'] ); ?>>
|
206 |
+
<?php esc_html_e('Comments Being Created', 'better-analytics');?></label>
|
207 |
+
<br />
|
208 |
+
|
209 |
+
<label for="ba_events_youtube">
|
210 |
+
<input name="better_analytics[events][youtube]" type="checkbox" id="ba_events_youtube" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['youtube'] ); ?>>
|
211 |
+
<?php esc_html_e('YouTube Video Engagement', 'better-analytics');?></label>
|
212 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php echo htmlspecialchars(sprintf(__('This works with the modern IFRAME YouTube embeds. It does not work with the old OBJECT embeds.%1$sTracks things like video plays, pauses, plays to end, etc.', 'better-analytics'),
|
213 |
+
'<p />'
|
214 |
+
)); ?>"></span>
|
215 |
+
|
216 |
+
<br />
|
217 |
+
|
218 |
+
|
219 |
+
<label for="ba_events_email">
|
220 |
+
<input name="better_analytics[events][email]" type="checkbox" id="ba_events_email" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['email'] ); ?>>
|
221 |
+
<?php esc_html_e('Emails Sent/Opened', 'better-analytics');?></label>
|
222 |
+
<br />
|
223 |
+
|
224 |
+
<label for="ba_events_link_click">
|
225 |
+
<input name="better_analytics[events][link_click]" type="checkbox" id="ba_events_link_click" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['link_click'] ); ?>>
|
226 |
+
<?php esc_html_e('Clicks On External Links', 'better-analytics');?></label>
|
227 |
+
<br />
|
228 |
+
|
229 |
+
<label for="ba_events_downloads">
|
230 |
+
<input name="better_analytics[events][downloads]" type="checkbox" id="ba_events_downloads" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['downloads'] ); ?>>
|
231 |
+
<?php esc_html_e('File Downloads', 'better-analytics');?></label>
|
232 |
+
|
233 |
+
</fieldset>
|
234 |
+
|
235 |
+
</td>
|
236 |
+
</tr>
|
237 |
+
|
238 |
+
<tr valign="top" class="group_general tab_content">
|
239 |
+
<th scope="row"><?php esc_html_e('Privacy', 'better-analytics');?></th>
|
240 |
+
<td>
|
241 |
+
<fieldset>
|
242 |
+
<label for="ba_anonymize_ips">
|
243 |
+
<input name="better_analytics[anonymize_ips]" type="checkbox" id="ba_anonymize_ips" value="1" <?php checked('1', @$betterAnalyticsOptions['anonymize_ips'] ); ?>>
|
244 |
+
<?php esc_html_e('Anonymize IPs', 'better-analytics');?></label>
|
245 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php echo htmlspecialchars(sprintf(__('Detailed information about IP Anonymization in Google Analytics can be found %1$sover here%2$s.', 'better-analytics'),
|
246 |
+
'<a href="' . esc_url('https://support.google.com/analytics/answer/2763052') . '" target="_blank">',
|
247 |
+
'</a>'
|
248 |
+
)); ?>"></span>
|
249 |
+
<br />
|
250 |
+
|
251 |
+
<label for="ba_demographic_tracking">
|
252 |
+
<input name="better_analytics[demographic_tracking]" type="checkbox" id="ba_demographic_tracking" value="1" <?php checked('1', @$betterAnalyticsOptions['demographic_tracking'] ); ?>>
|
253 |
+
<?php esc_html_e('Demographic & Interest Tracking', 'better-analytics');?></label>
|
254 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php echo htmlspecialchars(sprintf(__('This allows you to view extra dimensions about users (Age, Gender, Affinity Categories, In-Market Segments and Other Categories.%1$sThis requires enabling the option in your %2$sGoogle Analytics account%3$s under %4$sProperty Settings%5$s.', 'better-analytics'),
|
255 |
+
'<p />',
|
256 |
+
'<a href="' . esc_url('https://www.google.com/analytics/web/?#management/Settings/') . '" target="_blank">',
|
257 |
+
'</a>',
|
258 |
+
'<strong>',
|
259 |
+
'</strong>'
|
260 |
+
)); ?>"></span>
|
261 |
+
<br />
|
262 |
+
|
263 |
+
<label for="ba_force_ssl">
|
264 |
+
<input name="better_analytics[force_ssl]" type="checkbox" id="ba_force_ssl" value="1" <?php checked('1', @$betterAnalyticsOptions['force_ssl'] ); ?>>
|
265 |
+
<?php esc_html_e('Force Analytics Traffic Over SSL', 'better-analytics');?></label>
|
266 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php echo htmlspecialchars(sprintf(__('If your site is HTTPS based, Analytics traffic will always go over SSL. If you have an insecure site, but wish Analytics traffic to still be secure, use this option. Additionally, SSL traffic is going to be generally faster because it\'s able to utilize the %1$sSPDY protocol%2$s.', 'better-analytics'),
|
267 |
+
'<a href="' . esc_url('https://wikipedia.org/wiki/SPDY') . '" target="_blank">',
|
268 |
+
'</a>'
|
269 |
+
)); ?>"></span>
|
270 |
+
</fieldset>
|
271 |
+
|
272 |
+
</td>
|
273 |
+
</tr>
|
274 |
+
|
275 |
+
<tr valign="top" class="group_general tab_content">
|
276 |
+
<th scope="row"><?php esc_html_e('Link Source Tracking', 'better-analytics');?></th>
|
277 |
+
<td>
|
278 |
+
<fieldset>
|
279 |
+
<label for="ba_souce_link_rss">
|
280 |
+
<input name="better_analytics[source_link][rss]" type="checkbox" id="ba_souce_link_rss" value="1" <?php checked('1', @$betterAnalyticsOptions['source_link']['rss'] ); ?>>
|
281 |
+
<?php esc_html_e('RSS', 'better-analytics');?></label>
|
282 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php esc_html_e('Links within RSS feed will be tagged to track the source/medium as being RSS.', 'better-analytics');?>"></span>
|
283 |
+
<br />
|
284 |
+
|
285 |
+
<label for="ba_souce_link_email">
|
286 |
+
<input name="better_analytics[source_link][email]" type="checkbox" id="ba_souce_link_email" value="1" <?php checked('1', @$betterAnalyticsOptions['source_link']['email'] ); ?>>
|
287 |
+
<?php esc_html_e('Email', 'better-analytics');?></label>
|
288 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php esc_html_e('Links within RSS feed will be tagged to track the source/medium as being Email.', 'better-analytics');?>"></span>
|
289 |
+
|
290 |
+
</fieldset>
|
291 |
+
|
292 |
+
</td>
|
293 |
+
</tr>
|
294 |
+
|
295 |
+
|
296 |
+
<tr valign="top" class="group_dimensions tab_content">
|
297 |
+
<td colspan="2">
|
298 |
+
<?php printf(__('If you want to track custom dimensions, you need to create the custom dimensions in your %1$sGoogle Analytics account settings%2$s (under %3$sCustom Definitions -> Custom Dimension%4$s)%5$sThey should be scoped as "%3$sHit%4$s".', 'better-analytics'),
|
299 |
+
'<a href="' . esc_url('https://www.google.com/analytics/web/?#management/Settings/') . '" target="_blank">',
|
300 |
+
'</a>',
|
301 |
+
'<strong>',
|
302 |
+
'</strong>',
|
303 |
+
'<br /><br />'
|
304 |
+
); ?>
|
305 |
+
</td>
|
306 |
+
</tr>
|
307 |
+
|
308 |
+
<tr valign="top" class="group_dimensions tab_content">
|
309 |
+
<th scope="row"><?php esc_html_e('Dimension Indexes', 'better-analytics');?>
|
310 |
+
<p class="description" style="font-weight: normal;"><?php esc_html_e('Set to 0 to disable.', 'better-analytics');?></p></th>
|
311 |
+
<td>
|
312 |
+
|
313 |
+
<fieldset>
|
314 |
+
<div style="display:table">
|
315 |
+
<div style="display:table-row">
|
316 |
+
<div style="display:table-cell;text-align:right;padding-right:10px;">
|
317 |
+
<label for="ba_dimension_category"><?php esc_html_e('Categories: ', 'better-analytics');?></label>
|
318 |
+
</div>
|
319 |
+
<div style="display:table-cell">
|
320 |
+
<input type="number" name="better_analytics[dimension][category]" id="ba_dimension_category" min="0" max="20" step="1" value="<?php echo esc_attr( intval(@$betterAnalyticsOptions['dimension']['category']) ); ?>" />
|
321 |
+
</div>
|
322 |
+
</div>
|
323 |
+
|
324 |
+
<div style="display:table-row">
|
325 |
+
<div style="display:table-cell;text-align:right;padding-right:10px;">
|
326 |
+
<label for="ba_dimension_author"><?php esc_html_e('Author: ', 'better-analytics');?></label>
|
327 |
+
</div>
|
328 |
+
<div style="display:table-cell">
|
329 |
+
<input type="number" name="better_analytics[dimension][author]" id="ba_dimension_author" min="0" max="20" step="1" value="<?php echo esc_attr( intval(@$betterAnalyticsOptions['dimension']['author']) ); ?>" />
|
330 |
+
</div>
|
331 |
+
</div>
|
332 |
+
|
333 |
+
<div style="display:table-row">
|
334 |
+
<div style="display:table-cell;text-align:right;padding-right:10px;">
|
335 |
+
<label for="ba_dimension_tags"><?php esc_html_e('Tags: ', 'better-analytics');?></label>
|
336 |
+
</div>
|
337 |
+
<div style="display:table-cell">
|
338 |
+
<input type="number" name="better_analytics[dimension][tag]" id="ba_dimension_tags" min="0" max="20" step="1" value="<?php echo esc_attr( intval(@$betterAnalyticsOptions['dimension']['tag']) ); ?>" />
|
339 |
+
</div>
|
340 |
+
</div>
|
341 |
+
|
342 |
+
<div style="display:table-row">
|
343 |
+
<div style="display:table-cell;text-align:right;padding-right:10px;">
|
344 |
+
<label for="ba_dimension_user"><?php esc_html_e('Registered User: ', 'better-analytics');?></label>
|
345 |
+
</div>
|
346 |
+
<div style="display:table-cell">
|
347 |
+
<input type="number" name="better_analytics[dimension][user]" id="ba_dimension_user" min="0" max="20" step="1" value="<?php echo esc_attr( intval(@$betterAnalyticsOptions['dimension']['user']) ); ?>" />
|
348 |
+
</div>
|
349 |
+
</div>
|
350 |
+
|
351 |
+
</div>
|
352 |
+
</fieldset>
|
353 |
+
|
354 |
+
</td>
|
355 |
+
</tr>
|
356 |
+
|
357 |
+
|
358 |
+
|
359 |
+
<tr valign="top" class="group_social tab_content">
|
360 |
+
<th scope="row"><?php esc_html_e('Button Engagement To Track', 'better-analytics');?></th>
|
361 |
+
<td>
|
362 |
+
|
363 |
+
<fieldset>
|
364 |
+
<label for="ba_social_facebook">
|
365 |
+
<input name="better_analytics[social][facebook]" type="checkbox" id="ba_social_facebook" value="1" <?php checked('1', @$betterAnalyticsOptions['social']['facebook'] ); ?>>
|
366 |
+
<?php esc_html_e('Facebook Like', 'better-analytics');?></label>
|
367 |
+
<br />
|
368 |
+
|
369 |
+
<label for="ba_social_twitter">
|
370 |
+
<input name="better_analytics[social][twitter]" type="checkbox" id="ba_social_twitter" value="1" <?php checked('1', @$betterAnalyticsOptions['social']['twitter'] ); ?>>
|
371 |
+
<?php esc_html_e('Twitter', 'better-analytics');?></label>
|
372 |
+
<br />
|
373 |
+
|
374 |
+
<label for="ba_social_google">
|
375 |
+
<input type="checkbox" id="ba_social_google" value="1" checked="checked" disabled="disabled">
|
376 |
+
<?php esc_html_e('Google+ (Google Analytics always tracks)', 'better-analytics');?></label>
|
377 |
+
<br />
|
378 |
+
|
379 |
+
<label for="ba_social_pinterest">
|
380 |
+
<input name="better_analytics[social][pinterest]" type="checkbox" id="ba_social_pinterest" value="1" <?php checked('1', @$betterAnalyticsOptions['social']['pinterest'] ); ?>>
|
381 |
+
<?php esc_html_e('Pinterest', 'better-analytics');?></label>
|
382 |
+
<br />
|
383 |
+
|
384 |
+
<label for="ba_social_linkedin">
|
385 |
+
<input name="better_analytics[social][linkedin]" type="checkbox" id="ba_social_linkedin" value="1" <?php checked('1', @$betterAnalyticsOptions['social']['linkedin'] ); ?>>
|
386 |
+
<?php esc_html_e('LinkedIn', 'better-analytics');?></label>
|
387 |
+
|
388 |
+
</fieldset>
|
389 |
+
|
390 |
+
</td>
|
391 |
+
</tr>
|
392 |
+
|
393 |
+
<tr valign="top" class="group_advertising tab_content">
|
394 |
+
<th scope="row"><?php esc_html_e('Advertisement Clicks To Track', 'better-analytics');?></th>
|
395 |
+
<td>
|
396 |
+
|
397 |
+
<fieldset>
|
398 |
+
<label for="ba_ads_adsense"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
399 |
+
<input name="better_analytics[ads][adsense]" type="checkbox" id="ba_ads_adsense" value="1" <?php checked('1', @$betterAnalyticsOptions['ads']['adsense']); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
400 |
+
<?php esc_html_e('AdSense', 'better-analytics');?></label>
|
401 |
+
<br />
|
402 |
+
|
403 |
+
<label for="ba_ads_outbrain"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
404 |
+
<input name="better_analytics[ads][outbrain]" type="checkbox" id="ba_ads_outbrain" value="1" <?php checked('1', @$betterAnalyticsOptions['ads']['outbrain'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
405 |
+
<?php esc_html_e('Outbrain', 'better-analytics');?></label>
|
406 |
+
<br />
|
407 |
+
|
408 |
+
<label for="ba_ads_taboola"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
409 |
+
<input name="better_analytics[ads][taboola]" type="checkbox" id="ba_ads_taboola" value="1" <?php checked('1', @$betterAnalyticsOptions['ads']['taboola'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
410 |
+
<?php esc_html_e('Taboola', 'better-analytics');?></label>
|
411 |
+
<br />
|
412 |
+
|
413 |
+
<label for="ba_ads_digitalpoint">
|
414 |
+
<input name="better_analytics[ads][digitalpoint]" type="checkbox" id="ba_ads_digitalpoint" value="1" <?php checked('1', @$betterAnalyticsOptions['ads']['digitalpoint'] ); ?>>
|
415 |
+
<?php esc_html_e('Digital Point', 'better-analytics');?></label>
|
416 |
+
|
417 |
+
|
418 |
+
</fieldset>
|
419 |
+
|
420 |
+
</td>
|
421 |
+
</tr>
|
422 |
+
|
423 |
+
|
424 |
+
|
425 |
+
<tr valign="top" class="group_monitor tab_content">
|
426 |
+
<th scope="row"><?php esc_html_e('Site Issues To Track', 'better-analytics');?></th>
|
427 |
+
<td>
|
428 |
+
<fieldset>
|
429 |
+
|
430 |
+
<label for="ba_events_error_404">
|
431 |
+
<input name="better_analytics[events][error_404]" type="checkbox" id="ba_events_error_404" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['error_404'] ); ?>>
|
432 |
+
<?php esc_html_e('Page Not Found (404)', 'better-analytics');?></label>
|
433 |
+
<br />
|
434 |
+
|
435 |
+
<label for="ba_events_missing_images"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
436 |
+
<input name="better_analytics[events][missing_images]" type="checkbox" id="ba_events_missing_images" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['missing_images'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
437 |
+
<?php esc_html_e('Images Not Loading', 'better-analytics');?>
|
438 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php esc_html_e('This relies on the ability of the user\'s browser to load images which will vary between browsers and Internet connections. This event can be a useful tool for finding missing images, but it keep in mind it will log any image that the end user\'s browser did not load (for any reason).', 'better-analytics');?>"></span>
|
439 |
+
</label>
|
440 |
+
<br />
|
441 |
+
|
442 |
+
<label for="ba_events_errors_javascript"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
443 |
+
<input name="better_analytics[events][error_js]" type="checkbox" id="ba_events_errors_javascript" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['error_js'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
444 |
+
<?php esc_html_e('JavaScript Errors', 'better-analytics');?></label>
|
445 |
+
<br />
|
446 |
+
|
447 |
+
<label for="ba_events_errors_ajax"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
448 |
+
<input name="better_analytics[events][error_ajax]" type="checkbox" id="ba_events_errors_ajax" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['error_ajax'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
449 |
+
<?php esc_html_e('AJAX Errors', 'better-analytics');?></label>
|
450 |
+
<br />
|
451 |
+
<label for="ba_events_errors_console"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
452 |
+
<input name="better_analytics[events][error_console]" type="checkbox" id="ba_events_errors_console" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['error_console'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
453 |
+
<?php esc_html_e('Browser Console Errors', 'better-analytics');?></label>
|
454 |
+
<br />
|
455 |
+
<label for="ba_events_errors_youtube"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
456 |
+
<input name="better_analytics[events][error_youtube]" type="checkbox" id="ba_events_errors_youtube" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['error_youtube'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
457 |
+
<?php esc_html_e('YouTube Errors', 'better-analytics');?>
|
458 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php esc_html_e('This allows you to quickly find old videos that the author has removed or disabled embeding for.', 'better-analytics');?>"></span>
|
459 |
+
</label>
|
460 |
+
|
461 |
+
</fieldset>
|
462 |
+
|
463 |
+
</td>
|
464 |
+
</tr>
|
465 |
+
|
466 |
+
<tr valign="top" class="group_monitor tab_content">
|
467 |
+
<th scope="row"><?php esc_html_e('Debugging Events', 'better-analytics');?></th>
|
468 |
+
<td>
|
469 |
+
<fieldset>
|
470 |
+
|
471 |
+
<label for="ba_events_ajax_requests">
|
472 |
+
<input name="better_analytics[events][ajax_request]" type="checkbox" id="ba_events_ajax_requests" value="1" <?php checked('1', @$betterAnalyticsOptions['events']['ajax_request'] ); ?>>
|
473 |
+
<?php esc_html_e('AJAX Requests', 'better-analytics');?></label>
|
474 |
+
</fieldset>
|
475 |
+
|
476 |
+
</td>
|
477 |
+
</tr>
|
478 |
+
|
479 |
+
<tr valign="top" class="group_ecommerce tab_content">
|
480 |
+
<th scope="row">Platforms</th>
|
481 |
+
<td>
|
482 |
+
<fieldset>
|
483 |
+
<label for="ba_ecommerce_woo"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
484 |
+
<input name="better_analytics[ecommerce][woo]" type="checkbox" id="ba_ecommerce_woo" value="1" <?php checked('1', @$betterAnalyticsOptions['ecommerce']['woo'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
485 |
+
<?php
|
486 |
+
esc_html_e('WooCommerce', 'better-analytics');
|
487 |
+
if (!in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) )
|
488 |
+
{
|
489 |
+
wp_enqueue_script('plugin-install');
|
490 |
+
wp_enqueue_script('thickbox');
|
491 |
+
wp_enqueue_style('thickbox');
|
492 |
+
|
493 |
+
printf('<p class="description">%s <a href="%s" class="thickbox" aria-label="%s" data-title="%s">%s</a></p>',
|
494 |
+
__('WooCommerce not enabled/active.', 'better-analytics'),
|
495 |
+
esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=woocommerce' .
|
496 |
+
'&TB_iframe=true&width=600&height=550' ) ),
|
497 |
+
esc_attr( sprintf( __( 'More information about %s' ), 'WooCommerce' ) ),
|
498 |
+
esc_attr( 'WooCommerce'),
|
499 |
+
__( 'View details' )
|
500 |
+
);
|
501 |
+
}
|
502 |
+
|
503 |
+
?>
|
504 |
+
|
505 |
+
</label>
|
506 |
+
|
507 |
+
</fieldset>
|
508 |
+
|
509 |
+
</td>
|
510 |
+
</tr>
|
511 |
+
|
512 |
+
|
513 |
+
|
514 |
+
<?php
|
515 |
+
|
516 |
+
if ($profiles)
|
517 |
+
{
|
518 |
+
$formatParams = DigitalPointBetterAnalytics_Base_Admin::groupProfiles($profiles['items']);
|
519 |
+
|
520 |
+
echo '<tr valign="top" class="group_api tab_content">
|
521 |
+
<th scope="row">' . __('Profile Used For Reporting', 'better-analytics') . '</th>
|
522 |
+
<td>';
|
523 |
+
|
524 |
+
echo '<select data-placeholder="Pick profile" id="ba_pick_api_profile" name="better_analytics[api][profile]" class="chosen-select">';
|
525 |
+
|
526 |
+
echo '<option value="">' . __('please pick a profile', 'better-analytics') . '</option>';
|
527 |
+
|
528 |
+
foreach ($formatParams as $url => $group)
|
529 |
+
{
|
530 |
+
echo '<optgroup label="' . htmlentities($url) . '">';
|
531 |
+
|
532 |
+
foreach ($group as $internalWebPropertyId => $name)
|
533 |
+
{
|
534 |
+
echo '<option value="' . $internalWebPropertyId . '"' . ($internalWebPropertyId == @$betterAnalyticsOptions['api']['profile'] ? ' selected="selected"' : '') . '>' . htmlentities($name) . '</option>';
|
535 |
+
|
536 |
+
}
|
537 |
+
|
538 |
+
echo '</optgroup>';
|
539 |
+
}
|
540 |
+
echo '</select>
|
541 |
+
</td>
|
542 |
+
</tr>';
|
543 |
+
}
|
544 |
+
?>
|
545 |
+
|
546 |
+
<tr valign="top" class="group_api tab_content">
|
547 |
+
<th scope="row"></th>
|
548 |
+
<td>
|
549 |
+
<a id="ba_select_profile" class="button" href="<?php menu_page_url('better-analytics_auth'); ?>"><?php
|
550 |
+
get_option('ba_tokens') ? esc_html_e('Link/Authenticate A Different Google Analytics Account', 'better-analytics') : esc_html_e('Link/Authenticate Your Google Analytics Account', 'better-analytics');?></a>
|
551 |
+
</td>
|
552 |
+
</tr>
|
553 |
+
|
554 |
+
|
555 |
+
|
556 |
+
<tr valign="top" class="group_api tab_content">
|
557 |
+
<th scope="row"></th>
|
558 |
+
<td>
|
559 |
+
<fieldset>
|
560 |
+
<label for="ba_api_use_own">
|
561 |
+
<input name="better_analytics[api][use_own]" type="checkbox" id="ba_api_use_own" value="1" <?php checked('1', @$betterAnalyticsOptions['api']['use_own'] ); ?>>
|
562 |
+
<?php esc_html_e('Use Your Own Project Credentials', 'better-analytics');?></label>
|
563 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php echo htmlspecialchars(sprintf(__('If you have your own Google API Project that you wish to use, you can use your credentials for that web application.', 'better-analytics')));?>"></span>
|
564 |
+
|
565 |
+
</fieldset>
|
566 |
+
|
567 |
+
</td>
|
568 |
+
</tr>
|
569 |
+
|
570 |
+
<tr valign="top" class="group_api tab_content api_hideable"<?php echo (!@$betterAnalyticsOptions['api']['use_own'] ? ' style="display:none"' : '')?>>
|
571 |
+
<td colspan="2">
|
572 |
+
|
573 |
+
<?php echo '<fieldset style="border:1px solid grey;margin:10px;padding:20px;"><legend style="padding:0 5px;font-weight:bold;font-size:120%">' . __('Configuration', 'better-analytics') . '</legend>' .
|
574 |
+
/* translators: %1$s = <strong>, %2$s = </strong> */
|
575 |
+
sprintf(__('Project needs to have the %1$sAnalytics API%2$s enabled under %1$sAPIs & auth -> APIs%2$s.', 'better_analytics'), '<strong>', '</strong>') . '<br /><br />' .
|
576 |
+
/* translators: %1$s = <strong>, %2$s = </strong> */
|
577 |
+
sprintf(__('Under %1$sAPIs & auth -> Credentials%2$s, you need to %1$sCreate new Client ID%2$s that is a %1$sWeb application%2$s with an authorized redirect URI of: %1$s%3$s%2$s', 'better-analytics'), '<strong>', '</strong>', menu_page_url('better-analytics_auth', false))
|
578 |
+
. '</fieldset>';?>
|
579 |
+
</td>
|
580 |
+
</tr>
|
581 |
+
|
582 |
+
|
583 |
+
<tr valign="top" class="group_api tab_content api_hideable"<?php echo (!@$betterAnalyticsOptions['api']['use_own'] ? ' style="display:none"' : '')?>>
|
584 |
+
<th scope="row"><?php esc_html_e('Client ID', 'better-analytics');?></th>
|
585 |
+
<td>
|
586 |
+
<input type="text" name="better_analytics[api][client_id]" id="ba_api_client_id" placeholder="0000000000.apps.googleusercontent.com" value="<?php echo esc_attr( @$betterAnalyticsOptions['api']['client_id'] ); ?>" />
|
587 |
+
</td>
|
588 |
+
</tr>
|
589 |
+
|
590 |
+
<tr valign="top" class="group_api tab_content api_hideable"<?php echo (!@$betterAnalyticsOptions['api']['use_own'] ? ' style="display:none"' : '')?>>
|
591 |
+
<th scope="row"><?php esc_html_e('Client Secret', 'better-analytics');?></th>
|
592 |
+
<td>
|
593 |
+
<input type="text" name="better_analytics[api][client_secret]" id="ba_api_client_secret" value="<?php echo esc_attr( @$betterAnalyticsOptions['api']['client_secret'] ); ?>" />
|
594 |
+
</td>
|
595 |
+
</tr>
|
596 |
+
|
597 |
+
|
598 |
+
<tr valign="top" class="group_advanced tab_content">
|
599 |
+
<th scope="row"><?php esc_html_e('Roles To Not Track', 'better-analytics');?> <span class="dashicons-before dashicons-info tooltip" title="<?php esc_html_e('If a logged in user is part of one of these groups, Analytics will not track them.', 'better-analytics');?>"></span></th>
|
600 |
+
<td>
|
601 |
+
|
602 |
+
<select data-placeholder="Pick roles to not track" id="ba_roles_no_track" name="better_analytics[roles_no_track][]" multiple class="chosen-select">
|
603 |
+
<option value=""></option>
|
604 |
+
|
605 |
+
<?php
|
606 |
+
print_r ($betterAnalyticsOptions);
|
607 |
+
|
608 |
+
global $wp_roles;
|
609 |
+
foreach ($wp_roles->roles as $role => $val)
|
610 |
+
{
|
611 |
+
echo '<option value="' . $role . '"' . (in_array($role, (array)@$betterAnalyticsOptions['roles_no_track']) ? ' selected="selected"' : '') . '>' . $val['name'] . '</option>';
|
612 |
+
}
|
613 |
+
?>
|
614 |
+
</select>
|
615 |
+
</td>
|
616 |
+
</tr>
|
617 |
+
|
618 |
+
<tr valign="top" class="group_advanced tab_content">
|
619 |
+
<th scope="row"><?php esc_html_e('Roles Able To View Reports/Dashboard', 'better-analytics');?></th>
|
620 |
+
<td>
|
621 |
+
|
622 |
+
<select data-placeholder="Pick roles that are able to view reports" id="ba_roles_view_reports" name="better_analytics[roles_view_reports][]" multiple class="chosen-select">
|
623 |
+
<option value=""></option>
|
624 |
+
|
625 |
+
<?php
|
626 |
+
foreach ($wp_roles->roles as $role => $val)
|
627 |
+
{
|
628 |
+
echo '<option value="' . $role . '"' . (in_array($role, (array)@$betterAnalyticsOptions['roles_view_reports']) ? ' selected="selected"' : '') . '>' . $val['name'] . '</option>';
|
629 |
+
}
|
630 |
+
?>
|
631 |
+
</select>
|
632 |
+
</td>
|
633 |
+
</tr>
|
634 |
+
|
635 |
+
|
636 |
+
<tr valign="top" class="group_advanced tab_content">
|
637 |
+
<th scope="row"><?php esc_html_e('File Extensions To Track As Downloads', 'better-analytics');?> <span class="dashicons-before dashicons-info tooltip" title="<?php esc_html_e('If a logged in user is part of one of these groups, Analytics will not track them.', 'better-analytics');?>"></span></th>
|
638 |
+
<td>
|
639 |
+
<select data-placeholder="Pick file extensions" id="ba_file_extensions" name="better_analytics[file_extensions][]" multiple class="chosen-select">
|
640 |
+
<option value=""></option>
|
641 |
+
|
642 |
+
<?php
|
643 |
+
$fileTypes = array(
|
644 |
+
'avi' => __('Audio Video Interleave (.avi)', 'better-analytics'),
|
645 |
+
'doc' => __('Word (.doc)', 'better-analytics'),
|
646 |
+
'exe' => __('Executable (.exe)', 'better-analytics'),
|
647 |
+
'gz' => __('gzip (.gz)', 'better-analytics'),
|
648 |
+
'mpg' => __('MPEG-1 Video (.mpg)', 'better-analytics'),
|
649 |
+
'mp3' => __('MP3 (.mp3)', 'better-analytics'),
|
650 |
+
'pdf' => __('Acrobat (.pdf)', 'better-analytics'),
|
651 |
+
'ppt' => __('PowerPoint (.ppt)', 'better-analytics'),
|
652 |
+
'psd' => __('Photoshop (.psd)', 'better-analytics'),
|
653 |
+
'rar' => __('RAR (.rar)', 'better-analytics'),
|
654 |
+
'wmv' => __('Windows Media Video (.wmv)', 'better-analytics'),
|
655 |
+
'xls' => __('Excel (.xls)', 'better-analytics'),
|
656 |
+
'zip' => __('Zip Archive (.zip)', 'better-analytics')
|
657 |
+
);
|
658 |
+
|
659 |
+
foreach ($fileTypes as $extension => $type)
|
660 |
+
{
|
661 |
+
echo '<option value="' . $extension . '"' . (in_array($extension, @$betterAnalyticsOptions['file_extensions']) ? ' selected="selected"' : '') . '>' . $type . '</option>';
|
662 |
+
}
|
663 |
+
?>
|
664 |
+
</select>
|
665 |
+
</td>
|
666 |
+
</tr>
|
667 |
+
|
668 |
+
|
669 |
+
<tr valign="top" class="group_advanced tab_content">
|
670 |
+
<th scope="row"><?php esc_html_e('Track Users With Analytics Blockers', 'better-analytics');?> <span class="dashicons-before dashicons-info tooltip" title="<?php
|
671 |
+
|
672 |
+
/* translators: %1$s = <strong>, %2$s = </strong>, %3$s = <p /> */
|
673 |
+
echo htmlspecialchars(sprintf(__('If a user has a mechanism that is blocking them from being tracked with Google Analytics, you can use this option to do server-side page view tracking of that user.%3$s For the most accuracy, %1$sit\'s not recommended to use this option for anything beyond "Registered Users"%2$s (having an account allows the system to track them uniquely on the backend).%3$s Logging page views for "Humans" will lead to a lot of niche bots being tracked (ones not popular enough to be widely known as a spider).', 'better-analytics'), '<strong>', '</strong>', '<p />'));
|
674 |
+
?>"></span></th>
|
675 |
+
<td>
|
676 |
+
<fieldset id="ba_track_blocked"<?php echo (!intval(@$betterAnalyticsInternal['v']) ? ' class="pro"' : ''); ?>>
|
677 |
+
<label>
|
678 |
+
<input name="better_analytics[track_blocked]" type="radio" value="never" <?php checked( 'never', @$betterAnalyticsOptions['track_blocked'] ); ?>>
|
679 |
+
<?php esc_html_e('Never', 'better-analytics');?></label>
|
680 |
+
<br />
|
681 |
+
|
682 |
+
<label>
|
683 |
+
<input name="better_analytics[track_blocked]" type="radio" value="logged_in" <?php checked( 'logged_in', @$betterAnalyticsOptions['track_blocked'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
684 |
+
<?php esc_html_e('Registered Users', 'better-analytics');?></label>
|
685 |
+
<br />
|
686 |
+
|
687 |
+
<label>
|
688 |
+
<input name="better_analytics[track_blocked]" type="radio" value="humans" <?php checked( 'humans', @$betterAnalyticsOptions['track_blocked'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
689 |
+
<?php esc_html_e('Humans', 'better-analytics');?></label>
|
690 |
+
<br />
|
691 |
+
|
692 |
+
<label>
|
693 |
+
<input name="better_analytics[track_blocked]" type="radio" value="everything" <?php checked( 'everything', @$betterAnalyticsOptions['track_blocked'] ); disabled(0, intval(@$betterAnalyticsInternal['v'])); ?>>
|
694 |
+
<?php esc_html_e('Everything', 'better-analytics');?></label>
|
695 |
+
|
696 |
+
</fieldset>
|
697 |
+
|
698 |
+
</td>
|
699 |
+
</tr>
|
700 |
+
|
701 |
+
<tr valign="top" class="group_advanced tab_content">
|
702 |
+
<th scope="row"><?php esc_html_e('Location For Analytics Code', 'better-analytics');?></th>
|
703 |
+
<td>
|
704 |
+
<fieldset id="ba_javascript_location">
|
705 |
+
<label>
|
706 |
+
<input name="better_analytics[javascript][location]" type="radio" value="header" <?php checked( 'header', @$betterAnalyticsOptions['javascript']['location'] ); ?>>
|
707 |
+
<?php esc_html_e('Header', 'better-analytics');?></label>
|
708 |
+
<br />
|
709 |
+
|
710 |
+
<label>
|
711 |
+
<input name="better_analytics[javascript][location]" type="radio" value="footer" <?php checked( 'footer', @$betterAnalyticsOptions['javascript']['location'] ); ?>>
|
712 |
+
<?php esc_html_e('Footer', 'better-analytics');?></label>
|
713 |
+
<br />
|
714 |
+
|
715 |
+
<label>
|
716 |
+
<input name="better_analytics[javascript][location]" type="radio" value="none" <?php checked( 'none', @$betterAnalyticsOptions['javascript']['location'] ); ?>>
|
717 |
+
<?php esc_html_e('No JavaScript (you have your own/other already)', 'better-analytics');?></label>
|
718 |
+
|
719 |
+
|
720 |
+
<br />
|
721 |
+
<label for="ba_use_in_admin">
|
722 |
+
<input name="better_analytics[javascript][use_in_admin]" type="checkbox" id="ba_use_in_admin" value="1" <?php checked('1', @$betterAnalyticsOptions['javascript']['use_in_admin'] ); ?>>
|
723 |
+
<?php esc_html_e('Use In Staff Area (wp-admin)', 'better-analytics');?></label>
|
724 |
+
</fieldset>
|
725 |
+
</td>
|
726 |
+
</tr>
|
727 |
+
|
728 |
+
<tr valign="top" class="group_advanced tab_content">
|
729 |
+
<th scope="row"><?php esc_html_e('When To Run Analytics Code', 'better-analytics');?></th>
|
730 |
+
<td>
|
731 |
+
<fieldset id="ba_javascript_run_time">
|
732 |
+
<label>
|
733 |
+
<input name="better_analytics[javascript][run_time]" type="radio" value="immediately" <?php checked( 'immediately', @$betterAnalyticsOptions['javascript']['run_time'] ); ?>>
|
734 |
+
<?php esc_html_e('Immediately', 'better-analytics');?></label>
|
735 |
+
<br />
|
736 |
+
|
737 |
+
<label>
|
738 |
+
<input name="better_analytics[javascript][run_time]" type="radio" value="ready" <?php checked( 'ready', @$betterAnalyticsOptions['javascript']['run_time'] ); ?>>
|
739 |
+
<?php esc_html_e('After Page Loads', 'better-analytics');?></label>
|
740 |
+
|
741 |
+
</fieldset>
|
742 |
+
</td>
|
743 |
+
</tr>
|
744 |
+
|
745 |
+
<tr valign="top" class="group_advanced tab_content">
|
746 |
+
<th scope="row"><?php esc_html_e('Campaign Tracking Within URLs', 'better-analytics');?></th>
|
747 |
+
<td>
|
748 |
+
<fieldset id="ba_javascript_campaign_tracking">
|
749 |
+
<label>
|
750 |
+
<input name="better_analytics[campaign_tracking]" type="radio" value="anchor" <?php checked( 'anchor', @$betterAnalyticsOptions['campaign_tracking'] ); ?>>
|
751 |
+
<?php esc_html_e('In Anchor', 'better-analytics');?></label>
|
752 |
+
<br />
|
753 |
+
|
754 |
+
<label>
|
755 |
+
<input name="better_analytics[campaign_tracking]" type="radio" value="params" <?php checked( 'params', @$betterAnalyticsOptions['campaign_tracking'] ); ?>>
|
756 |
+
<?php esc_html_e('In Parameters', 'better-analytics');?></label>
|
757 |
+
|
758 |
+
</fieldset>
|
759 |
+
</td>
|
760 |
+
</tr>
|
761 |
+
|
762 |
+
<tr valign="top" class="group_advanced tab_content">
|
763 |
+
<th scope="row"><?php esc_html_e('Sample Rate', 'better-analytics');?> <span class="dashicons-before dashicons-info tooltip" title="<?php esc_html_e('Specifies what percentage of users should be tracked. Very large sites may need to use a lower sample rate to stay within Google Analytics processing limits.', 'better-analytics');?>"></span>
|
764 |
+
</th>
|
765 |
+
<td>
|
766 |
+
|
767 |
+
<fieldset>
|
768 |
+
<div style="display:table">
|
769 |
+
<div style="display:table-row">
|
770 |
+
<div style="display:table-cell">
|
771 |
+
<input type="number" name="better_analytics[sample_rate]" id="ba_sample_rate" min="1" max="100" step="1" value="<?php echo esc_attr( intval(@$betterAnalyticsOptions['sample_rate']) ); ?>" /> %
|
772 |
+
</div>
|
773 |
+
</div>
|
774 |
+
|
775 |
+
|
776 |
+
</div>
|
777 |
+
</fieldset>
|
778 |
+
|
779 |
+
</td>
|
780 |
+
</tr>
|
781 |
+
|
782 |
+
|
783 |
+
<tr valign="top" class="group_advanced tab_content">
|
784 |
+
<th scope="row"><?php esc_html_e('Extra JavaScript', 'better-analytics');?> <span class="dashicons-before dashicons-info tooltip" title="<?php echo htmlspecialchars(sprintf(__('This allows you to add your own JavaScript code to the Analytics tracking code. This JavaScript is inserted right before the %1$s function.', 'better-analytics'), '<strong>ga(\'send\', \'pageview\');</strong>')); ?>"></span></th>
|
785 |
+
<td>
|
786 |
+
<textarea name="better_analytics[extra_js]" rows="10" cols="50" id="ba_extra_js" class="large-text code"><?php echo esc_attr( @$betterAnalyticsOptions['extra_js'] ); ?></textarea>
|
787 |
+
</td>
|
788 |
+
</tr>
|
789 |
+
|
790 |
+
<tr valign="top" class="group_advanced tab_content">
|
791 |
+
<th scope="row"><?php esc_html_e('Debugging', 'better-analytics');?></th>
|
792 |
+
<td>
|
793 |
+
<fieldset>
|
794 |
+
<label for="ba_debugging">
|
795 |
+
<input name="better_analytics[debugging]" type="checkbox" id="ba_debugging" value="1" <?php checked('1', @$betterAnalyticsOptions['debugging'] ); ?>>
|
796 |
+
<?php _e('Enable Google Analytics Debugging', 'better-analytics');?></label>
|
797 |
+
<span class="dashicons-before dashicons-info tooltip" title="<?php esc_html_e('This will display Google Analytics debug data in the browser console.', 'better-analytics');?>"></span>
|
798 |
+
|
799 |
+
</fieldset>
|
800 |
+
|
801 |
+
</td>
|
802 |
+
</tr>
|
803 |
+
|
804 |
+
|
805 |
+
</table>
|
806 |
+
|
807 |
+
<?php submit_button(); ?>
|
808 |
+
</form>
|
809 |
+
|
810 |
+
</div>
|
library/DigitalPointBetterAnalytics/ViewAdmin/dashboard.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
wp_enqueue_script('jsapi', 'https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221.1%22%2C%22packages%22%3A%5B%22corechart%22%2C%22geochart%22%2C%22table%22%5D%7D%5D%7D', array(), null );
|
4 |
+
|
5 |
+
wp_enqueue_script('better_analytics_admin_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/js/admin.js', array(), BETTER_ANALYTICS_VERSION );
|
6 |
+
wp_enqueue_style('better_analytics_admin_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/css/admin.css', array(), BETTER_ANALYTICS_VERSION);
|
7 |
+
|
8 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
9 |
+
DigitalPointBetterAnalytics_Helper_Api::check();
|
10 |
+
|
11 |
+
if (!get_option('ba_tokens') || !$betterAnalyticsOptions['api']['profile'])
|
12 |
+
{
|
13 |
+
printf(__('%1$sSet up API access%2$s to utilize Better Analytics charts.', 'better-analytics'),
|
14 |
+
'<a href="' . esc_url(menu_page_url('better-analytics', false) . '#top#api') . '">',
|
15 |
+
'</a>'
|
16 |
+
);
|
17 |
+
}
|
18 |
+
else
|
19 |
+
{
|
20 |
+
$betterAnalyticsDashboardPick = get_option('ba_dashboard_pick');
|
21 |
+
|
22 |
+
$dimensions = DigitalPointBetterAnalytics_ControllerAdmin_Analytics::getDimensionsForCharts();
|
23 |
+
$metrics = DigitalPointBetterAnalytics_ControllerAdmin_Analytics::getMetricsForCharts();
|
24 |
+
|
25 |
+
if (!$betterAnalyticsDashboardPick['dimension'])
|
26 |
+
{
|
27 |
+
$betterAnalyticsDashboardPick['dimension'] = 'p:ga:date';
|
28 |
+
}
|
29 |
+
|
30 |
+
if (!$betterAnalyticsDashboardPick['metric'])
|
31 |
+
{
|
32 |
+
$betterAnalyticsDashboardPick['metric'] = 'ga:pageviews';
|
33 |
+
}
|
34 |
+
|
35 |
+
if (!$betterAnalyticsDashboardPick['days'])
|
36 |
+
{
|
37 |
+
$betterAnalyticsDashboardPick['days'] = '30';
|
38 |
+
}
|
39 |
+
|
40 |
+
echo '<div id="ba_history" style="display: inline; padding-right: 10px;' . ($betterAnalyticsDashboardPick['realtime'] ? 'color=grey;' : '') . '">
|
41 |
+
<select id="ba_metric"' . ($betterAnalyticsDashboardPick['realtime'] ? ' disabled="disabled"' : '') . '>';
|
42 |
+
foreach ($metrics as $key => $name)
|
43 |
+
{
|
44 |
+
echo '<option value="' . $key . '"' . ($key == $betterAnalyticsDashboardPick['metric'] ? ' selected="selected"' : '') . '>' . htmlentities($name) . '</option>';
|
45 |
+
}
|
46 |
+
echo '</select>';
|
47 |
+
|
48 |
+
|
49 |
+
echo ' ' . __('by', 'better-analytics') . ' ';
|
50 |
+
|
51 |
+
echo '<select data-placeholder="Pick chart" id="ba_dimension" class="chosen-select"' . ($betterAnalyticsDashboardPick['realtime'] ? ' disabled="disabled"' : '') . '>';
|
52 |
+
foreach ($dimensions as $key => $name)
|
53 |
+
{
|
54 |
+
echo '<option value="' . $key . '"' . ($key == $betterAnalyticsDashboardPick['dimension'] ? ' selected="selected"' : '') . '>' . htmlentities($name) . '</option>';
|
55 |
+
}
|
56 |
+
echo '</select>';
|
57 |
+
|
58 |
+
|
59 |
+
echo ' ' . __('for last', 'better-analytics') . ' ';
|
60 |
+
|
61 |
+
|
62 |
+
$chartDays = array(
|
63 |
+
'7' => __('7 Days', 'better-analytics'),
|
64 |
+
'14' => __('14 Days', 'better-analytics'),
|
65 |
+
'30' => __('1 Month', 'better-analytics'),
|
66 |
+
'90' => __('3 Months', 'better-analytics'),
|
67 |
+
'365' => __('1 Year', 'better-analytics'),
|
68 |
+
'1825' => __('5 Years', 'better-analytics'),
|
69 |
+
'3650' => __('10 Years', 'better-analytics'),
|
70 |
+
);
|
71 |
+
|
72 |
+
|
73 |
+
echo '<select id="ba_days"' . ($betterAnalyticsDashboardPick['realtime'] ? ' disabled="disabled"' : '') . '>';
|
74 |
+
foreach ($chartDays as $key => $name)
|
75 |
+
{
|
76 |
+
echo '<option value="' . $key . '"' . ($key == $betterAnalyticsDashboardPick['days'] ? ' selected="selected"' : '') . '>' . htmlentities($name) . '</option>';
|
77 |
+
}
|
78 |
+
echo '</select>
|
79 |
+
</div>';
|
80 |
+
|
81 |
+
echo '<label style="white-space: nowrap;"><input type="checkbox" id="ba_realtime"' . ($betterAnalyticsDashboardPick['realtime'] ? ' checked="checked"' : '') . '> ' . __('Realtime', 'better-analytics') . '</label>';
|
82 |
+
|
83 |
+
echo '<div id="ba_chart"></div>';
|
84 |
+
|
85 |
+
echo '<div id="ba_realtime_charts">
|
86 |
+
<div id="ba_rt_users"><span class="number" data-number="0"></span><div class="label">' . __('active users', 'better-analytics') . '</div></div><div id="ba_rt_map"></div>
|
87 |
+
<div id="ba_rt_medium"></div><div id="ba_rt_device"></div>
|
88 |
+
<div id="ba_rt_keywords"></div><div id="ba_rt_referral_path"></div>
|
89 |
+
<div id="ba_rt_page_path"></div>
|
90 |
+
</div>';
|
91 |
+
}
|
library/DigitalPointBetterAnalytics/ViewAdmin/reports/area_charts.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
wp_enqueue_script('jsapi', 'https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221.1%22%2C%22packages%22%3A%5B%22corechart%22%5D%7D%5D%7D', array(), null );
|
4 |
+
|
5 |
+
wp_enqueue_script('chosen_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/chosen/chosen.jquery.min.js', array(), BETTER_ANALYTICS_VERSION );
|
6 |
+
wp_enqueue_style('chosen_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/chosen/chosen.min.css', array(), BETTER_ANALYTICS_VERSION);
|
7 |
+
|
8 |
+
wp_enqueue_script('better_analytics_admin_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/js/admin.js', array(), BETTER_ANALYTICS_VERSION );
|
9 |
+
wp_enqueue_style('better_analytics_admin_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/css/admin.css', array(), BETTER_ANALYTICS_VERSION);
|
10 |
+
echo '<h2>' . __('Reports & Charts', 'better-analytics') . '</h2>';
|
11 |
+
|
12 |
+
?>
|
13 |
+
|
14 |
+
|
15 |
+
<h3 class="nav-tab-wrapper">
|
16 |
+
<a class="nav-tab" href="<?php menu_page_url('better-analytics_heatmaps'); ?>"><?php esc_html_e( 'Weekly Heat Maps', 'better-analytics' ); ?></a>
|
17 |
+
<a class="nav-tab nav-tab-active" href="<?php menu_page_url('better-analytics_areacharts'); ?>"><?php esc_html_e( 'Charts', 'better-analytics' ); ?></a>
|
18 |
+
<a class="nav-tab" href="<?php menu_page_url('better-analytics_events'); ?>"><?php esc_html_e( 'Events', 'better-analytics' ); ?></a>
|
19 |
+
<a class="nav-tab" href="<?php menu_page_url('better-analytics_monitor'); ?>"><?php esc_html_e( 'Issue Monitoring', 'better-analytics' ); ?></a>
|
20 |
+
</h3>
|
21 |
+
|
22 |
+
<div id="chart_loading" class="dashicons dashicons-update"></div>
|
23 |
+
<div id="area_chart"></div>
|
24 |
+
|
25 |
+
<form>
|
26 |
+
<table id="parameters" class="form-table">
|
27 |
+
<?php
|
28 |
+
echo '<tr valign="top">
|
29 |
+
<th scope="row">' . __('Dimension', 'better-analytics') . '</th>
|
30 |
+
<td>';
|
31 |
+
|
32 |
+
echo '<select id="ba_dimension" name="dimension" class="chosen-charts">';
|
33 |
+
|
34 |
+
foreach ($dimensions as $label => $group)
|
35 |
+
{
|
36 |
+
echo '<optgroup label="' . htmlentities($label) . '">';
|
37 |
+
|
38 |
+
foreach ($group as $key => $name)
|
39 |
+
{
|
40 |
+
echo '<option value="' . $key . '"' . selected($key, 'browser') . '>' . htmlentities($name) . '</option>';
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
echo '</optgroup>';
|
45 |
+
}
|
46 |
+
echo '</select>
|
47 |
+
</td>
|
48 |
+
</tr>';
|
49 |
+
|
50 |
+
|
51 |
+
echo '<tr valign="top">
|
52 |
+
<th scope="row">' . __('Time Frame', 'better-analytics') . '</th>
|
53 |
+
<td>';
|
54 |
+
|
55 |
+
echo '<select id="ba_time_frame" name="time_frame" class="chosen-charts">';
|
56 |
+
|
57 |
+
echo '<option value="30">' . __('1 Month', 'better-analytics') . '</option>';
|
58 |
+
echo '<option value="365" selected="selected">' . __('1 Year', 'better-analytics') . '</option>';
|
59 |
+
echo '<option value="730">' . __('2 Years', 'better-analytics') . '</option>';
|
60 |
+
echo '<option value="1825">' . __('5 Years', 'better-analytics') . '</option>';
|
61 |
+
echo '<option value="3650">' . __('10 Years', 'better-analytics') . '</option>';
|
62 |
+
|
63 |
+
echo '</select>
|
64 |
+
</td>
|
65 |
+
</tr>';
|
66 |
+
|
67 |
+
|
68 |
+
echo '<tr valign="top">
|
69 |
+
<th scope="row">' . __('Scope', 'better-analytics') . '</th>
|
70 |
+
<td>';
|
71 |
+
|
72 |
+
echo '<select id="ba_scope" name="scope" class="chosen-charts">';
|
73 |
+
|
74 |
+
echo '<option value="day">' . __('Day', 'better-analytics') . '</option>';
|
75 |
+
echo '<option value="month" selected="selected">' . __('Month', 'better-analytics') . '</option>';
|
76 |
+
echo '<option value="year">' . __('Year', 'better-analytics') . '</option>';
|
77 |
+
|
78 |
+
echo '</select>
|
79 |
+
</td>
|
80 |
+
</tr>';
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
echo '<tr valign="top">
|
87 |
+
<th scope="row">' . __('Minimum Value To Plot', 'better-analytics') . '</th>
|
88 |
+
<td>';
|
89 |
+
|
90 |
+
echo '<input type="number" id="ba_minimum" name="minimum" value="100" min="0" step="100">
|
91 |
+
</td>
|
92 |
+
</tr>';
|
93 |
+
|
94 |
+
echo '<tr valign="top">
|
95 |
+
<th scope="row">' . __('Display Chart As', 'better-analytics') . '</th>
|
96 |
+
<td>';
|
97 |
+
|
98 |
+
echo '<label><input name="chart_type" type="radio" value="percent" checked="checked">' . __('Stacked Area Percent', 'better-analytics') . '</label> ';
|
99 |
+
echo '<label><input name="chart_type" type="radio" value="absolute">' . __('Stacked', 'better-analytics') . '</label> ';
|
100 |
+
echo '<label><input name="chart_type" type="radio" value="">' . __('Overlap', 'better-analytics') . '</label>
|
101 |
+
|
102 |
+
|
103 |
+
</td>
|
104 |
+
</tr>';
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
?>
|
109 |
+
</table>
|
110 |
+
|
111 |
+
</form>
|
library/DigitalPointBetterAnalytics/ViewAdmin/reports/events.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
wp_enqueue_script('jsapi', 'https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221.1%22%2C%22packages%22%3A%5B%22table%22%5D%7D%5D%7D', array(), null );
|
4 |
+
|
5 |
+
wp_enqueue_script('better_analytics_admin_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/js/admin.js', array(), BETTER_ANALYTICS_VERSION );
|
6 |
+
wp_enqueue_style('better_analytics_admin_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/css/admin.css', array(), BETTER_ANALYTICS_VERSION);
|
7 |
+
echo '<h2>' . __('Reports & Charts', 'better-analytics') . '</h2>';
|
8 |
+
|
9 |
+
?>
|
10 |
+
|
11 |
+
|
12 |
+
<h3 class="nav-tab-wrapper">
|
13 |
+
<a class="nav-tab" href="<?php menu_page_url('better-analytics_heatmaps'); ?>"><?php esc_html_e( 'Weekly Heat Maps', 'better-analytics' ); ?></a>
|
14 |
+
<a class="nav-tab" href="<?php menu_page_url('better-analytics_areacharts'); ?>"><?php esc_html_e( 'Charts', 'better-analytics' ); ?></a>
|
15 |
+
<a class="nav-tab<?php echo ($type == 'events' ? ' nav-tab-active' : ''); ?>" href="<?php menu_page_url('better-analytics_events'); ?>"><?php esc_html_e( 'Events', 'better-analytics' ); ?></a>
|
16 |
+
<a class="nav-tab<?php echo ($type == 'monitor' ? ' nav-tab-active' : ''); ?>" href="<?php menu_page_url('better-analytics_monitor'); ?>"><?php esc_html_e( 'Issue Monitoring', 'better-analytics' ); ?></a>
|
17 |
+
</h3>
|
18 |
+
|
19 |
+
<div id="chart_loading" class="dashicons dashicons-update"></div>
|
20 |
+
|
21 |
+
<form class="ba_monitor_form">
|
22 |
+
<table id="parameters" class="form-table">
|
23 |
+
<?php
|
24 |
+
|
25 |
+
echo '<tr valign="top">
|
26 |
+
<th scope="row">' . __('Days Back', 'better-analytics') . '</th>
|
27 |
+
<td>';
|
28 |
+
|
29 |
+
echo '<input type="number" id="ba_days" name="days" value="7" min="1" max="3650" step="10">
|
30 |
+
</td>
|
31 |
+
</tr>';
|
32 |
+
|
33 |
+
?>
|
34 |
+
</table>
|
35 |
+
</form>
|
36 |
+
|
37 |
+
<div id="ba_monitor" data-type="<?php echo $type; ?>"></div>
|
library/DigitalPointBetterAnalytics/ViewAdmin/reports/heatmaps.php
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
wp_enqueue_script('chosen_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/chosen/chosen.jquery.min.js', array(), BETTER_ANALYTICS_VERSION );
|
3 |
+
wp_enqueue_style('chosen_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/chosen/chosen.min.css', array(), BETTER_ANALYTICS_VERSION);
|
4 |
+
|
5 |
+
wp_enqueue_script('better_analytics_admin_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/js/admin.js', array(), BETTER_ANALYTICS_VERSION );
|
6 |
+
wp_enqueue_style('better_analytics_admin_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/css/admin.css', array(), BETTER_ANALYTICS_VERSION);
|
7 |
+
|
8 |
+
echo '<h2>' . __('Reports & Charts', 'better-analytics') . '</h2>';
|
9 |
+
?>
|
10 |
+
|
11 |
+
<h3 class="nav-tab-wrapper">
|
12 |
+
<a class="nav-tab nav-tab-active" href="<?php menu_page_url('better-analytics_heatmaps'); ?>"><?php esc_html_e( 'Weekly Heat Maps', 'better-analytics' ); ?></a>
|
13 |
+
<a class="nav-tab" href="<?php menu_page_url('better-analytics_areacharts'); ?>"><?php esc_html_e( 'Charts', 'better-analytics' ); ?></a>
|
14 |
+
<a class="nav-tab" href="<?php menu_page_url('better-analytics_events'); ?>"><?php esc_html_e( 'Events', 'better-analytics' ); ?></a>
|
15 |
+
<a class="nav-tab" href="<?php menu_page_url('better-analytics_monitor'); ?>"><?php esc_html_e( 'Issue Monitoring', 'better-analytics' ); ?></a>
|
16 |
+
</h3>
|
17 |
+
|
18 |
+
<div id="chart_loading" class="dashicons dashicons-update"></div>
|
19 |
+
|
20 |
+
<div id="Heatmap" class="table">
|
21 |
+
<div class="row">
|
22 |
+
<div class="cell"></div>
|
23 |
+
|
24 |
+
<div class="cell"><?php
|
25 |
+
/* translators: Sunday (day of the week), with everything between %s hidden on smaller screens (responsive) */
|
26 |
+
printf(__('Sun%sday%s', 'better-analytics'), '<span class="responsiveHide">', '</span>');
|
27 |
+
?></div>
|
28 |
+
|
29 |
+
<div class="cell"><?php
|
30 |
+
/* translators: Monday (day of the week), with everything between %s hidden on smaller screens (responsive) */
|
31 |
+
printf(__('Mon%sday%s', 'better-analytics'), '<span class="responsiveHide">', '</span>');
|
32 |
+
?></div>
|
33 |
+
|
34 |
+
<div class="cell"><?php
|
35 |
+
/* translators: Tuesday (day of the week), with everything between %s hidden on smaller screens (responsive) */
|
36 |
+
printf(__('Tue%ssday%s', 'better-analytics'), '<span class="responsiveHide">', '</span>');
|
37 |
+
?></div>
|
38 |
+
|
39 |
+
<div class="cell"><?php
|
40 |
+
/* translators: Wednesday (day of the week), with everything between %s hidden on smaller screens (responsive) */
|
41 |
+
printf(__('Wed%snesday%s', 'better-analytics'), '<span class="responsiveHide">', '</span>');
|
42 |
+
?></div>
|
43 |
+
|
44 |
+
<div class="cell"><?php
|
45 |
+
/* translators: Thursday (day of the week), with everything between %s hidden on smaller screens (responsive) */
|
46 |
+
printf(__('Thu%srsday%s', 'better-analytics'), '<span class="responsiveHide">', '</span>');
|
47 |
+
?></div>
|
48 |
+
|
49 |
+
<div class="cell"><?php
|
50 |
+
/* translators: Friday (day of the week), with everything between %s hidden on smaller screens (responsive) */
|
51 |
+
printf(__('Fri%sday%s', 'better-analytics'), '<span class="responsiveHide">', '</span>');
|
52 |
+
?></div>
|
53 |
+
|
54 |
+
<div class="cell"><?php
|
55 |
+
/* translators: Saturday (day of the week), with everything between %s hidden on smaller screens (responsive) */
|
56 |
+
printf(__('Sat%surday%s', 'better-analytics'), '<span class="responsiveHide">', '</span>');
|
57 |
+
?></div>
|
58 |
+
</div>
|
59 |
+
<?php
|
60 |
+
foreach ($heatmap_data as $hour_key => $hour_data)
|
61 |
+
{
|
62 |
+
echo '<div class="row"><div class="cell">' . $hour_map[$hour_key]. '</div>';
|
63 |
+
foreach ($hour_data as $day_key => $day_data)
|
64 |
+
{
|
65 |
+
echo '<div id="slot' . $hour_key . '-' . $day_key . '" class="cell" data-val="' . $day_data . '"></div>';
|
66 |
+
}
|
67 |
+
echo '</div>';
|
68 |
+
}
|
69 |
+
?>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<form>
|
73 |
+
<table id="parameters" class="form-table">
|
74 |
+
<?php
|
75 |
+
echo '<tr valign="top">
|
76 |
+
<th scope="row">' . __('Metric', 'better-analytics') . '</th>
|
77 |
+
<td>';
|
78 |
+
|
79 |
+
echo '<select id="ba_metric" name="metric" class="chosen-charts">';
|
80 |
+
|
81 |
+
foreach ($metrics as $label => $group)
|
82 |
+
{
|
83 |
+
echo '<optgroup label="' . htmlentities($label) . '">';
|
84 |
+
|
85 |
+
foreach ($group as $key => $name)
|
86 |
+
{
|
87 |
+
echo '<option value="' . $key . '"' . selected($key, 'ga:sessions') . '>' . htmlentities($name) . '</option>';
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
echo '</optgroup>';
|
92 |
+
}
|
93 |
+
echo '</select>
|
94 |
+
</td>
|
95 |
+
</tr>';
|
96 |
+
|
97 |
+
|
98 |
+
echo '<tr valign="top">
|
99 |
+
<th scope="row">' . __('Segment', 'better-analytics') . '</th>
|
100 |
+
<td>';
|
101 |
+
|
102 |
+
echo '<select id="ba_segment" name="segment" class="chosen-charts">';
|
103 |
+
|
104 |
+
foreach ($segments as $label => $group)
|
105 |
+
{
|
106 |
+
echo '<optgroup label="' . htmlentities($label) . '">';
|
107 |
+
|
108 |
+
foreach ($group as $key => $name)
|
109 |
+
{
|
110 |
+
echo '<option value="' . $key . '">' . htmlentities($name) . '</option>';
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
echo '</optgroup>';
|
115 |
+
}
|
116 |
+
echo '</select>
|
117 |
+
</td>
|
118 |
+
</tr>';
|
119 |
+
|
120 |
+
?>
|
121 |
+
<tr>
|
122 |
+
<th></th>
|
123 |
+
<td>
|
124 |
+
<input type="number" name="weeks" id="ba_weeks" size="5" min="1" max="1000" step="1" value="4" /> <?php _e('Weeks Of Data, Ending', 'better-analytics') ?>
|
125 |
+
<input type="number" name="end" id="ba_end" size="5" min="0" max="10000" step="1" value="1" /> <?php _e('Days Ago', 'better-analytics') ?>
|
126 |
+
|
127 |
+
</td>
|
128 |
+
</tr>
|
129 |
+
|
130 |
+
</table>
|
131 |
+
</form>
|
library/DigitalPointBetterAnalytics/ViewAdmin/test.php
ADDED
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
wp_enqueue_style('better_analytics_admin_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/css/admin.css', array(), BETTER_ANALYTICS_VERSION);
|
3 |
+
|
4 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
5 |
+
|
6 |
+
if (DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->checkAccessToken(false))
|
7 |
+
{
|
8 |
+
$checks['profiles'] = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getProfiles();
|
9 |
+
$checks['matchingProfile'] = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getProfileByPropertyId($betterAnalyticsOptions['property_id']);
|
10 |
+
|
11 |
+
$checks['siteSearchSetup'] = @$checks['matchingProfile']['siteSearchQueryParameters'] == 's';
|
12 |
+
$checks['ecommerceTracking'] = @$checks['matchingProfile']['eCommerceTracking'];
|
13 |
+
$checks['enhancedEcommerceTracking'] = @$checks['matchingProfile']['enhancedECommerceTracking'];
|
14 |
+
|
15 |
+
$property = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getPropertyByPropertyId(@$checks['matchingProfile']['accountId'], $betterAnalyticsOptions['property_id']);
|
16 |
+
|
17 |
+
$checks['level'] = @$property['level'];
|
18 |
+
$checks['industryVertical'] = @$property['industryVertical'];
|
19 |
+
|
20 |
+
$checks['dimensions'] = DigitalPointBetterAnalytics_Helper_Reporting::getInstance()->getDimensionsByPropertyId(@$checks['matchingProfile']['accountId'], $betterAnalyticsOptions['property_id'], array('Categories', 'Author', 'Tags', 'User'));
|
21 |
+
}
|
22 |
+
|
23 |
+
$checks['licensed'] = DigitalPointBetterAnalytics_Helper_Api::check(true);
|
24 |
+
|
25 |
+
// $checks['user_dimension_set'] = (XenForo_Application::getOptions()->dpBetterAnalyticsDimensionIndexUser > 0 && @$checks['dimensions']['User']['index'] == XenForo_Application::getOptions()->dpBetterAnalyticsDimensionIndexUser);
|
26 |
+
// $checks['forum_dimension_set'] = (XenForo_Application::getOptions()->dpBetterAnalyticsDimentionIndex > 0 && @$checks['dimensions']['Forum']['index'] == XenForo_Application::getOptions()->dpBetterAnalyticsDimentionIndex);
|
27 |
+
|
28 |
+
?>
|
29 |
+
|
30 |
+
<div class="wrap">
|
31 |
+
|
32 |
+
<h2><?php esc_html_e( 'Test Analytics Integration' , 'better-analytics');?></h2>
|
33 |
+
|
34 |
+
<table class="form-table" id="ba_test">
|
35 |
+
<?php esc_html_e( 'This is a checklist of things for full integration with Google Analytics. You can click on any of the titles to be taken where you need to go to configure that item.' , 'better-analytics');?>
|
36 |
+
|
37 |
+
<tr><td colspan="3"><h3><?php esc_html_e( 'Things That Can Be Automatically Checked' , 'better-analytics');?></h3></td></tr>
|
38 |
+
|
39 |
+
<tr valign="top">
|
40 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#general', __('Web Property ID Defined', 'better-analytics'));?></th>
|
41 |
+
<?php
|
42 |
+
echo ($betterAnalyticsOptions['property_id'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
43 |
+
?>
|
44 |
+
<td></td>
|
45 |
+
</tr>
|
46 |
+
|
47 |
+
<tr valign="top">
|
48 |
+
|
49 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://php.net/manual/en/curl.installation.php', __('cURL Installed', 'better-analytics'));?></th>
|
50 |
+
|
51 |
+
<?php
|
52 |
+
echo (function_exists('curl_multi_init') ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
53 |
+
?>
|
54 |
+
<td class="description">
|
55 |
+
<?php _e('Not required, but recommended to have the cURL extensions enabled in PHP.', 'better-analytics');?>
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
|
59 |
+
<?php
|
60 |
+
// not really needed since most people will not use their own project credentials
|
61 |
+
/*
|
62 |
+
?>
|
63 |
+
<tr valign="top">
|
64 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#api', __('API Project Credentials', 'better-analytics'));?></th>
|
65 |
+
<?php
|
66 |
+
echo ($betterAnalyticsOptions['api']['client_id'] && $betterAnalyticsOptions['api']['client_secret'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
67 |
+
?>
|
68 |
+
<td>
|
69 |
+
</td>
|
70 |
+
</tr>
|
71 |
+
*/
|
72 |
+
?>
|
73 |
+
|
74 |
+
<tr valign="top">
|
75 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#api', __('Google Analytics Account Linked', 'better-analytics'));?></th>
|
76 |
+
<?php
|
77 |
+
echo (get_option('ba_tokens') ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
78 |
+
?>
|
79 |
+
</tr>
|
80 |
+
|
81 |
+
<tr valign="top">
|
82 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#api', __('Analytics Profile Selected', 'better-analytics'));?></th>
|
83 |
+
<?php
|
84 |
+
echo ($betterAnalyticsOptions['api']['profile'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
85 |
+
?>
|
86 |
+
</tr>
|
87 |
+
|
88 |
+
<tr valign="top">
|
89 |
+
|
90 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('Site Search Setup', 'better-analytics'));?></th>
|
91 |
+
<?php
|
92 |
+
echo ($checks['siteSearchSetup'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
93 |
+
?>
|
94 |
+
<td class="description">
|
95 |
+
<?php
|
96 |
+
/* translators: %1$s = <strong>, %2$s = </strong> */
|
97 |
+
printf(__('Found in Google Analytics account under %1$sView Settings -> Query Parameter%2$s (should be set to "%1$ss%2$s").', 'better-analytics'), '<strong>', '</strong>');
|
98 |
+
?>
|
99 |
+
</td>
|
100 |
+
</tr>
|
101 |
+
|
102 |
+
<tr valign="top">
|
103 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('Ecommerce Tracking Enabled', 'better-analytics'));?></th>
|
104 |
+
<?php
|
105 |
+
echo ($checks['ecommerceTracking'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
106 |
+
?>
|
107 |
+
<td class="description">
|
108 |
+
|
109 |
+
<?php
|
110 |
+
/* translators: %1$s = <strong>, %2$s = </strong> */
|
111 |
+
printf(__('Found in Google Analytics account under %1$sEcommerce Settings%2$s.', 'better-analytics'), '<strong>', '</strong>');
|
112 |
+
?>
|
113 |
+
</td>
|
114 |
+
</tr>
|
115 |
+
|
116 |
+
<tr valign="top">
|
117 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('Enhanced Ecommerce Tracking Enabled', 'better-analytics'));?></th>
|
118 |
+
<?php
|
119 |
+
echo ($checks['enhancedEcommerceTracking'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
120 |
+
?>
|
121 |
+
<td class="description">
|
122 |
+
<?php
|
123 |
+
/* translators: %1$s = <strong>, %2$s = </strong> */
|
124 |
+
printf(__('Found in Google Analytics account under %1$sEcommerce Settings%2$s.', 'better-analytics'), '<strong>', '</strong>');
|
125 |
+
?>
|
126 |
+
</td>
|
127 |
+
</tr>
|
128 |
+
|
129 |
+
<tr valign="top">
|
130 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('Industry Vertical Set', 'better-analytics'));?></th>
|
131 |
+
<?php
|
132 |
+
echo ($checks['industryVertical'] && $checks['industryVertical'] != 'UNSPECIFIED' ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
133 |
+
?>
|
134 |
+
<td class="description">
|
135 |
+
<?php
|
136 |
+
/* translators: %1$s = <strong>, %2$s = </strong>, %3$s = current setting in Google Analytics account */
|
137 |
+
printf(__('Found in Google Analytics account under %1$sProperty Settings%2$s (currently set to %1$s%3$s%2$s).', 'better-analytics'), '<strong>', '</strong>', ($checks['industryVertical'] ? $checks['industryVertical'] : 'UNSPECIFIED'));
|
138 |
+
?>
|
139 |
+
</td>
|
140 |
+
</tr>
|
141 |
+
|
142 |
+
<tr valign="top">
|
143 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('Custom Dimension For Category Tracking', 'better-analytics'));?></th>
|
144 |
+
<?php
|
145 |
+
echo ($checks['dimensions']['Categories'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
146 |
+
?>
|
147 |
+
<td class="description">
|
148 |
+
<?php
|
149 |
+
/* translators: %1$s = <strong>, %2$s = </strong> ... %3$s can't be translated - leave */
|
150 |
+
printf(__('Found in Google Analytics account under %1$sCustom Definitions -> Custom Dimensions%2$s (should be named "%1$s%3$s%2$s" and scoped for "%1$sHit%2$s").', 'better-analytics'), '<strong>', '</strong>', 'Categories');
|
151 |
+
?>
|
152 |
+
</td>
|
153 |
+
</tr>
|
154 |
+
|
155 |
+
<tr valign="top">
|
156 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('Custom Dimension For Author Tracking', 'better-analytics'));?></th>
|
157 |
+
<?php
|
158 |
+
echo ($checks['dimensions']['Author'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
159 |
+
?>
|
160 |
+
|
161 |
+
<td class="description">
|
162 |
+
|
163 |
+
<?php
|
164 |
+
/* translators: %1$s = <strong>, %2$s = </strong> ... %3$s can't be translated - leave */
|
165 |
+
printf(__('Found in Google Analytics account under %1$sCustom Definitions -> Custom Dimensions%2$s (should be named "%1$s%3$s%2$s" and scoped for "%1$sHit%2$s").', 'better-analytics'), '<strong>', '</strong>', 'Author');
|
166 |
+
?>
|
167 |
+
</td>
|
168 |
+
</tr>
|
169 |
+
|
170 |
+
<tr valign="top">
|
171 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('Custom Dimension For Tag Tracking', 'better-analytics'));?></th>
|
172 |
+
<?php
|
173 |
+
echo ($checks['dimensions']['Tags'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
174 |
+
?>
|
175 |
+
<td class="description">
|
176 |
+
<?php
|
177 |
+
/* translators: %1$s = <strong>, %2$s = </strong> ... %3$s can't be translated - leave */
|
178 |
+
printf(__('Found in Google Analytics account under %1$sCustom Definitions -> Custom Dimensions%2$s (should be named "%1$s%3$s%2$s" and scoped for "%1$sHit%2$s").', 'better-analytics'), '<strong>', '</strong>', 'Tags');
|
179 |
+
?>
|
180 |
+
</td>
|
181 |
+
</tr>
|
182 |
+
|
183 |
+
<tr valign="top">
|
184 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('Custom Dimension For User Tracking', 'better-analytics'));?></th>
|
185 |
+
<?php
|
186 |
+
echo ($checks['dimensions']['User'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
187 |
+
?>
|
188 |
+
<td class="description">
|
189 |
+
|
190 |
+
<?php
|
191 |
+
/* translators: %1$s = <strong>, %2$s = </strong> ... %3$s can't be translated - leave */
|
192 |
+
printf(__('Found in Google Analytics account under %1$sCustom Definitions -> Custom Dimensions%2$s (should be named "%1$s%3$s%2$s" and scoped for "%1$sHit%2$s").', 'better-analytics'), '<strong>', '</strong>', 'User');
|
193 |
+
?>
|
194 |
+
</td>
|
195 |
+
</tr>
|
196 |
+
|
197 |
+
<tr valign="top">
|
198 |
+
|
199 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#dimensions', __('Category Tracking Dimension Index Set', 'better-analytics'));?></th>
|
200 |
+
<?php
|
201 |
+
echo ($betterAnalyticsOptions['dimension']['category'] > 0 && @$checks['dimensions']['Categories']['index'] == $betterAnalyticsOptions['dimension']['category'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
202 |
+
?>
|
203 |
+
<td></td>
|
204 |
+
</tr>
|
205 |
+
|
206 |
+
<tr valign="top">
|
207 |
+
|
208 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#dimensions', __('Author Tracking Dimension Index Set', 'better-analytics'));?></th>
|
209 |
+
<?php
|
210 |
+
echo ($betterAnalyticsOptions['dimension']['author'] > 0 && @$checks['dimensions']['Author']['index'] == $betterAnalyticsOptions['dimension']['author'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
211 |
+
?>
|
212 |
+
<td></td>
|
213 |
+
</tr>
|
214 |
+
|
215 |
+
<tr valign="top">
|
216 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#dimensions', __('Tag Tracking Dimension Index Set', 'better-analytics'));?></th>
|
217 |
+
<?php
|
218 |
+
echo ($betterAnalyticsOptions['dimension']['tag'] > 0 && @$checks['dimensions']['Tags']['index'] == $betterAnalyticsOptions['dimension']['tag'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
219 |
+
?>
|
220 |
+
<td></td>
|
221 |
+
</tr>
|
222 |
+
|
223 |
+
<tr valign="top">
|
224 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', menu_page_url('better-analytics', false) . '#top#dimensions', __('Registered User Tracking Dimension Index Set', 'better-analytics'));?></th>
|
225 |
+
<?php
|
226 |
+
echo ($betterAnalyticsOptions['dimension']['user'] > 0 && @$checks['dimensions']['User']['index'] == $betterAnalyticsOptions['dimension']['user'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
227 |
+
?>
|
228 |
+
<td></td>
|
229 |
+
</tr>
|
230 |
+
|
231 |
+
<tr valign="top">
|
232 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', BETTER_ANALYTICS_PRO_PRODUCT_URL . '#utm_source=admin_test&utm_medium=wordpress&utm_campaign=plugin', __('Better Analytics Pro License', 'better-analytics'));?></th>
|
233 |
+
<?php
|
234 |
+
echo ($checks['licensed'] ? '<td class="good">✓</td>' : '<td class="bad">✗</td>');
|
235 |
+
?>
|
236 |
+
<td class="description">
|
237 |
+
<?php _e('A few extra advanced features are available when you license the Better Analytics Pro plugin. Please don\'t steal, a crazy amount of work went into this. Some of the extra features:', 'better-analytics'); ?>
|
238 |
+
<ul>
|
239 |
+
<li>
|
240 |
+
<?php
|
241 |
+
printf(__('More metrics available for %1$sHeat Maps%2$s', 'better_analytics'), '<a href="' . esc_url(menu_page_url('better-analytics_heatmaps', false)) . '" target="_blank">', '</a>');
|
242 |
+
?>
|
243 |
+
</li>
|
244 |
+
<li>
|
245 |
+
<?php
|
246 |
+
printf(__('More dimensions available for %1$sCharts%2$s', 'better_analytics'), '<a href="' . esc_url(menu_page_url('better-analytics_areacharts', false)) . '" target="_blank">', '</a>');
|
247 |
+
?>
|
248 |
+
</li>
|
249 |
+
<li>
|
250 |
+
<?php
|
251 |
+
printf(__('More %1$sadvertising platform click tracking%2$s', 'better_analytics'), '<a href="' . esc_url(menu_page_url('better-analytics', false) . '#top#advertising') . '" target="_blank">', '</a>');
|
252 |
+
?>
|
253 |
+
</li>
|
254 |
+
<li>
|
255 |
+
<?php
|
256 |
+
printf(__('More %1$sissue monitoring options%2$s', 'better_analytics'), '<a href="' . esc_url(menu_page_url('better-analytics', false) . '#top#monitor') . '" target="_blank">', '</a>');
|
257 |
+
?>
|
258 |
+
</li>
|
259 |
+
<li>
|
260 |
+
<?php
|
261 |
+
printf(__('%1$seCommerce tracking%2$s', 'better_analytics'), '<a href="' . esc_url(menu_page_url('better-analytics', false) . '#top#ecommerce') . '" target="_blank">', '</a>');
|
262 |
+
?>
|
263 |
+
</li>
|
264 |
+
<li>
|
265 |
+
<?php
|
266 |
+
printf(__('Ability to do %1$sserver-side tracking of users%2$s', 'better_analytics'), '<a href="' . esc_url(menu_page_url('better-analytics', false) . '#top#advanced') . '" target="_blank">', '</a>');
|
267 |
+
?>
|
268 |
+
</li>
|
269 |
+
<li>
|
270 |
+
<?php
|
271 |
+
_e('Faster API calls (utilizes a multi-threaded mechanism)', 'better_analytics');
|
272 |
+
?>
|
273 |
+
</li>
|
274 |
+
<li>
|
275 |
+
<?php
|
276 |
+
printf(__('%1$sPriority support%2$s', 'better_analytics'), '<a href="' . esc_url(BETTER_ANALYTICS_SUPPORT_URL . '#utm_source=admin_test&utm_medium=wordpress&utm_campaign=plugin') . '" target="_blank">', '</a>');
|
277 |
+
?>
|
278 |
+
</li>
|
279 |
+
<li>
|
280 |
+
<?php
|
281 |
+
_e('A Warm & Fuzzy Feeling knowing you are helping to continue future development', 'better_analytics');
|
282 |
+
?>
|
283 |
+
</li>
|
284 |
+
|
285 |
+
|
286 |
+
</ul>
|
287 |
+
</td>
|
288 |
+
</tr>
|
289 |
+
|
290 |
+
|
291 |
+
|
292 |
+
|
293 |
+
|
294 |
+
<tr><td colspan="3"><h3><?php esc_html_e( 'Things That Need To Be Checked Manually' , 'better-analytics');?></h3></td></tr>
|
295 |
+
|
296 |
+
<tr valign="top">
|
297 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('User-ID Tracking', 'better-analytics'));?></th>
|
298 |
+
<td class="good"> </td>
|
299 |
+
<td class="description">
|
300 |
+
<?php printf(__('Found in Google Analytics account under %1$sTracking Info -> User-ID%2$s.', 'better-analytics'), '<strong>', '</strong>');?>
|
301 |
+
</td>
|
302 |
+
</tr>
|
303 |
+
|
304 |
+
<tr valign="top">
|
305 |
+
<th scope="row"><?php printf('<a href="%1$s" target="_blank">%2$s</a>:', 'https://www.google.com/analytics/web/?#management/Settings/', __('Demographic and Interest Reports', 'better-analytics'));?></th>
|
306 |
+
<td class="good"> </td>
|
307 |
+
<td class="description">
|
308 |
+
<?php printf(__('Found in Google Analytics account under %1$sProperty Settings%1$s.', 'better-analytics'), '<strong>', '</strong>');?>
|
309 |
+
</td>
|
310 |
+
</tr>
|
311 |
+
|
312 |
+
|
313 |
+
</table>
|
314 |
+
</div>
|
library/DigitalPointBetterAnalytics/Widget/PopularPosts.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package BetterAnalytics
|
4 |
+
*/
|
5 |
+
class DigitalPointBetterAnalytics_Widget_PopularPosts extends WP_Widget {
|
6 |
+
|
7 |
+
function __construct()
|
8 |
+
{
|
9 |
+
parent::__construct(
|
10 |
+
'better-analytics_popular_widget',
|
11 |
+
__( 'Better Analytics' , 'better-analytics'),
|
12 |
+
array( 'description' => __( 'Display the most popular content right now.' , 'better-analytics') )
|
13 |
+
);
|
14 |
+
|
15 |
+
if ( is_active_widget( false, false, $this->id_base ) ) {
|
16 |
+
add_action( 'wp_head', array( $this, 'css' ) );
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
function css() {
|
21 |
+
?>
|
22 |
+
|
23 |
+
<style type="text/css">
|
24 |
+
.widget_better_analytics_popular_widget li {
|
25 |
+
overflow: hidden;
|
26 |
+
text-overflow: ellipsis;
|
27 |
+
}
|
28 |
+
|
29 |
+
.widget_better_analytics_popular_widget li a {
|
30 |
+
white-space: nowrap;
|
31 |
+
}
|
32 |
+
</style>
|
33 |
+
|
34 |
+
<?php
|
35 |
+
}
|
36 |
+
|
37 |
+
function form( $instance )
|
38 |
+
{
|
39 |
+
$title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : esc_attr('Popular Right Now', 'better-analytics');
|
40 |
+
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
|
41 |
+
|
42 |
+
$betterAnalyticsOptions = get_option('better_analytics');
|
43 |
+
|
44 |
+
if (!get_option('ba_tokens') || !$betterAnalyticsOptions['api']['profile'])
|
45 |
+
{
|
46 |
+
echo '<p>' . sprintf(__('No Linked Google Analytics Account (API access required for this widget). You can link one in the %1$sBetter Analytics API settings%2$s.', 'better-analytics'), '<a href="' . esc_url(menu_page_url('better-analytics', false) . '#top#api') . '">', '</a>') . '</p>';
|
47 |
+
}
|
48 |
+
|
49 |
+
?>
|
50 |
+
|
51 |
+
<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' ); ?></label>
|
52 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></p>
|
53 |
+
|
54 |
+
<p><label for="<?php echo $this->get_field_id('number'); ?>"><?php esc_html_e( 'Number of URLs to show:', 'better-analytics' ); ?></label>
|
55 |
+
<input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="text" value="<?php echo $number; ?>" size="3" /></p>
|
56 |
+
|
57 |
+
<?php
|
58 |
+
}
|
59 |
+
|
60 |
+
function update( $new_instance, $old_instance )
|
61 |
+
{
|
62 |
+
$instance['title'] = strip_tags($new_instance['title']);
|
63 |
+
$instance['number'] = absint( $new_instance['number'] );
|
64 |
+
return $instance;
|
65 |
+
}
|
66 |
+
|
67 |
+
function widget($args, $instance)
|
68 |
+
{
|
69 |
+
$realTime = get_transient('ba_realtime');
|
70 |
+
|
71 |
+
if (!empty($realTime['page_path']))
|
72 |
+
{
|
73 |
+
$numberToShow = (empty($instance['number']) ? 5 : absint($instance['number']));
|
74 |
+
|
75 |
+
$pagesOutput = array();
|
76 |
+
foreach ($realTime['page_path'] as $page => $count)
|
77 |
+
{
|
78 |
+
if (substr($page, 0, 1) == '/' && strlen($page) > 1 && strpos($page, '/wp-admin/') === false)
|
79 |
+
{
|
80 |
+
$pagesOutput[] = $page;
|
81 |
+
if (count($pagesOutput) >= $numberToShow)
|
82 |
+
{
|
83 |
+
break;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
if (count($pagesOutput) > 0)
|
89 |
+
{
|
90 |
+
echo $args['before_widget'];
|
91 |
+
if (!empty($instance['title']))
|
92 |
+
{
|
93 |
+
echo $args['before_title'];
|
94 |
+
echo esc_html( $instance['title'] );
|
95 |
+
echo $args['after_title'];
|
96 |
+
}
|
97 |
+
|
98 |
+
echo '<ul>';
|
99 |
+
|
100 |
+
foreach ($pagesOutput as $page)
|
101 |
+
{
|
102 |
+
$url = htmlspecialchars($page);
|
103 |
+
echo '<li><a href="' . $url . '">' . $url . '</a></li>';
|
104 |
+
}
|
105 |
+
|
106 |
+
echo '</ul>';
|
107 |
+
echo $args['after_widget'];
|
108 |
+
|
109 |
+
}
|
110 |
+
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
static function register_widget()
|
116 |
+
{
|
117 |
+
register_widget(__CLASS__);
|
118 |
+
}
|
119 |
+
}
|
readme.txt
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Better Analytics ===
|
2 |
+
Contributors: digitalpoint
|
3 |
+
Tags: analytics, google analytics, statistics, tracking, reports, charts, api, stats, youtube, outbrain, taboola, adsense, google, digitalpoint
|
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.0
|
8 |
+
License: GPLv2
|
9 |
+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Adds Google Analytics code to your site. Ability to track basically everything (down to links being clicked and YouTube videos being watched).
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
The Better Analytics plugin allows you to easily add Google Universal Analytics code to your website and gives you the power to track virtually everything. Includes heat maps, reports, charts, events and site issue tracking in your WordPress admin area.
|
15 |
+
|
16 |
+
<strong>Basic Tracking Features (each can be enabled/disabled):</strong>
|
17 |
+
|
18 |
+
* Link Attribution
|
19 |
+
* User-ID/Session Unification
|
20 |
+
* User Engagement
|
21 |
+
* Comment Creation
|
22 |
+
* User Registration
|
23 |
+
* YouTube Video Engagement
|
24 |
+
* Emails Sent/Opened
|
25 |
+
* External Link Clicks
|
26 |
+
* File Downloads
|
27 |
+
* Anonymize IPs
|
28 |
+
* Demographic & Interest
|
29 |
+
* Force Traffic Over SSL
|
30 |
+
* RSS/Email Link Source Tracking
|
31 |
+
* Advertising Ad Clicks
|
32 |
+
* Page Not Found (404)
|
33 |
+
* AJAX Requests
|
34 |
+
|
35 |
+
<strong>Dimension Tracking:</strong>
|
36 |
+
|
37 |
+
* Categories
|
38 |
+
* Author
|
39 |
+
* Tags
|
40 |
+
* User
|
41 |
+
|
42 |
+
<strong>Social Button Engagement Tracking:</strong>
|
43 |
+
|
44 |
+
* Facebook
|
45 |
+
* Twitter
|
46 |
+
* Google+
|
47 |
+
* Pinterest
|
48 |
+
* LinkedIn
|
49 |
+
|
50 |
+
<strong>Reporting Features:</strong>
|
51 |
+
|
52 |
+
* Dashboard Charts (realtime or historical)
|
53 |
+
* Weekly Heat Maps
|
54 |
+
* Historical Area Percent Charts
|
55 |
+
* Events
|
56 |
+
* Issue Monitoring
|
57 |
+
|
58 |
+
<strong>Advanced Features:</strong>
|
59 |
+
|
60 |
+
* Suppress Tracking By User Role
|
61 |
+
* View Reports By User Role
|
62 |
+
* Adjust Location Of Analytics Code
|
63 |
+
* Campaign Tracking By Anchor or Parameters
|
64 |
+
* Adjustable Sample Rate
|
65 |
+
* Insert Your Own Custom JavaScript
|
66 |
+
* Debugging Mode
|
67 |
+
|
68 |
+
<strong>Widgets Included:</strong>
|
69 |
+
|
70 |
+
* Popular Posts
|
71 |
+
|
72 |
+
> <strong>Better Analytics Pro</strong><br>
|
73 |
+
> If you would like additional advanced functions, we offer a Pro version.
|
74 |
+
>
|
75 |
+
> * Additional ad networks for ad click tracking
|
76 |
+
> * More options for site issue monitoring
|
77 |
+
> * More heat map metrics
|
78 |
+
> * More charting dimensions
|
79 |
+
> * eCommerce tracking (coming soon)
|
80 |
+
> * Option for server-side tracking of users (or bots)
|
81 |
+
> * Faster API calls (uses a custom system for parallel requests)
|
82 |
+
> * Priority support
|
83 |
+
>
|
84 |
+
> [Pro license available here](https://marketplace.digitalpoint.com/better-analytics-pro.3355/item#utm_source=readme&utm_medium=wordpress&utm_campaign=plugin)
|
85 |
+
|
86 |
+
== Installation ==
|
87 |
+
1. Upload `better-analytics` folder to the `/wp-content/plugins/` directory.
|
88 |
+
1. Activate the plugin through the 'Plugins' menu in the WordPress admin area.
|
89 |
+
1. Add your Web Property ID under the 'Settings -> Better Analytics' area of the WordPress admin.
|
90 |
+
1. Optional (but probably a good idea so you don't double report your traffic) - disable any other Analytics code you have enabled.
|
91 |
+
|
92 |
+
== Frequently Asked Questions ==
|
93 |
+
= Can This Be Used With The Legacy Google Analytics Code? =
|
94 |
+
No, this plugin is for Google Universal Analytics. You can upgrade any old non-Universal property to support both legacy and Universal under your [Google Analytics Property Settings](https://www.google.com/analytics/web/?#management/Settings/).
|
95 |
+
|
96 |
+
= Can You Add [insert feature here]? =
|
97 |
+
If it's possible and it makes sense, then yes. The best way to put in a request would be to create a thread in the [support forum over here](https://forums.digitalpoint.com/forums/better-analytics.31/#utm_source=readme&utm_medium=wordpress&utm_campaign=plugin).
|
98 |
+
|
99 |
+
= I speak a language that isn't supported by this plugin, can I help translate it? =
|
100 |
+
Yes. Unfortunately we don't speak every language in the world, so if you would like to contribute a translation, please contact us in the [support forum over here](https://forums.digitalpoint.com/forums/better-analytics.31/#utm_source=readme&utm_medium=wordpress&utm_campaign=plugin). If you are new to translating WordPress plugins, you might want to check out the free [Poedit](http://poedit.net/) program.
|
101 |
+
|
102 |
+
== CDN ==
|
103 |
+
|
104 |
+
The JavaScript used by this plugin should be able to be cached properly by content delivery networks (it has been tested with CloudFlare). This means if your site uses CloudFlare, the JavaScript code will be cached in their data centers and delivered to end users via the closest data center.
|
105 |
+
|
106 |
+
== Thanks ==
|
107 |
+
|
108 |
+
Thank you to all the individuals who have contributed translations:
|
109 |
+
|
110 |
+
* Indonesian: [Arick](http://www.developingwp.com/#utm_source=readme&utm_medium=wordpress&utm_campaign=plugin)
|
111 |
+
|
112 |
+
== Screenshots ==
|
113 |
+
|
114 |
+
1. Dashboard in realtime mode.
|
115 |
+
2. Dashboard showing page views by normalized categories for the last month.
|
116 |
+
3. Dashboard showing organic search traffic by country for the last 3 months.
|
117 |
+
4. Dashboard showing sessions by date for the last 3 months.
|
118 |
+
5. One of ~1,000 metric/segment combinations for weekly heat maps (showing all sessions for the last 4 weeks).
|
119 |
+
6. Stacked area percent charts allow you to see historical changes (browser usage for the last 10 years shows the rise of Chrome and the fall of Internet Explorer).
|
120 |
+
7. Event report shows things like external links being clicked, YouTube video engagement, comments being created, etc. You are able to correlate that data against any other metrics you wish. For example maybe you wanted to see what countries users are in that watch YouTube videos.
|
121 |
+
8. Issue monitoring report alerts to you client-side issues with your site. Things like invalid pages being accessed (404), JavaScript errors, images not loading, embedded YouTube videos that the author removed, etc.
|
122 |
+
9. An automated system that is able to check your Google Analytics account and helps you configure your Google Analytics web property settings properly is included.
|
123 |
+
10. Includes an optional front-end widget that shows popular pages/posts being viewed right now.
|
124 |
+
11. General settings.
|
125 |
+
12. Custom dimension tracking allows you to track categories, authors, tags and registered users.
|
126 |
+
13. Social button engagement allows you to track things like Likes/Unlikes/Tweets/Shares.
|
127 |
+
14. Track clicks on the ads on your site.
|
128 |
+
15. Issue monitoring settings allow you to keep on top of client-side issues with your site.
|
129 |
+
16. Advanced settings allow you to fine tune how the system works.
|
130 |
+
|
131 |
+
== Changelog ==
|
132 |
+
= 1.0.1 =
|
133 |
+
* Translation: Indonesian
|
134 |
+
|
135 |
+
= 1.0.0 =
|
136 |
+
* Initial release
|