Capture clickstream information from your ecommerce site – IBM Developer


In this designer code pattern, we will demonstrate how to produce a database of ecommerce clickstream information with DataStax Enterprise or Apache Cassandra. Using Red Hat OpenShift and the DataStax Kubernetes Operator for Apache Cassandra, you can release this dispersed database on-premises or on your cloud service provider of option with a unified OpenShift experience. If you choose a database-as-a-service service provider, get up and running rapidly with IBM Cloud Databases for DataStax.


The supplied ecommerce site is developed utilizing server-side making (SSR) with Next.js and React elements. As clients search the websites, SSR rapidly (and asynchronously) inserts searching information in the database for each page rendered. When the consumer clicks the “Add to cart” button, the client-side React element utilizes Next.js API paths to include that clickstream information. The DataStax Enterprise database is enhanced for low-latency quick composes and is developed to be extremely scalable. This make DataStax Enterprise an excellent suitable for gathering high-volume clickstream information.

When you have actually finished this code pattern, you will comprehend how to:

  • Select a cloud, cluster, or advancement platform for Apache Cassandra or DataStax Enterprise
  • Provision DataStax Enterprise or a DataStax circulation of Apache Cassandra
  • Design and produce a database for DataStax Enterprise
  • Use CQL and cqlsh to produce and query your database
  • Build and run the Next.js web app, which tracks clickstream information


Flow diagram

  1. Users connect with ecommerce site.
  2. Web pages and elements record clicks.
  3. Clickstream information is kept in a fast-write extremely scalable database.


Get in-depth guidelines from the README file. Those guidelines describe how to:

  1. Deploy DataStax Enterprise or Apache Cassandra
  2. Interact with your database utilizing CQL and cqlsh
  3. Interact with your database utilizing the DataStax Node.js customer

This code pattern belongs to the Develop a smart stock and procurement method utilizing AI series.