Website Analytics

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

Overview

Use Letoarrow-up-right 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.storagearrow-up-right and is retrieved using the Leto IPFS gatewayarrow-up-right. Anonymous analytics data is then accessible through the Leto dashboardarrow-up-right or Analytics APIarrow-up-right.

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 herearrow-up-right. For this example, there is some basic css in the index.html file to make it easy to upload to IPFS via Web3.storagearrow-up-right.

circle-info

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.storagearrow-up-right. You can use providers like Spheronarrow-up-right and Dapplingarrow-up-right to build the file and launch the app on IPFS for you.

Web3.storage

Login to web3.storagearrow-up-right, 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.linkarrow-up-right

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/bafkreiedazv25tc7idkywbco3jxrywdnb3g4ff3pqegrmshhtcpk5zgsyiarrow-up-right

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.ggarrow-up-right and select “CIDs''. Input the CID for your website.

Last updated