dashboard
Python libraries for tracking-exposed
Installation instructions
Install basic Python libraries
sudo apt-get install git python3-venv python3-dev python3-tk python3-pip
Git clone
git clone https://github.com/tracking-exposed/dashboard.git && cd dashboard
setting up virtualenv
We recommend using a virtual environment.
python3 -m venv venv && source venv/bin/activate
Install requirements
python3 -m pip install -r requirements.txt
Run the configuration wizard
The scripts create an entry in config/
directory, you can edit by hand
python3 src/wizard.py
The name you choose is the config name you will use to call the tester script.
Usage
python3 src/app.py --help
If you have a configuration file ready in config/, try:
python3 src/app.py -c config/$confname --csv
Configuration Notes
name
= arbitrary name to identify your usertoken
= the fbtrex Token mandatory to retrieve data.config
= specify a configuration file (like the one created with configure.py)start
= start date, format yyyy-mm-ddend
= end date, format yyyy-mm-ddpath
= default save path (must be a writable directory already existing)csv
= outputs a csvpng
= putputs a png chart, available only for impression-counthtml
= outputs an HTML table without stylingjson
= outputs json dataimpression-count
= performs impression count instead of showing the whole data, sets to True or False
How do i retrieve my authentication token?
- you should have installed fbtrex web-extension
- you should have a valid facebook account, and use it with the browser where the fbtrex extension is installed
- click on "Your data" section, this would open an URL in your browser.
- the token is part of the URL, for a simple copy-paste, click on the tab "Control your data"
Usage
The simplest way to produce a csv or json out of your data is to call the script (from the virtual environment):
python3 src/app.py -c config/Name --csv
or python3 app.py -c config/Name --json
If you want to produce impression count instead, you can do:
python3 src/app.py -c config/Name --png
You can read some helpful information by running python3 src/app.py --help
.
If the installation fails
If you get an error like "invalid command bdist_wheel", try:
python3 -m pip install wheel