Before being able to use the Analytics API, you've to enable access. Learn more about it on this page.
- You can import the Postman collection with either this link or this file.
- Select Retrieve Token.
- Enter Client ID and Client Secret as your username and password.
- Select Retrieve Token, a token will be saved and used in the next call automatically.
- Open Create Calculation.
- Now you need a JSON query. You can create one from scratch or use one from Mapp Intelligence:
- for example, you could go to Visitors > Traffic.
- Next, select the 3 dots menu, and Copy JSON Configuration.
- Add your Configuration into Body.
- Select Create Calculation.
- Call a resultUrl or statusUrl from the response:
- if the result is available directly, Create Calculation will return the resultURL
- if the result is not ready yet, the Status will be returned, and a status URL. Once the result is ready, the response will be a result Url
- Call resultUrl to get the result.
Please note that onsite, if there are no values returned, you will see a 0. However, When using an API this will return as null.