Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
- <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
- <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
- <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title> Sonera Dashboard - Google DoubleClick & Snoobi data </title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="css/bootstrap.css">
- <link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin-ext' rel='stylesheet' type='text/css'>
- <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
- <link rel="stylesheet" href="css/main.css">
- <script src="js/vendor/jquery-1.11.0.min.js"> </script>
- <script src="amcharts/amcharts.js"></script>
- <script src="amcharts/lang/fi.js"></script>
- <script src="amcharts/pie.js" type="text/javascript"></script>
- <script src="amcharts/funnel.js" type="text/javascript"></script>
- <script src="amcharts/serial.js" type="text/javascript"></script>
- <script src="js/vendor/bootstrap.js" type="text/javascript"></script>
- <script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
- </head>
- <body>
- <header>
- <div class="col-md-6 col-sm-4">
- <a href="http://www.sonera.fi" target="_blank">
- <img src="img/soneralogo.jpg" alt="Sonera" />
- </a>
- </div>
- <div class="col-md-5 col-md-offset-1">
- <div class="row">
- <a class="nvgmain" href="index.html"> Gdc</a>
- <a class="nvgmain mainactive" href="snoobi.html"> Snoobi</a>
- </div>
- </div>
- <div clas="clearfix"> </div>
- </header>
- <section> <br/>
- <h1> Google Double Click</h1>
- <h2> Yleiskatsaus<h2>
- <div class="row viiva">
- <div class="col-md-6">
- <div class="row" class="margin-left: 0; margin-right: 0;">
- <div class="col-md-5 nosto nosto1">
- <p> CTR <br/> <span> 0,75% </span> </p>
- </div>
- <div class="col-md-5 nosto nosto2">
- <p> Kampanjaa jäljellä <br/> <span> 17 päivää </span> </p>
- </div>
- </div>
- </div>
- <div class="col-md-6">
- <div class="row" class="margin: 0;" >
- <div class="col-md-5 nosto nosto3">
- <p> Näyttöjä jäljellä <br/> <span> 748 920 </span> </p>
- </div>
- <div class="col-md-5 nosto nosto4">
- <p> Korkein CTR <br/> <span> OKL6: 0.82% </span> </p>
- </div>
- </div>
- </div>
- </div>
- </section>
- <section class="seccont gdc3">
- <div class="row">
- <div class="col-md-6"> <br/>
- <h2>Snoobi Customer Funnel</h2>
- <div id="chartdivFunnel" style="width: 500px; height: 260px; "></div>
- </div>
- <div class="col-md-6">
- <div id="chartdiv2" style="width:500px; height:400px;"> </div>
- </div>
- </div>
- <script type="text/javascript">
- var chartFunnel;
- var dataFunnel = [
- {
- "title": "Banner Clicks",
- "value": 286,
- "urli": "#hashtag1"
- },
- {
- "title": "Not bounce",
- "value": 123,
- "urli": "#hashtag2"
- },
- {
- "title": "E-Commerce",
- "value": 48,
- "urli": "#hashtag3"
- },
- {
- "title": "Purchased",
- "value": 18,
- "urli": "#hashtag4"
- }
- ];
- $("path").each(function(idx,el){
- $(el).attr("index",idx);
- })
- AmCharts.ready(function () {
- chartFunnel = new AmCharts.AmFunnelChart();
- chartFunnel.colors = ["#341645", "#7b5596", "#a688b7", "#ac939e", "#715464", "#000000"];
- chartFunnel.titleField = "title";
- chartFunnel.balloon.cornerRadius = 0;
- chartFunnel.marginRight = 220;
- chartFunnel.marginLeft = 25;
- chartFunnel.labelPosition = "right";
- chartFunnel.funnelAlpha = 0.9;
- chartFunnel.valueField = "value";
- chartFunnel.dataProvider = dataFunnel;
- chartFunnel.startX = 0;
- chartFunnel.balloon.animationTime = 0.2;
- chartFunnel.neckWidth = "40%"; // default: "40%"
- chartFunnel.startAlpha = 0;
- chartFunnel.neckHeight = "50%"; // default: "30%"
- chartFunnel.balloonText = "[[title]]:<b>[[value]]</b>";
- chartFunnel.pullOutOnlyOne = true;
- chartFunnel.urlField = "urli";
- chartFunnel.marginTop = 70;
- chartFunnel.marginBottom = 0;
- chartFunnel.creditsPosition = "top-right";
- chartFunnel.write("chartdivFunnel");
- // Vaihtaa barchartin contenttia hashin mukaan (määritä hash jsoniin urli-valueen)
- /*
- $(window).on('hashchange', function() {
- if (location.hash === "#hashtag1") {
- console.log("Hash1 Content")
- } else if (location.hash === "#hashtag2"){
- console.log("Hash2 Content")
- //chartok1.dataProvider = chartDataImp;
- //validateNow();
- } else if (location.hash === "#hashtag3"){
- console.log("Hash3 Content")
- } else if (location.hash === "#hashtag4"){
- console.log("Hash4 Content")
- } else {
- console.log("");
- }
- });
- */
- // Vaihtaa barchartin datasetin defaultiksi kun clickataan slice epäaktiiviseksi
- });
- </script>
- <script type="text/javascript">
- var chartokl1;
- var chartDataDefault = [
- {
- "country": "OKL1",
- "visits": 4025
- },
- {
- "country": "OKL2",
- "visits": 1882
- },
- {
- "country": "OKL3",
- "visits": 1809
- },
- {
- "country": "OKL4",
- "visits": 1322
- },
- {
- "country": "OKL5",
- "visits": 1122
- },
- {
- "country": "OKL6",
- "visits": 1114
- },
- {
- "country": "OKL7",
- "visits": 1114
- },
- {
- "country": "OKL8",
- "visits": 984,
- }
- ];
- var chartDataBanner = [
- {
- "country": "OKL1",
- "visits": 4025
- },
- {
- "country": "OKL2",
- "visits": 1882
- },
- {
- "country": "OKL3",
- "visits": 1809
- },
- {
- "country": "OKL4",
- "visits": 1322
- },
- {
- "country": "OKL5",
- "visits": 8122
- },
- {
- "country": "OKL6",
- "visits": 6114
- },
- {
- "country": "OKL7",
- "visits": 6114
- },
- {
- "country": "OKL8",
- "visits": 6984,
- }
- ];
- var chartDataNotBounce = [
- {
- "country": "OKL1",
- "visits": 101
- },
- {
- "country": "OKL2",
- "visits": 101
- },
- {
- "country": "OKL3",
- "visits": 101
- },
- {
- "country": "OKL4",
- "visits": 51
- },
- {
- "country": "OKL5",
- "visits": 151
- },
- {
- "country": "OKL6",
- "visits": 201
- },
- {
- "country": "OKL7",
- "visits": 5
- },
- {
- "country": "OKL8",
- "visits": 96,
- }
- ];
- var chartDataEcommerce = [
- {
- "country": "OKL1",
- "visits": 11
- },
- {
- "country": "OKL2",
- "visits": 501
- },
- {
- "country": "OKL3",
- "visits": 101
- },
- {
- "country": "OKL4",
- "visits": 51
- },
- {
- "country": "OKL5",
- "visits": 551
- },
- {
- "country": "OKL6",
- "visits": 201
- },
- {
- "country": "OKL7",
- "visits": 5
- },
- {
- "country": "OKL8",
- "visits": 36,
- }
- ];
- var chartDataPurchase = [
- {
- "country": "OKL1",
- "visits": 234
- },
- {
- "country": "OKL2",
- "visits": 423
- },
- {
- "country": "OKL3",
- "visits": 21
- },
- {
- "country": "OKL4",
- "visits": 51
- },
- {
- "country": "OKL5",
- "visits": 551
- },
- {
- "country": "OKL6",
- "visits": 432
- },
- {
- "country": "OKL7",
- "visits": 88
- },
- {
- "country": "OKL8",
- "visits": 36,
- }
- ];
- AmCharts.ready(function () {
- // SERIAL CHART
- chartokl1 = new AmCharts.AmSerialChart();
- chartokl1.dataProvider = chartDataBanner;
- chartokl1.categoryField = "country";
- chartokl1.startDuration = 0.5;
- chartokl1.columnWidth = 0.8;
- chartokl1.colors = ["#652d86", "#000000"];
- // AXES
- // category
- var categoryAxis = chartokl1.categoryAxis;
- categoryAxis.labelRotation = 90;
- categoryAxis.gridPosition = "start";
- // value
- // in case you don't want to change default settings of value axis,
- // you don't need to create it, as one value axis is created automatically.
- // GRAPH
- var graph = new AmCharts.AmGraph();
- graph.valueField = "visits";
- graph.balloonText = "[[category]]: <b>[[value]]</b>";
- graph.type = "column";
- graph.lineAlpha = 0;
- graph.fillAlphas = 0.8;
- chartokl1.addGraph(graph);
- chartokl1.creditsPosition = "top-right";
- chartokl1.write("chartdiv2");
- var charts = {
- "BannerClicks": chartDataBanner,
- "Notbounce": chartDataNotBounce,
- "E-Commerce": chartDataEcommerce,
- "Purchased":chartDataPurchase
- };
- chartFunnel.addListener("pullOutSlice", function(event){
- var provider = charts[event.dataItem.title.replace(/ /g,'')]
- changeDataProvider(chartokl1, provider);
- });
- chartFunnel.addListener("pullInSlice", function(event){
- changeDataProvider(chartokl1, chartDataDefault);
- });
- function changeDataProvider(chart, provider) {
- chart.dataProvider = provider;
- chart.validateData();
- chart.animateAgain();
- }
- });
- /*
- var clicked1 = false;
- var clicked2 = false;
- var clicked3 = false;
- $('#chartdivFunnel').on('click', function(event) {
- if ($(event.target).attr('index') == "1") {
- clicked1 =! clicked1;
- console.log("arvo:",clicked1);
- if (clicked1) {
- console.log("oikea")
- chartokl1.dataProvider = chartData;
- chartokl1.validateData();
- chartokl1.animateAgain();
- } else {
- console.log("default")
- chartokl1.dataProvider = chartDataClc2;
- chartokl1.validateData();
- chartokl1.animateAgain();
- }
- } else if ($(event.target).attr('index') == "3") {
- clicked2 =! clicked2;
- if (clicked2) {
- chartokl1.dataProvider = chartDataImp;
- chartokl1.validateData();
- chartokl1.animateAgain();
- } else {
- console.log("default")
- chartokl1.dataProvider = chartDataClc2;
- chartokl1.validateData();
- chartokl1.animateAgain();
- }
- } else if ($(event.target).attr('index') == "5") {
- clicked3 =! clicked3;
- console.log("asd5"); if (clicked2){
- chartokl1.dataProvider = chartDataClc;
- chartokl1.validateData();
- chartokl1.animateAgain();
- }else {
- console.log("default")
- chartokl1.dataProvider = chartDataClc2;
- chartokl1.validateData();
- chartokl1.animateAgain();
- }
- } else {
- chartokl1.dataProvider = chartData;
- chartokl1.validateData();
- }
- })
- */
- </script>
- </section>
- <footer>
- <a href="http://www.fonectaenterprise.fi" target="_blank"> <img src="img/feslogo.jpg" alt="Fonecta Enterprise Solutions" /> </a>
- </footer>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement