- This script uses Python, so you'll need to install if you don't already have it installed.
- Run the python setup
- To automatically prepare the terminal shell, run
direnv allow
. See https://direnv.net for more info on how it works. - If not using direnv, run
./setup.sh
.
- To automatically prepare the terminal shell, run
- Run
python -m src.users
to check whether environment is setup and credentials are valid.$ python get_all_users.py
By default, the client will look at the present working directory to find googleads.yaml
. This can be overridden by setting the a path by GOOGLEADS_CONFIG=/dir/to/config/googleads.yaml
.
GOOGLEADS_CONFIG=/dir/to/config/googleads.yaml python -m src.users
- https://www.google.com/dfp/
- Admin > Global Settings > Add a Service Account User
- Use the email of the Service Account created in the previous section
- https://console.developers.google.com/apis/credentials
- Create Project (if needed)
- Create credentials > Service account key
- Create Service account (if needed)
- Key type: JSON
- Create
- Save the downloaded file to
key.json
in the root directory
- Copy and rename
googleads.example.yaml
togoogleads.yaml
- Open and edit the
googleads.yaml
file - Change
aplication_name
andnetwork_code
ad_manager:
application_name: ANYTHING
network_code: CAN_BE_FOUND_IN_THE_URL
path_to_private_key_file: ./key.json
- Copy and rename
setup.example.py
tosetup.py
- Open and edit the
setup.py
file - Change the values as needed
- The properties and values for line item creation has not been moved to a separate config yet so for now, you need to check the
src/line_items.py
file.
- After everything is setup, run the script with:
python -m run