Comment on page

Website Analytics

Use Leto Analytics on a simple IPFS website hosted on Web3.storage


Use Leto with an IPFS hosted website to monitor traffic, watch for system abuse, and improve your system.
In this example, an HTML webpage is uploaded to IPFS via Web3.storage and is retrieved using the Leto IPFS gateway. Anonymous analytics data is then accessible through the Leto dashboard or Analytics API.
We made a Link in Bio webpage for this example. Feel free to make any type of webpage that suits your needs!
Create a simple html webpage to display your important links. View the code used in this example here. For this example, there is some basic css in the index.html file to make it easy to upload to IPFS via Web3.storage.
If you want to include other files (like a separate css file) or have an app like a react app, you will have to build it and then upload the build folder to Web3.storage. You can use providers like Spheron and Dappling to build the file and launch the app on IPFS for you.


Login to web3.storage, make a space, and upload your index.html file.
Now, the index.html file (in this case a webpage) is accessible by clicking the link under “CID”. https://bafkreiedazv25tc7idkywbco3jxrywdnb3g4ff3pqegrmshhtcpk5zgsyi.ipfs.w3s.link
To collect anonymous analytics for this webpage, input your CID into the following link format https://leto.gg/ipfs/{yourCID} instead of using the link provided by web3.storage: https://leto.gg/ipfs/bafkreiedazv25tc7idkywbco3jxrywdnb3g4ff3pqegrmshhtcpk5zgsyi
When users retrieve the webpage through this link, anonymous analytics data is generated. It’s that easy to host a webpage on IPFS and measure webpage performance with Leto!

Interacting with your analytics

Use the Leto dashboard to view the analytics data generated by your webpage. Login at Leto.gg and select “CIDs''. Input the CID for your website.