Automate DisplayVideo360 (Doubleclick Bid Manager) reports

DisplayVideo360 is a part of Google Marketing Platform and is a great tool for clients that need more than Google Ads. Thanks to advanced targeting options and the reporting features you can optimize the campaigns with advanced data. Although we do see a lot of advantages of using DV360 (DisplayVideo360) one thing that for us was missing was importing campaign data to spreadsheets automatically. We like a challenge, and our most recent big-budget campaign was a perfect opportunity to find a solution to this. In this article, we will outline our process for automating importing DisplayVideo Reports to Google Sheets.

If you follow us closely you know that we create dedicated dashboards for our clients that present PPC campaigns by traffic source. For this purpose Supermetrics is great, however, sometimes the connections between platforms and Supermetrics don’t exist or are limited. In those cases, we write our own scripts that import data by using dedicated APIs. Supermetrics features for reporting DisplayVideo 360 campaigns are limited and not adequate to our needs, therefore, decided to write our own script to get the data in a spreadsheet which serves as a warehouse for building dashboards for our clients.

To put what we did in simple words:

  1. First, we configured all needed reports using DV360 reporting feature – this means click and conversion reports,
  2. next we wrote a script that searches the user’s email for specific reports
  3. the last step is to import the data into a spreadsheet.

All the steps are detailed below.

1. Create the reports you need in DV360

In the first place, you need to create the reports you want to import. For us, the reports include 2 types:

  • Standard Report – for impressions, clicks, spent
  • Floodlight report – for specific floodlight activities
DisplayVideo360 standard report

The next part is setting up the scheduling for the report. It’s important to set it up daily and as a CSV document.

Scheduling options

2. Set up a spreadsheet

This one is easy. Create a sheet in the document you want to use for reporting.

3. Set up an Importing Script

In the spreadsheet you have prepared go to Tools-> Script Editor. Please remember that this needs to be the same account that receives the e-mail reports.

Script Editor

The next step is to adjust the script we share with you. Please change the report name you receive from DV360 and the sheet name where you want to import the report.

Krzysztof Stanislawek
We can help you with your marketing reporting and analytics dashboard. **/ function onOpen() { var ui = SpreadsheetApp.getUi(); // Or DocumentApp or FormApp. ui.createMenu('DV360') .addItem('Import Report', 'dv360import') .addItem('Import DV360 Conversions', 'dv360importConversions') .addToUi(); }; function dv360import() { var name = 'Report #772598046'; var ReportName = 'DV360 - report'; var threads =; var message = threads[0].getMessages()[threads[0].getMessages().length-1]; var attachment = message.getAttachments()[0]; // Is the attachment a CSV file if (attachment.getContentType() === "text/csv") { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(ReportName); var csvData = Utilities.parseCsv(attachment.getDataAsString(), ","); // Remember to clear the content of the sheet before importing new data sheet.clearContents().clearFormats(); sheet.getRange(1, 1, csvData.length, csvData[0].length).setValues(csvData); } else { var extracted = Utilities.unzip(attachment); var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(ReportName); var csvData = Utilities.parseCsv(extracted[0].getDataAsString(), ","); // Remember to clear the content of the sheet before importing new data sheet.clearContents().clearFormats(); sheet.getRange(1, 1, csvData.length, csvData[0].length).setValues(csvData); } // }

In the script editor, set up a trigger to fire daily at the scheduled hour. The gif below shows how to do it.

Adding Triggers to Google App Scripts

4. Congratulations! Your report import is ready

We recommend to test and wait for 24h to check if the report is automatically updating, but apart from that, you have just automated your reporting.

Video Tutorial included

If this seems complicated don’t worry, we are here to help you. Don’t waste your time on figuring reporting on your own, we will help. Go ahead and contact us.

Share on facebook
Share on twitter
Share on linkedin