Mike Elissen

How to measure your image traffic/consumption? Set up an extra CP Code!

Blog Post created by Mike Elissen Champion on Sep 20, 2017

How to measure your images traffic/consumption? Set up an extra CP Code!

A question I receive often is how to see within Akamai how much traffic goes to images? Of course, the same can be said about video traffic or any other file type and the following blog post works equally as well for that. But in this scenario we are focusing on images.

 

In getting insights in the amount of image traffic, you can also look into using one of Akamai's Image Optimization solutions like Image Converter or Image Manager.

 

How do I track this?

In order to see the traffic of images only, you will need to set up an additional CP Code in your delivery configuration. Below are the steps how to do this.

 

  1. Log into LUNA Control Center
  2. Create a new version of your delivery configuration
  3. Add a new Blank Rule (eg. Image Traffic)

 

4. Personally I group together logic with subroles in my configuration, so all CP Code related rules go under Measurements.

 

5. Add an IF statement matching on the file extension you desire. In this case, jpg/jpeg/gif/png/webp. (This can be changed for other file types if you wish to track video traffic for instance).

6. Add the behavior Content Provider Code and chose your existing CP Code or create a new one.

 

7. The final rule should look something like this:

 

8. Save, deploy to staging, test, and push to production.

 

9. Once deployed and it accumulated traffic (not the case in my screenshot below yet), you will see the amount of image hits/volume nicely separated from the other traffic you are serving on Akamai/hostname. You can find this under Monitor > User Traffic. Then select the CP Code you created in the top right with Change.

 

 

If there are any questions about this, please feel free to let me know.

Outcomes