Session Stream

Programmatically Download Session Stream Files

Session Stream provides open access to raw Monetate session data. You can use this data in relational databases such as MySQL, data warehouses such as Amazon Redshift, or BI platforms such as Tableau and Domo.

Session Stream provides JSON data files compressed with Gzip in 15 minute increments. Each file contains raw data from every session that Monetate observed on your site during that time. Session Stream is available for all Monetate users.

For more information about the fields each file contains, how to obtain the files via SFTP, and more, see the Session Stream documentation in the Monetate Knowledge Base.

As an alternative to using an SFTP client, you can use the following example Python script to download your Session Stream files.

You must have Paramiko 2.1.1 or later to run this example script.

Example Script to Download Session Stream Files


When run more than once for a particular date, this script only downloads files that you haven't already retrieved. You can input as a parameter the date for which you want to fetch data. The Session Stream files are downloaded to the location you specified with the same date-based directory structure that Monetate uses to organize the files. You can schedule this script to run daily or write a similar application that better meets your needs.