Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <link href="https://cdn.webdatarocks.com/latest/webdatarocks.min.css" rel="stylesheet" />
<script src="https://cdn.webdatarocks.com/latest/webdatarocks.toolbar.min.js"></script>
<script src="https://cdn.webdatarocks.com/latest/webdatarocks.js"></script>
<script src="https://cdn.webdatarocks.com/latest/webdatarocks.googlecharts.js"></script>
<script src="https://www.gstatic.com/charts/loader.js"></script>

<main>

  <table>
    <tr>
      <td>
        <div id="wdr-component" style="height:400px;"></div>
      </td>
      <td style="width: 600px;">
        <div id="googlechart-container1" style="height:400px;"></div>
      </td>
    </tr>
    <tr>
      <td style="width: 600px;">
        <div id="googlechart-container2" style="height:400px;"></div>
      </td>

      <td style="width: 650px;">
        <div id="googlechart-container3" style="height:400px;"></div>
      </td>
    </tr>
    <tr>
      <td style="width: 650px;">
        <div id="googlechart-container4" style="height:400px;"></div>
      </td>
      <td style="width: 650px;">
        <div id="googlechart-container5" style="height:400px;"></div>
      </td>
    </tr>
    <tr>
      <td style="width: 650px;">
        <div id="googlechart-container6" style="height:400px;"></div>
      </td>
      <td style="width: 650px;">
        <div id="googlechart-container7" style="height:400px;"></div>
      </td>
    </tr>
    <tr>
      <td style="width: 650px;">
        <div id="googlechart-container8" style="height:400px;"></div>
      </td>
      <td style="width: 650px;">
        <div id="googlechart-container9" style="height:400px;"></div>
      </td>
    </tr>
  </table>
</main>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Poppins");

body {
  font-family: "Poppins", Roboto;
  font-size: 18px;
  background: #ededed;
}

