CONNECT YOUR SMARTLOOK REST API TO THE GOOGLE DATA STUDIO
During September (17/10/2020) and without a major launch, Smartlook announced the possibility of using the REST API to download data from Smartlook. Thereby the possibility of using the tool moved to a higher level since the data is no longer in the tool only, but partially it is also available externally for further processing.
As we are one of the active partners, we knew about API in advance, and so on the day of the release, our development team (including me) took on the uneasy task and started getting acquainted with the content of API. There is clear (yet not very detailed) documentation for Smartlook REST API, and often you have to test things by the method of trial and error.
What can be obtained from API?
Currently, aggregated data on events, funnels and users can be extracted from API by individual days. Then you can manipulate this data in further analytic or data tools.
The export of heatmaps is still being arranged, and it is unknown which option the Smartlook development team will choose. Our proposal was to request the picture of the heatmap.
At this moment, the API limit is 500 requests per 30 minutes for each endpoint. The request size has not been limited yet.
Possibilities of use?
Maybe you are wondering what API can be used for. We are thinking of several things right now:
Comparison and archiving of data on individual events and funnels (and on heatmaps in the future)
Possibility to connect Smartlook data to an existing reporting (e.g.: Google Data Studio or other tools via a simple download to Google Sheets, or by saving to your own database)
Possibility of statistical data processing, and more thorough analysis without having to export the data manually
What did we manage with API?
After hours of development, we managed to prepare two pilot outputs. One of them is a script that allows you to download event data by days to Google Sheets. We are currently working on releasing the script
The second one is the Google Data Studio Connector for Smartlook REST API which currently allows you to download aggregated event data for a selected time period. You can already try out the connector today, read on.
The connector was made well thought out, including caching, therefore we also save several API requests. The logic is that each time all events from the account are being downloaded (API is updated immediately after adding the event in the administration), and from the second endpoint, 4 basic metrics for the time period selected in the data filter are dragged to them.
Want to try out our Google Data Studio Smartlook REST API connector?
Then do not hesitate and go for it. The deployment ID of the released connector production version is
AKfycbxDaY0Y_R76JVV4G8iQ71NTGDNi9IFaXsHo9MXlboggGT0tPnFzLI6E4K9r5tTaxlU0
Afterward, the output looks like this. You can find 5 dimensions in it – Event Name, Event ID, Category Name, Category ID, link to detail in API (for debug purposes) and 4 metrics – Occurrence Count, Unique Visitors Count, New Visitors, and Average Occurrence Per Visitor.
PLEASE BEAR IN MIND THAT THIS IS THE ALPHA VERSION OF THE CONNECTOR, AND YOU USE IT AT YOUR OWN RISK. WE CANNOT GUARANTEE ITS 100% FUNCTIONALITY.
How to connect Smartlook REST API to Google Data Studio?
It is simple: add a new source to Google Data Studio
Find the ‚Build Your Own‘ option
Here you enter the Deployment ID given below (mind the spaces before and after)
AKfycbxDaY0Y_R76JVV4G8iQ71NTGDNi9IFaXsHo9MXlboggGT0tPnFzLI6E4K9r5tTaxlU0
Click on Validate and then on Smartlook Connector.
You authorize the connector the same way you are used to with other connectors.
Then add the API key.
You will be requested to enter the API key. You can generate it for each project separately in the Smartlook settings. Specifically in Manage Projects – Detail of the selected project in the REST API tokens section.
Please note the token will be displayed only once, so do not forget to save it. At the same time, only the project owner can generate tokens.
Then click on Connect, and the connector will be loaded. Then you can start creating your first report.
You can use a simple template that we have prepared for the connector. Please take into account that uploading the data may take some time.
Need help with the connector given above? Need help downloading data from Smartlook API to Google Sheets?
Or do you need help with the overall implementation of the tool?