This project provides a comprehensive analytics solution with OAuth2 authentication for accessing Google Analytics data.
- Clone the repository
- Copy
.env.exampleto.envand fill in your configuration - Copy
client_secret.example.jsontoclient_secret.jsonand add your OAuth credentials - Create a virtual environment:
python -m venv venv - Activate the virtual environment:
- Windows:
venv\Scripts\activate - Unix/MacOS:
source venv/bin/activate
- Windows:
- Install dependencies:
pip install -r requirements.txt
The application requires several configuration files:
- Google Analytics credentials
- OAuth 2.0 configuration
- Application settings
- API configuration
- Google OAuth 2.0 credentials
- Redirect URIs
- JavaScript origins
- Start the application:
python run.py - Navigate to
http://localhost:8080 - Follow the OAuth flow to authenticate
- Access analytics data through the web interface
- Run tests:
pytest - Check code style:
flake8 - Format code:
black .
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
- Never commit sensitive credentials
- Use environment variables for secrets
- Keep OAuth tokens secure
- Regularly rotate credentials
MIT