Google アナリティクスの統計
jQuery.post("https://www.brabianca.com/wp-admin/admin-ajax.php", {action: "gadash_get_frontendwidget_data",gadash_number: "1",gadash_optionname: "widget_gadash_frontend_widget"}, function(response){ if (!jQuery.isNumeric(response) && jQuery.isArray(response)){ if (jQuery("#gadwp-widgetchart")[0]){ gadash_widgetsessions=response[0]; google.setOnLoadCallback(ga_dash_drawfwidgetsessions(gadash_widgetsessions)); } if (jQuery("#gadwp-widgettotals")[0]){ ga_dash_drawtotalsstats(response[1]); } }else{ jQuery("#gadwp-widgetchart").css({"background-color":"#F7F7F7","height":"auto","padding-top":"50px","padding-bottom":"50px","color":"#000","text-align":"center"}); jQuery("#gadwp-widgetchart").html("このレポートは使用できません。 ("+response+")"); } });google.load("visualization", "1", {packages:["corechart"]}); function ga_dash_drawfwidgetsessions(response) { var data = google.visualization.arrayToDataTable(response); var options = { legend: {position: "none"}, pointSize: 3,colors:['#1e73be','#00408b'], title: "セッション", titlePosition: "in", chartArea: {width: "95%",height:"75%"}, hAxis: { textPosition: "none"}, vAxis: { textPosition: "none", minValue: 0, gridlines: {color: "transparent"}, baselineColor: "transparent"} } var chart = new google.visualization.AreaChart(document.getElementById("gadwp-widgetchart"));
chart.draw(data, options); } function ga_dash_drawtotalsstats(response) { if (response == null){ response = 0; } jQuery("#gadwp-widgettotals").html("
");
}generated by GADWP