Open navigation

How to connect data from JSON/CSV/XML files

If you can't find a data source you want to report from in Supermetrics, you can connect a downloaded dataset to your Google Sheets spreadsheet or Data Studio report. Any data in a valid CSV, JSON, XML, TSV, or Text format can be connected as a custom data source through Supermetrics. 

When you're ready, learn more about the parameters for these types of files.

Before you begin

File setup

The file you're connecting to needs to adhere to specifications of the type of data you're connecting to. For a CSV file, it should only contain comma-separated data. Set the field headers on the first row, and the data in matching order to the following rows.

A JSON file needs to be in JSON format, an XML file needs to be in XML format, a TSV file needs to be tab-separated, and a Text file should contain some text.

Make sure the file can be accessed directly from a URL. Alternatively, upload the file to a Google Drive location.

Ensure that the source file is maximum 3.9 megabytes in size, and that the result fits that limitation as well.


Data Studio Google Sheets
  1. Log in to Data Studio. 
  2. Navigate to Create → Data source.
  3. Scroll down to Partners connectors, or use the search bar and select JSON/CSV/XML by Supermetrics.

    If it’s your first time authenticating the data source, click Authorize to log in to Supermetrics with the Google Account you use in Data Studio. Click Allow to accept the access request.

  4. Click Authorize
  5. In the Parameters view, fill in the details for the configuration. Learn more about parameters.
  6. Select the team with your Supermetrics Data Studio license.
  7. Under Data type, your file type.
  8. Fill in the Source URL or Google Drive path.
    • If the CSV file is accessible directly from a URL, paste it in this field.
    • If the CSV file is located in your Google Drive, fill in the file path. For example, if the file name is mydata.csv, located in a folder named CSV_folder under the My Drive root folder, the path would be CSV_folder/mydata.csv.
    • Alternatively, you can paste the URL from the Get link sharing option with the file's sharing settings set to Anyone with the link can view.
  9. Click Connect in the top right corner.

The headers from your data will be set as dimension fields in the data source file. You can now create a report and start using your CSV data with the data source file.


Supermetrics offers the same types of parameters in both Google Sheets and Data Studio.

  • To find parameters in Google Sheets, open the Supermetrics sidebar in any Sheet and click the Report configuration dropdown.
  • To find parameters in Data Studio, click the Edit icon next to the data source, and then click Edit connection. Scroll down to see the parameter fields.

Data type

Choose the type of file you want to process. This needs to match with the real format of the file that you specify. You need to know which format to use.

Source URL / Type URL

The main input you need to give is the internet address to the source file you want to be read. This can be a URL to any service as long as it gives a file to process.

Google Drive is also supported, either by sharing the file with anyone with the link, or by inserting the file's name by location within Drive's internal path. You need to give a working address of some kind.

Multiple different URLs are not supported at once, but you can specify multiple IDs of a single URL using a comma to delimit them. E.g. url/lookup?id=909253 and url//lookup?id=284910350 can be combined to /lookup?id=909253,284910350

Learn how to use dynamic date selections with these types of files.

Post string / Request

If you have a specific command in mind that you want to relay to the service, post requests come in here. Usually none is needed.

HTTP headers

If you need to for example provide your login credentials, they are typically given here in JSON format. Usually none is needed, but if you know you do need one, try:
{ "yourUsernameToken":"yourUserName", "yourPasswordToken":"yourPassword" }


This allows you to specify a relative path to JSON data you want to access, if it's not by default on first level of address you gave in first field. Usually, none is needed.

More resources

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.