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.
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.
Go to Mixpanel’s Insights API Doc and fill in the and to get the correct URL to hit. On the right side of that page, fill in your Mixpanel and and it will give you the value you’ll need to add as a header to the request.
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 . 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.
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.
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 cardId 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.