"Get Data Using Function" is a different way of fetching data into a Google spreadsheet using a custom function called "SUPERMETRICS". Please note that this feature is only available in the Super Pro level of license for Supermetrics for Google Sheet Add-on.


How to Use "Get Data Using Function"

When the sidebar is open and a query is not being modified, there should be a drop-down on the button "Get Data to Table" that has options for "Function" and "Function (+params)".


With either of those selected, the button how changes to "Get Data Using Function" and clicking it will insert the function into the sheet with the results. If you click on the upper-left portion of the results in the table, you should then see the function:


If you use "Function (+params)", you will then see this, with updatable parameters added to the sheet.


(Note that the query will not longer appear under the SupermetricsQueries sheet, and will need to be manipulated where the function is.)


Benefits of Using Functions

  • Compared to normal data queries, it's faster.
  • Query parameters can easily be modified (they are right above the data and not on the SupermetricsQueries sheet).
  • Whenever the query parameters are modified, the data will automatically be updated to reflect the changes.


Downsides to Using Functions

  • Google allows custom functions to run for only 30 seconds, so this method of fetching data is suitable only for quick queries. If the time limit is exceeded, the function will display "#ERROR", with the details "Internal error executing the custom function."
  • The query information won't be visible along your normal queries on the SupermetricsQueries sheet.
  • The authentication information for accessing the data is stored as an authentication token right inside the query, it's in the first query parameter starting "authentication_...". Anyone that has access to this token can fetch data from the specified data source using the credentials of the user account you used for creating the query. So don't share the token with anyone that shouldn't be able to get that data. If you need to revoke any tokens, you can do so here.