tap-applovin
is a Singer tap for applovin.
Built with the Meltano Tap SDK for Singer Taps.
- Leverages the
report
endpoint from the Applovin API in order to grab hourly summaries of ad performance by campaign, creative, country, and platform. - Configure the date range you want to grab data from using the
report_range_days
config variable. - Built with the Singer SDK for extensibility and Meltano compatibility.
-
Python 3.9+
-
Applovin API key
-
Singer SDK
-
Meltano (optional, for pipeline orchestration)
- Clone the repository:
git clone https://github.com/yourusername/tap-applovin.git
cd tap-applovin
- Install the dependencies:
poetry install
- Activate the Poetry virtual environment:
poetry shell
- Create a config.json file with the following structure:
{
"api_key": "YOUR_APPOVIN_API_KEY",
"report_range_days": 30
}
-
api_key
: Your Applovin API key. -
report_range_days
: Number of days of data to fetch (e.g., 30 for the last 30 days).
- Place config.json in the root directory or pass its path as an argument when running the tap.
- Run the tap standalone:
poetry run python -m tap_applovin --config config.json
- Use with Meltano for pipeline orchestration:
- Add the tap to your Meltano project:
meltano add extractor tap-applovin
- Configure the tap in meltano.yml:
extractors:
tap-applovin:
config:
api_key: YOUR_APPOVIN_API_KEY
report_range_days: 30
- Run the tap via Meltano:
meltano run tap-applovin target-your-target
A full list of supported settings and capabilities for this tap is available by running:
tap-applovin --about
This Singer tap will automatically import any environment variables within the working directory's
.env
if the --config=ENV
is provided, such that config values will be considered if a matching
environment variable is set either in the terminal context or in the .env
file.
Testing with Meltano
Next, install Meltano (if you haven't already) and any needed plugins:
# Install meltano
pipx install meltano
# Initialize meltano within this directory
cd tap-applovin
meltano install
Now you can test and orchestrate using Meltano:
# Test invocation:
meltano invoke tap-applovin --version
# OR run a test `elt` pipeline:
meltano run tap-applovin target-jsonl
The streams.py file provides the main logic for fetching and processing data. Key points of customization include:
-
Columns: Update the columns list to fetch additional fields.
-
Date Range: Modify the date_range method to adjust date partitioning.
-
API Parameters: Customize the get_url_params method to include additional query parameters.
- Install development dependencies using Poetry:
poetry install --with dev
- Run tests:
poery run pytest
See the dev guide for more instructions on how to use the SDK to develop your own taps and targets.