Update Metrics with Zapier
Use the Zapier integration to get data into Vistaly from:
- BI tools like Looker, Tableau, Google Data Studio, etc.
- Product Analytics tools like Mixpanel, Amplitude, Pendo, Posthog, etc.
Step 1 - Schedule the Zap to run automatically
You’ll want to configure this Zap to run automatically at a cadence that makes sense for you. We recommend updating metric card values every week on Sunday night but feel free to update them daily if you’d prefer.
Step 2 - Request the data from your analytics tool
The next step is to request the data you’re looking for it’s data source.
Every tool is different, but most of them have an API that allows you to query the data you’re looking for.
Tips for making API calls to various analytics tools
Posthog
First you need to get the actual ID of the Insight you want the data for. Use a tool like Postman to hit the endpoint that gets all of your saved Insights. Look through the response for the ID of the Insight you want because the thing that looks like the ID in the URL when you’re viewing the Insight doesn’t work with the API.
Mixpanel
Go to Mixpanel’s Insights API Doc and fill in the project_id
and bookmark_id
to get the correct URL to hit. On the right side of that page, fill in your Mixpanel username
and password
and it will give you the value you’ll need to add as a header to the request.
Amplitude
Start by grabbing your project’s API key and Secret Key.
Go here to determine the URL for the Amplitude endpoint you’ll want to hit.
Amplitude requires you to set a header with the name Authorization
. The value for header should be your API Key and Secret Key (in this format: api_key:secret_key) encoded in Base64. Here’s a tool for Base64 encoding your Api Key and Secret Key.
Looker
First get the underlying Query from a saved Look and then make a request to run that Query.
Step 3 - Transform the data if necessary
Every tool returns data a bit differently. Some will automatically group the data by day or week or month, some will return raw event-level data that needs to be aggregated, and others may apply filters or transformations before returning results. You may need to reshape the data, adjust time granularity, or extract specific metrics before posting to Vistaly.
Zapier has a “Code” Zap with an AI assist that will allow you to pass in the data from your API request and then help you write the code to get it into the state you’re looking for.
Step 4 - Update the metric card in Vistaly
The last step is to use Vistaly’s Zapier integration to update your metric card.
To do so, you’ll need to link your Vistaly account with your API Key.
With your Vistaly account linked, you’ll need to get the ID of the metric card you want to update. You can find this by clicking on the metric card in Vistaly and grabbing the tsnid
out of the URL.
Use the data from the previous step as the value.
You probably want to leave the “timestamp” field blank, which will automatically default to the time we receive the API call.