The "Analytics" view in your ImageKit dashboard can be pretty useful. Not only does it provide you with an overview about your month-on-month usage, it can also help you identify possible areas of improvement for image optimization using ImageKit.
1. Duration and Update of Analytics
At present, you can see the analytics for the current and the last three months. You change the selected month from the drop down at the top and then clicking on the "View" button. The analytics are usually updated a couple of hours after the actual time of activity. Thus, if you want to track real-time usage, you should look at the real-time usage section in your dashboard.
Let's look at the different sections in the Analytics view and how you can make better use of the information presented in each of them.
2. Bandwidth and Request Usage Graphs
In this section, the graph on the right shows your bandwidth / request usage for each day in the current month. On the left, you see the total usage along with the URL endpoint wise distribution for that usage.
You can toggle between the bandwidth and request graphs from the top-right corner of this section as indicated below.
Using the bandwidth and request data
You get the breakup of your daily usage of bandwidth and requests. Usually, these graphs should move in the same way. If the requests go up by a certain amount, the bandwidth too should go up by almost the same amount. However, if you see that the requests increase much more than the bandwidth on a particular day, it indicates that you are loading a lot of smaller images on that day. Or, if the bandwidth increases significantly, while the requests don't, this indicates that you are loading a lot of heavy images on that day. This is something you should identify and fix for your images.
2. The URL endpoint wise distribution can be useful if you are managing multiple websites. In such a scenario, you can create a new URL endpoint to be used on each website and you will start getting the distribution of metrics on those URL endpoints i.e. distribution of metrics on each of those websites. Thus, you can get the breakup of bandwidth and request consumption across different websites.
3. Top Images
The top images section indicates the top 24 images (or files, if you are serving other file types using ImageKit) in that particular month ordered by the bandwidth or requests from high consumption to low consumption. You can toggle between top images by bandwidth and top images by request, from the top-right corner of this card. Under each image, you get the total request count and total bandwidth consumption for that image in that month.
Using the Top images section
This section is really useful to find out extremely large images being loaded on your website or app. In the top images by bandwidth view, these are the largest contributors to the bandwidth consumption. You can check the size of an image or a file by opening it from this section. If the file size is over 100KB, then you can possibly optimize that image further (or resize it to the actual required dimension) to lower your bandwidth consumption on that particular file.
4. Top Referrers
The top referrers section indicates the host from which the request for your images or files originate. Most browsers pass the "Referer" header value in the request. For example, if your images are loading on the website www.example.com, then the Referer header value will be www.example.com.
However, some browsers, apps and bots, do not have the Referer header value in the request. That is why, these requests are not captured in the Top Referer section. Thus, if the total bandwidth or request consumption, in the Bandwidth and Request Usage Graphs, doesn't match with the total here, then it could be possible that you are getting a lot of traffic from bots, apps or browsers that do not send the Referer header (a very small number compared to bots and apps usually).
5. Top Countries
This section indicates the top countries from where your content is being accessed. Note that, this data is not computed from the user's actual country. It is calculated from the CDN edge or node which responds to a customer's request.
For example, if you customer is in Indonesia, it is possible that the image request from Indonesia, is fulfilled by the CDN's Singapore edge. Thus the Top countries section would display "Singapore" (the country of the CDN edge that fulfilled the user's request) as the top country and not "Indonesia" (the actual country of the user)
You may have a case where you users are from Africa, but the top countries section would show usage from Europe, Australia, Singapore etc.
6. Top Transformations
The top transformations section indicates the most used transformations in your images. If you are using named transforms, then the name of that named transformation is shown in this section, instead of the composing transformations.
Using the top transformations section
Ideally, you should have only a few transformations, around 5, that make up for most of your traffic. These top 5 transformations would make up for more than 70% of your traffic. If that is not the case, it means that you are using too many distinct transforms on your images. Maybe you are doing that to cater to different device dimensions or different device DPR values. But, having too many transformations of the same image, leads to a poor caching a delivery performance. It is thus advisable, to have a few number of unique transformations being used on your images.
ImageKit keeps adding more data to the analytics section. If there is some other data that you would like to get from ImageKit, something that is not in the analytics section already, or if you need more clarity on the above items, please create a support ticket from your dashboard and our team will help you in getting that data.