Marfeel Google Sheets Add-On

The Marfeel extension for Google Sheets allows you to view the data in spreadsheet form for analysis and to create custom data visualizations. You can schedule regular data updates from within the sheet.

As part of Marfeel’s data exports offerings, the Google sheets extension makes it possible to export data via the JSON API right from Explore in order to:

  • Build charts and perform custom analysis with Marfeel explore data in spreadsheet form
  • Schedule reports right from the Sheets extension

Set up the Marfeel for Google Sheets Add-on

  1. In Google Sheets, go to Extensions > Add-ons > Get Add Ons

  1. Search for “Marfeel” or “Marfeel for Google Sheets”

  1. Select the Marfeel extension and click Install
  2. Click Continue
  3. Log into your Google account
  4. The following screen will display all the permissions you’ll need to enable to run the application. Click Allow.

  1. Marfeel for Sheets will now appear under the Extensions menu. To enable it, go to Extensions >Open Report API

  1. Enter your Marfeel-associated email and password in the sidebar
  2. Once your user is verified, click Create sheet in the sidebar to create the following sheet:

You’re all set up! Learn more about how to use the Marfeel Google Sheets Extension below.

How to use Marfeel for Google Sheets

Once the add-on is enabled, open a new Sheet and go to Extensions > Marfeel for Google Sheets > Open Report API any time to create a new sheet or access saved sheets in your Google Drive.

The Marfeel Explore sheet has 5 columns. Each column represents a different report (scroll to the right to see the rest of the columns:

First report starts empty, and the other 4 are prefilled with examples. They are all editable to adapt to any individual needs.

  1. Custom: empty example, mostly for one-time execution queries.
  2. Example 1: Top articles yesterday: the top performing articles from the previous day
  3. Example 2: Top articles subscribers yesterday: the articles that were the last editorial hit for the most subscribers
  4. Example 3: Top articles this month PVs: the articles with the most pageviews during the current month
  5. Example 4: Engagement Analysis Per Section, Last 7 days: Average engagement time and ads per page, per section

There are 5 rows:

  1. Report name: remember which report is in each column
  2. Results dataset sheet name: the name of the sheet where your results will appear for that report when it has been executed
  3. API payload JSON: the query you want to run, in JSON format
  4. Export as Time Series: check this box if you want data to be split by hour, day or week, as shown in Explore view when expanding rows
  5. Overwrite data: keep this box checked if you wish to have old data overwritten when you execute a fresh report

Get JSON API for query

To import a query into your sheet, go to Explore and run the query you want.

  1. Click the three dots in the top-right corner
  2. Click Get JSON API
  3. The query will copy to the clipboard
  4. Go back to your sheet and paste the query in the API payload JSON row, in the column you want to edit the report for
  5. Optional: Rename the report name on the second row to better describe the query
  6. Optional: Rename the Results data sheet name row with the name you want to give to the sheet where the data will populate once the report has been executed.

Execute report

To generate any Explore report in sheet form, select Execute report from the sidebar.

Note: if at any time the sidebar disappears, go to Extensions > Marfeel for Google Sheets > Open Report API

  1. Click on Execute report in the sidebar
  2. Select the report from the dropdown menu and click outside the menu to collapse it
  3. Click the green Execute report button
  4. If you have the Overwrite data option checked, you will be prompted to confirm that you wish to delete existing data. Click Yes to proceed.
  5. It might take some seconds for the process to be completed.
  6. The data will populate in a sheet with the name provided in the second row of the Custom column.
  7. If you have opted NOT to overwrite historical data, i.e. the checkmark on the main sheet is unchecked for that dataset, then the data from previous reports will appear below the more recent data.
Make sure you always use different sheets for each different report. This tool does not support different reports writing on a same sheet.

Schedule reports

Schedule reports to have the delivered right to the sheet automatically at regular intervals to create routines and always be in possession of the freshest data.

  1. Select Create Schedule in the side panel.
  2. Select the report you want to schedule from the Reports drop-down menu
  3. Choose how often and when you want to receive reports. You can set a recurrence daily, weekly or monthly, and setting the exact execution time is also available.
    Alternatively, select the date and time you’d like to schedule a one-off report on.
Reports will be created using the query existing at the time when the schedule is executed, NOT at the time when the schedule is created.
  1. Click on Create schedule

View scheduled reports

Select Show Schedules from the sidebar menu to see the reports that you have scheduled previously and the scheduling information. Select any report to delete it or select the trash icon on the right-hand side to cancel all subscriptions.