https://github.com/parameter1/leads-gam
A GAM/DFP microservice for Lead Management
https://github.com/parameter1/leads-gam
limit0
Last synced: about 1 year ago
JSON representation
A GAM/DFP microservice for Lead Management
- Host: GitHub
- URL: https://github.com/parameter1/leads-gam
- Owner: parameter1
- License: mit
- Archived: true
- Created: 2019-02-04T15:38:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-21T19:17:49.000Z (over 1 year ago)
- Last Synced: 2025-02-21T05:30:03.536Z (over 1 year ago)
- Topics: limit0
- Language: PHP
- Size: 45.9 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Leads GAM/DFP Microservice
## Installation / Development
_Note:_ all commands should be run from the project root.
- Clone the repository
- Build the Docker image (only needs to be done once) by running `docker-compose build app`
- Install dependencies by running `scripts/composer.sh install`
- Create a `.env` file in the project root with the required environment variables (see below)
- Run the service container by running `docker-compose up app`
The service should now be available on `http://localhost:9017`
### Required Enviroment Variables
```sh
# The Google Ad Manager network code, e.g. 123456789
NETWORK_CODE=
# Must be an absolute path
JSON_KEY_FILE_PATH=
```
## Endpoints
### `/`
Returns a simple "ping/pong" JSON response:
```json
{
"ping": "pong"
}
```
### `/_health`
Runs a "health" check by connecting to the configured Google Ad Manager network (based on the `NETWORK_CODE` env var):
```json
{
"name": "[your network name]",
"code": "[your network code/id]"
}
```
### `/creative-detail/{lineitem-id}/{creative-id}`
Returns creative, line item, and order details for the provided `lineitem-id` and `creative-id`:
```json
{
"creative":{
"id": "138258373333",
"name": "Gateway_IENNow_Preroll_720",
"type": "Video",
"width": 1280,
"height": 720,
"previewUrl": null,
"advertiser": {
"id": "4686420190"
},
"order": {
"id": "2476022764",
"name": "Gateway_IENNow_Prerolls"
},
"lineitem": {
"id": "4934467878",
"name": "Gateway_IENNow_Preroll",
"metrics": {
"impressionsDelivered": 3761,
"clicksDelivered": 33,
"videoCompletionsDelivered": 1978,
"videoStartsDelivered": 3761,
"viewableImpressionsDelivered": 0
},
"startDate": 1548432960000,
"createdDate": 1548432850000,
"updatedDate": 1548437963000
},
"vastPreviewUrl": "[a long preview url]",
"updatedDate": 1549298413000
}
}
```