https://github.com/ejw-data/webdev-ab-testing
Flask app that tracks webpage interactions for A/B testing
https://github.com/ejw-data/webdev-ab-testing
flask html-css-javascript javascript sqlalchemy sqlite
Last synced: 3 months ago
JSON representation
Flask app that tracks webpage interactions for A/B testing
- Host: GitHub
- URL: https://github.com/ejw-data/webdev-ab-testing
- Owner: ejw-data
- Created: 2023-07-03T16:29:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-04T00:08:19.000Z (almost 3 years ago)
- Last Synced: 2025-01-22T06:47:10.959Z (over 1 year ago)
- Topics: flask, html-css-javascript, javascript, sqlalchemy, sqlite
- Language: Python
- Homepage:
- Size: 547 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webdev-AB-testing
Author: Erin James Wills, ejw.data@gmail.com

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
1. Update database to collect datetime, cookie id, etc related to page interaction
1. Create two html pages that are considered the A and B versions.
1. 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
1. add error handling
1. more sophisticated tracking
1. improved analysis page
## Key Performance Indicators (KPI)
1. conversion rate
1. click-through rate
1. bounce rate
1. page views
1. form submissions
## Browser Information
1. Cookies
1. Local Storage or Session Storage
1. IP Address
1. User-Agent String
1. Referrer Header
## Creating the Database
1. From terminal, type: `sqlite3 `
2. Write SQL queries to create tables
3. When complete type: `.exit`