Best Flask open-source libraries and packages

Webdev AB testing

Flask app that tracks webpage interactions for A/B testing
Updated 10 months ago

webdev-AB-testing

Author: Erin James Wills, ejw.data@gmail.com

AB Testing Banner

Photo by Jeffrey Hamilton on Unsplash


Overview


This repo explores the basic concepts of how to obtain information for AB testing.

Status

This is just the starting point but the core structure of the code works as of 7/3/2023. The Flask app currently loads and index.html page that has two buttons. Each button is tracked through the class associated with it named trackable. The database currently stores only the id of the button clicked but this can be expanded to include a data, session id, and user id. The app already has a working feature that stores a cookie but this feature needs improved such that the database is checked for this cookie and if the id associated with the cookie can not be found then a new id is assigned.


Next Phase

  1. Create cookie containing a user id
  2. Update database to collect datetime, cookie id, etc related to page interaction
  3. Create two html pages that are considered the A and B versions.
  4. Create admin page that summarizes website interactions via a dashboard
    • Dashboard includes
      • Table of most recent users to access page
      • Show t-test of A and B pages

Longterm Goals

  1. add authentication
  2. add error handling
  3. more sophisticated tracking
  4. improved analysis page

Key Performance Indicators (KPI)

  1. conversion rate
  2. click-through rate
  3. bounce rate
  4. page views
  5. form submissions

Browser Information

  1. Cookies
  2. Local Storage or Session Storage
  3. IP Address
  4. User-Agent String
  5. Referrer Header

Creating the Database

  1. From terminal, type: sqlite3 <db_name>
  2. Write SQL queries to create tables
  3. When complete type: .exit
Tags testing