main {
  width: 1000px;
  margin: 10px auto;
  padding: 10px 20px 30px;
  background: #fff;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

h1,
h3 {
  text-align: center;
}

              
            
!

JS

              
                var pivot = new WebDataRocks({
  container: "wdr-component",
  width: 565,
  height: 440,
  toolbar: false,
  report: {
    dataSource: {
      dataSourceType: "json",
      data: getData()
    },
    slice: {
      reportFilters: [
        {
          uniqueName: "Date.Month"
        }
      ],
      rows: [
        {
          uniqueName: "Channel"
        },
        {
          uniqueName: "Campaign"
        }
      ],
      columns: [
        {
          uniqueName: "Measures"
        }
      ],
      measures: [
        {
          uniqueName: "Users",
          aggregation: "sum",
          active: false
        },
        {
          uniqueName: "Leads",
          aggregation: "sum",
          active: false
        },
        {
          uniqueName: "Opportunities",
          aggregation: "sum",
          active: false
        },
        {
          uniqueName: "Sales",
          aggregation: "sum",
          active: false
        },
        {
          uniqueName: "Campaign Cost",
          aggregation: "sum"
        },
        {
          uniqueName: "Revenue",
          formula: 'sum("Sales") * sum("Purchase Cost")',
          caption: "Revenue",
          individual: true
        },
        {
          uniqueName: "Gross Profit",
          formula: 'sum("Revenue") - sum("Campaign Cost")',
          caption: "Gross Profit",
          individual: true
        },
        {
          uniqueName: "ROI",
          formula:
            '(sum("Gross Profit") - sum("Campaign Cost")) / sum("Campaign Cost")',
          caption: "ROI",
          format: "roi_format",
          active: false
        },
        {
          uniqueName: "Conversion Rate",
          formula: 'sum("Leads") / sum("Clicks") ',
          individual: true,
          caption: "Conversion Rate",
          active: false
        },
        {
          uniqueName: "CPL",
          formula: 'sum("Campaign Cost") / sum("Leads") ',
          caption: "CPL",
          active: false
        },
        {
          uniqueName: "CPO",
          formula: 'sum("Campaign Cost") / sum("Opportunities") ',
          caption: "CPO",
          active: false
        },
        {
          uniqueName: "CPS",
          formula: 'sum("Campaign Cost") / sum("Sales") ',
          caption: "CPS",
          active: false
        }
      ],
      expands: {
        rows: [
          {
            tuple: ["Channel.Display Ads"]
          },
          {
            tuple: ["Channel.SEM"]
          },
          {
            tuple: ["Channel.Social"]
          }
        ]
      }
    },
    options: {
      grid: {
        type: "classic"
      }
    },
    formats: [
      {
        name: "",
        maxDecimalPlaces: 2
      },
      {
        name: "roi_format",
        thousandsSeparator: " ",
        decimalSeparator: ".",
        currencySymbol: "%",
        currencySymbolAlign: "right",
        nullValue: "",
        textAlign: "right",
        isPercent: false
      }
    ]
  },
  reportcomplete: function () {
    pivot.off("reportcomplete");
    pivotTableReportComplete = true;
    createGoogleChart1();
    createGoogleChart2();
    createGoogleChart3();
    createGoogleChart4();
    createGoogleChart5();
    createGoogleChart6();
    createGoogleChart7();
    createGoogleChart8();
    createGoogleChart9();
  }
});

var pivotTableReportComplete = false;
var googleChartsLoaded = false;

google.charts.load("current", {
  packages: ["corechart"]
});
google.charts.setOnLoadCallback(onGoogleChartsLoaded);

function onGoogleChartsLoaded() {
  googleChartsLoaded = true;
  if (pivotTableReportComplete) {
    createGoogleChart1();
    createGoogleChart2();
    createGoogleChart3();
    createGoogleChart4();
    createGoogleChart5();
    createGoogleChart6();
    createGoogleChart7();
    createGoogleChart8();
    createGoogleChart9();
  }
}

function createGoogleChart1() {
  if (googleChartsLoaded) {
    pivot.googlecharts.getData(
      {
        type: "column",
        slice: {
          rows: [
            {
              uniqueName: "Measures"
            }
          ],
          columns: [
            {
              uniqueName: "Campaign"
            },
            {
              uniqueName: "Channel"
            }
          ],
          measures: [
            {
              uniqueName: "Revenue",
              formula: 'sum("Sales") * sum("Purchase Cost")',
              caption: "Revenue",
              individual: true
            }
          ]
        }
      },
      drawChart1,
      drawChart1
    );
  }
}

function drawChart1(_data) {
  var data = google.visualization.arrayToDataTable(_data.data);
  var options = {
    tooltip: {
      textStyle: {
        color: "#5D353E"
      },
      showColorCode: true
    },
    titleTextStyle: {
      fontName: "Tahoma",
      bold: true,
      color: "#5D353E",
      fontSize: 18
    },

    fontSize: 9,
    title: "Main Revenue Drivers among Campaigns",
    colors: ["#423c6d", "#5D353E", "#26827E"],
    legend: "bottom",
    isStacked: true
  };
  var chart = new google.visualization.ColumnChart(
    document.getElementById("googlechart-container1")
  );
  chart.draw(data, options);
}

function createGoogleChart2() {
  if (googleChartsLoaded) {
    pivot.googlecharts.getData(
      {
        type: "column",
        slice: {
          rows: [
            {
              uniqueName: "Campaign",
              filter: {
                members: [
                  "Campaign.Twitter",
                  "Campaign.Facebook",
                  "Campaign.LinkedIn",
                  "Campaign.Instagram"
                ]
              }
            }
          ],
          columns: [
            {
              uniqueName: "Measures"
            }
          ],
          measures: [
            {
              uniqueName: "Bounce Rate",
              aggregation: "average"
            }
          ]
        }
      },
      drawChart2,
      drawChart2
    );
  }
}

function drawChart2(_data) {
  var data = google.visualization.arrayToDataTable(_data.data);
  var options = {
    tooltip: {
      textStyle: {
        color: "#024B40"
      },
      showColorCode: true
    },
    titleTextStyle: {
      fontName: "Tahoma",
      bold: true,
      color: "#024B40"
    },
    fontSize: 18,
    title: "Bounce Rate of Social Media Campaigns",
    colors: ["#a63936", "#26827E"],
    legend: "bottom",
    isStacked: true
  };
  var chart = new google.visualization.ColumnChart(
    document.getElementById("googlechart-container2")
  );
  chart.draw(data, options);
}

function createGoogleChart3() {
  if (googleChartsLoaded) {
    pivot.googlecharts.getData(
      {
        type: "column",
        slice: {
          rows: [
            {
              uniqueName: "Campaign",
              filter: {
                members: [
                  "Campaign.Twitter",
                  "Campaign.Facebook",
                  "Campaign.LinkedIn",
                  "Campaign.Instagram"
                ]
              }
            }
          ],
          columns: [
            {
              uniqueName: "Measures"
            }
          ],
          measures: [
            {
              uniqueName: "Total Leads",
              formula: 'sum("Leads")',
              caption: "Total Leads"
            }
          ]
        }
      },
      drawChart3,
      drawChart3
    );
  }
}

function drawChart3(_data) {
  var data = google.visualization.arrayToDataTable(_data.data);
  var options = {
    tooltip: {
      textStyle: {
        color: "#024B40"
      },
      showColorCode: true
    },
    titleTextStyle: {
      fontName: "Tahoma",
      bold: true,
      color: "#5D353E"
    },
    fontSize: 18,
    title: "Leads of Social Media Campaigns",
    legend: "bottom",
    colors: ["#c9df8a", "#26827E"]
  };
  var chart = new google.visualization.ColumnChart(
    document.getElementById("googlechart-container3")
  );
  chart.draw(data, options);
}

function createGoogleChart4() {
  if (googleChartsLoaded) {
    pivot.googlecharts.getData(
      {
        type: "column",
        slice: {
          rows: [
            {
              uniqueName: "Campaign",
              filter: {
                members: [
                  "Campaign.Twitter",
                  "Campaign.Facebook",
                  "Campaign.LinkedIn",
                  "Campaign.Instagram"
                ]
              }
            }
          ],
          columns: [
            {
              uniqueName: "Measures"
            }
          ],
          measures: [
            {
              uniqueName: "Total Opportunities",
              formula: 'sum("Opportunities")',
              caption: "Total Opportunities"
            }
          ]
        }
      },
      drawChart4,
      drawChart4
    );
  }
}

function drawChart4(_data) {
  var data = google.visualization.arrayToDataTable(_data.data);
  var options = {
    tooltip: {
      textStyle: {
        color: "#024B40"
      },
      showColorCode: true
    },
    titleTextStyle: {
      fontName: "Tahoma",
      bold: true,
      color: "#000000"
    },
    fontSize: 18,
    title: "Converted Leads of Social Media Campaigns",
    legend: "bottom",
    colors: ["#77ab59", "#93bfa4", "#26827E"]
  };
  var chart = new google.visualization.ColumnChart(
    document.getElementById("googlechart-container4")
  );
  chart.draw(data, options);
}

function createGoogleChart5() {
  if (googleChartsLoaded) {
    pivot.googlecharts.getData(
      {
        type: "column",
        slice: {
          rows: [
            {
              uniqueName: "Campaign",
              filter: {
                members: [
                  "Campaign.Twitter",
                  "Campaign.Facebook",
                  "Campaign.LinkedIn",
                  "Campaign.Instagram"
                ]
              }
            }
          ],
          columns: [
            {
              uniqueName: "Measures"
            }
          ],
          measures: [
            {
              uniqueName: "Total Sales",
              formula: 'sum("Sales")',
              caption: "Total Sales"
            }
          ]
        }
      },
      drawChart5,
      drawChart5
    );
  }
}

function drawChart5(_data) {
  var data = google.visualization.arrayToDataTable(_data.data);
  var options = {
    tooltip: {
      textStyle: {
        color: "#024B40"
      },
      showColorCode: true
    },
    titleTextStyle: {
      fontName: "Tahoma",
      bold: true,
      color: "#000000"
    },
    fontSize: 18,
    title: "Won Opportunities of Social Media Campaigns",
    legend: "bottom",
    colors: ["#36802d", "#59c7db", "#26827E"]
  };
  var chart = new google.visualization.ColumnChart(
    document.getElementById("googlechart-container5")
  );
  chart.draw(data, options);
}

function createGoogleChart6() {
  if (googleChartsLoaded) {
    pivot.googlecharts.getData(
      {
        type: "column",
        slice: {
          rows: [
            {
              uniqueName: "Campaign",
              filter: {
                members: [
                  "Campaign.Display Ads Network - 2",
                  "Campaign.Google Display Network"
                ]
              }
            }
          ],
          columns: [
            {
              uniqueName: "Measures"
            }
          ],
          measures: [
            {
              uniqueName: "Bounce Rate",
              aggregation: "average"
            }
          ]
        }
      },
      drawChart6,
      drawChart6
    );
  }
}

function drawChart6(_data) {
  var data = google.visualization.arrayToDataTable(_data.data);
  var options = {
    tooltip: {
      textStyle: {
        color: "#024B40"
      },
      showColorCode: true
    },
    titleTextStyle: {
      fontName: "Tahoma",
      bold: true,
      color: "#024B40"
    },
    fontSize: 18,
    title: "Bounce Rate of Display Ads Campaigns",
    colors: ["#a63936", "#26827E"],
    legend: "bottom",
    isStacked: true
  };
  var chart = new google.visualization.ColumnChart(
    document.getElementById("googlechart-container6")
  );
  chart.draw(data, options);
}

function createGoogleChart7() {
  if (googleChartsLoaded) {
    pivot.googlecharts.getData(
      {
        type: "column",
        slice: {
          rows: [
            {
              uniqueName: "Campaign",
              filter: {
                members: [
                  "Campaign.Display Ads Network - 2",
                  "Campaign.Google Display Network"
                ]
              }
            }
          ],
          columns: [
            {
              uniqueName: "Measures"
            }
          ],
          measures: [
            {
              uniqueName: "Total Leads",
              formula: 'sum("Leads")',
              caption: "Total Leads"
            }
          ]
        }
      },
      drawChart7,
      drawChart7
    );
  }
}

function drawChart7(_data) {
  var data = google.visualization.arrayToDataTable(_data.data);
  var options = {
    tooltip: {
      textStyle: {
        color: "#024B40"
      },
      showColorCode: true
    },
    titleTextStyle: {
      fontName: "Tahoma",
      bold: true,
      color: "#5D353E"
    },
    fontSize: 18,
    title: "Leads of Display Ads Campaigns",
    legend: "bottom",
    colors: ["#c9df8a", "#26827E"]
  };
  var chart = new google.visualization.ColumnChart(
    document.getElementById("googlechart-container7")
  );
  chart.draw(data, options);
}

function createGoogleChart8() {
  if (googleChartsLoaded) {
    pivot.googlecharts.getData(
      {
        type: "column",
        slice: {
          rows: [
            {
              uniqueName: "Campaign",
              filter: {
                members: [
                  "Campaign.Display Ads Network - 2",
                  "Campaign.Google Display Network"
                ]
              }
            }
          ],
          columns: [
            {
              uniqueName: "Measures"
            }
          ],
          measures: [
            {
              uniqueName: "Total Opportunities",
              formula: 'sum("Opportunities")',
              caption: "Total Opportunities"
            }
          ]
        }
      },
      drawChart8,
      drawChart8
    );
  }
}

function drawChart8(_data) {
  var data = google.visualization.arrayToDataTable(_data.data);
  var options = {
    tooltip: {
      textStyle: {
        color: "#024B40"
      },
      showColorCode: true
    },
    titleTextStyle: {
      fontName: "Tahoma",
      bold: true,
      color: "#5D353E"
    },
    fontSize: 18,
    title: "Converted Leads of Display Ads Campaigns",
    legend: "bottom",
    colors: ["#77ab59", "#26827E"]
  };
  var chart = new google.visualization.ColumnChart(
    document.getElementById("googlechart-container8")
  );
  chart.draw(data, options);
}

function createGoogleChart9() {
  if (googleChartsLoaded) {
    pivot.googlecharts.getData(
      {
        type: "column",
        slice: {
          rows: [
            {
              uniqueName: "Campaign",
              filter: {
                members: [
                  "Campaign.Display Ads Network - 2",
                  "Campaign.Google Display Network"
                ]
              }
            }
          ],
          columns: [
            {
              uniqueName: "Measures"
            }
          ],
          measures: [
            {
              uniqueName: "Total Sales",
              formula: 'sum("Sales")',
              caption: "Total Sales"
            }
          ]
        }
      },
      drawChart9,
      drawChart9
    );
  }
}

function drawChart9(_data) {
  var data = google.visualization.arrayToDataTable(_data.data);
  var options = {
    tooltip: {
      textStyle: {
        color: "#024B40"
      },
      showColorCode: true
    },
    titleTextStyle: {
      fontName: "Tahoma",
      bold: true,
      color: "#5D353E"
    },
    fontSize: 18,
    title: "Won Opportunities of Display Ads Campaigns",
    legend: "bottom",
    colors: ["#36802d", "#26827E"]
  };
  var chart = new google.visualization.ColumnChart(
    document.getElementById("googlechart-container9")
  );
  chart.draw(data, options);
}

function getData() {
  return [
    {
      Channel: {
        type: "string"
      },
      Campaign: {
        type: "string"
      },
      Clicks: {
        type: "number"
      },
      "Campaign Cost": {
        type: "number"
      },
      CPC: {
        type: "number"
      },
      Users: {
        type: "number"
      },
      Sessions: {
        type: "number"
      },
      "Bounce Rate": {
        type: "number"
      },
      "Pages per Session": {
        type: "number"
      },
      Leads: {
        type: "number"
      },
      Opportunities: {
        type: "number"
      },
      Sales: {
        type: "number"
      },
      Date: {
        type: "date"
      },
      "Purchase Cost": {
        type: "number"
      }
    },
    {
      Channel: "Social",
      Campaign: "Facebook",
      Clicks: 1314,
      "Campaign Cost": 93.82,
      CPC: 0.07,
      Users: 923,
      Sessions: 1284,
      "Bounce Rate": "72.27%",
      Leads: 150,
      Opportunities: 120,
      Sales: 115,
      Date: "1/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Instagram",
      Clicks: 902,
      "Campaign Cost": 213.73,
      CPC: 0.24,
      Users: 727,
      Sessions: 905,
      "Bounce Rate": "57.02%",
      Leads: 42,
      Opportunities: 34,
      Sales: 20,
      Date: "1/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Twitter",
      Clicks: 91,
      "Campaign Cost": 10.94,
      CPC: 0.12,
      Users: 81,
      Sessions: 93,
      "Bounce Rate": "61.29%",
      Leads: 11,
      Opportunities: 9,
      Sales: 3,
      Date: "1/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "LinkedIn",
      Clicks: 2,
      "Campaign Cost": 0.36,
      CPC: 0.18,
      Users: 2,
      Sessions: 13,
      "Bounce Rate": "23.08%",
      Leads: 0,
      Opportunities: 0,
      Sales: 0,
      Date: "1/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Facebook",
      Clicks: 2962,
      "Campaign Cost": 116.07,
      CPC: 0.04,
      Users: 2176,
      Sessions: 2651,
      "Bounce Rate": "72.35%",
      Leads: 207,
      Opportunities: 190,
      Sales: 170,
      Date: "2/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "SEM",
      Campaign: "Bing Ads",
      Clicks: 803,
      "Campaign Cost": 185.4,
      CPC: 0.23,
      Users: 677,
      Sessions: 824,
      "Bounce Rate": "58.50%",
      Leads: 89,
      Opportunities: 75,
      Sales: 50,
      Date: "2/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "SEM",
      Campaign: "Google Search Ads",
      Clicks: 92,
      "Campaign Cost": 9.75,
      CPC: 0.11,
      Users: 82,
      Sessions: 83,
      "Bounce Rate": "68.67%",
      Leads: 7,
      Opportunities: 5,
      Sales: 2,
      Date: "2/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "LinkedIn",
      Clicks: 23,
      "Campaign Cost": 1.63,
      CPC: 0.07,
      Users: 22,
      Sessions: 27,
      "Bounce Rate": "37.04%",
      Leads: 1,
      Opportunities: 0,
      Sales: 0,
      Date: "2/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Display Ads",
      Campaign: "Google Display Network",
      Clicks: 4396,
      "Campaign Cost": 127.54,
      CPC: 0.03,
      Users: 2914,
      Sessions: 4024,
      "Bounce Rate": "73.46%",
      Leads: 402,
      Opportunities: 390,
      Sales: 387,
      Date: "3/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Display Ads",
      Campaign: "Display Ads Network - 2",
      Clicks: 751,
      "Campaign Cost": 184.7,
      CPC: 0.25,
      Users: 631,
      Sessions: 771,
      "Bounce Rate": "57.85%",
      Leads: 110,
      Opportunities: 102,
      Sales: 91,
      Date: "3/2/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Facebook",
      Clicks: 133,
      "Campaign Cost": 16.64,
      CPC: 0.13,
      Users: 120,
      Sessions: 143,
      "Bounce Rate": "53.15%",
      Leads: 16,
      Opportunities: 10,
      Sales: 10,
      Date: "3/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "SEM",
      Campaign: "Google Search Ads",
      Clicks: 132,
      "Campaign Cost": 53.71,
      CPC: 0.41,
      Users: 113,
      Sessions: 134,
      "Bounce Rate": "64.18%",
      Leads: 49,
      Opportunities: 45,
      Sales: 42,
      Date: "3/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Twitter",
      Clicks: 6,
      "Campaign Cost": 1.1,
      CPC: 0.18,
      Users: 5,
      Sessions: 7,
      "Bounce Rate": "57.14%",
      Leads: 0,
      Opportunities: 0,
      Sales: 0,
      Date: "3/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Facebook",
      Clicks: 2539,
      "Campaign Cost": 114.18,
      CPC: 0.04,
      Users: 1949,
      Sessions: 2540,
      "Bounce Rate": "71.38%",
      Leads: 317,
      Opportunities: 310,
      Sales: 309,
      Date: "4/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Display Ads",
      Campaign: "Google Display Network",
      Clicks: 727,
      "Campaign Cost": 274.18,
      CPC: 0.38,
      Users: 622,
      Sessions: 756,
      "Bounce Rate": "62.04%",
      Leads: 101,
      Opportunities: 100,
      Sales: 99,
      Date: "4/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Display Ads",
      Campaign: "Display Ads Network - 2",
      Clicks: 244,
      "Campaign Cost": 92.02,
      CPC: 0.38,
      Users: 196,
      Sessions: 238,
      "Bounce Rate": "61.34%",
      Leads: 70,
      Opportunities: 65,
      Sales: 65,
      Date: "4/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Instagram",
      Clicks: 8,
      "Campaign Cost": 1.67,
      CPC: 0.21,
      Users: 8,
      Sessions: 8,
      "Bounce Rate": "50.00%",
      Leads: 2,
      Opportunities: 2,
      Sales: 1,
      Date: "4/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Display Ads",
      Campaign: "Google Display Network",
      Clicks: 2567,
      "Campaign Cost": 131.7,
      CPC: 0.05,
      Users: 2056,
      Sessions: 2534,
      "Bounce Rate": "75.02%",
      Leads: 528,
      Opportunities: 518,
      Sales: 515,
      Date: "5/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Display Ads",
      Campaign: "Display Ads Network - 2",
      Clicks: 524,
      "Campaign Cost": 56.44,
      CPC: 0.11,
      Users: 530,
      Sessions: 607,
      "Bounce Rate": "86.33%",
      Leads: 99,
      Opportunities: 90,
      Sales: 88,
      Date: "5/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Twitter",
      Clicks: 390,
      "Campaign Cost": 187.85,
      CPC: 0.48,
      Users: 350,
      Sessions: 458,
      "Bounce Rate": "58.52%",
      Leads: 2,
      Opportunities: 1,
      Sales: 1,
      Date: "5/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "SEM",
      Campaign: "Bing Ads",
      Clicks: 272,
      "Campaign Cost": 71.2,
      CPC: 0.26,
      Users: 231,
      Sessions: 271,
      "Bounce Rate": "66.79%",
      Leads: 120,
      Opportunities: 115,
      Sales: 111,
      Date: "5/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "LinkedIn",
      Clicks: 10,
      "Campaign Cost": 1.7,
      CPC: 0.17,
      Users: 12,
      Sessions: 17,
      "Bounce Rate": "29.41%",
      Leads: 2,
      Opportunities: 1,
      Sales: 0,
      Date: "5/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Facebook",
      Clicks: 2350,
      "Campaign Cost": 130.95,
      CPC: 0.06,
      Users: 1555,
      Sessions: 2051,
      "Bounce Rate": "82.64%",
      Leads: 362,
      Opportunities: 351,
      Sales: 347,
      Date: "6/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Twitter",
      Clicks: 411,
      "Campaign Cost": 175.41,
      CPC: 0.43,
      Users: 364,
      Sessions: 482,
      "Bounce Rate": "49.79%",
      Leads: 22,
      Opportunities: 17,
      Sales: 16,
      Date: "6/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "SEM",
      Campaign: "Google Search Ads",
      Clicks: 204,
      "Campaign Cost": 55.59,
      CPC: 0.27,
      Users: 178,
      Sessions: 207,
      "Bounce Rate": "68.60%",
      Leads: 78,
      Opportunities: 67,
      Sales: 65,
      Date: "6/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "LinkedIn",
      Clicks: 112,
      "Campaign Cost": 8.29,
      CPC: 0.07,
      Users: 81,
      Sessions: 96,
      "Bounce Rate": "90.63%",
      Leads: 34,
      Opportunities: 28,
      Sales: 10,
      Date: "6/1/2018",
      "Purchase Cost": 50
    },
    {
      Channel: "Social",
      Campaign: "Instagram",
      Clicks: 8,
      "Campaign Cost": 1.51,
      CPC: 0.19,
      Users: 9,
      Sessions: 12,
      "Bounce Rate": "41.67%",
      Leads: 3,
      Opportunities: 2,
      Sales: 1,
      Date: "6/1/2018",
      "Purchase Cost": 50
    }
  ];
}

              
            
!
999px

Console