Google Sheets
You can pull your metrics & KPIs to Google Sheets directly from Metriql using Metriql Google Sheets app.
See Metriql on Google Marketplace
The app lets you pull data and periodically update the reports inside the Google Sheets. You need to enter your Metriql URL and credentials in the sidebar, and then you can use the following methods to pull the data:
#
Using query builder in the sidebarIf you want to pull the data into a cell and update it periodically, you should create a new query and save it on the Metriql sidebar.
#
Calling custom functionsMetriql app comes with two functions:
=IMPORTMETRIQL("segmentation", "{'dataset': '“test_dataset”', 'measures': ['measure1']}“)
#
IMPORTMETRIQL
is the generic way to run ad-hoc queries in Metriql. If you have a static report that you want to run or use different reporting types such as funnel and retention, it's the recommended custom function.
=IMPORTMETRIQLSEGMENTATION(“test_dataset”, {“measure1"}, {“dimension1”}, {"orderfield"}, 1000)
#
IMPORTMETRIQLSEGMENTATION
function lets you build up segmentation queries dynamically.
You can pass array values to the function as arguments, and the function builds the segmentation report itself. If you would like to reference cells in the query or would like to have better readability when executing segmentation queries, it's the recommended custom function.
Here is a full demo:
## Caveats#
Authorization issue with multiple Google accountsWhen you have multiple Google accounts logged-in in the browser, you might not be able to login because Google App Script doesn't support authorization when the user is logged-in into multiple Google Accounts. Please see the relevant links here:
The workaround is signing out from the other Google accounts or using incognito mode in your browser to use the app within a single account.