A simple Node.js + TypeScript application that fetches performance reports from the Google Ad Manager (GAM) API using the SOAP interface. It supports Google OAuth2 login for authentication and demonstrates how to retrieve basic report data (impressions, clicks, etc.) from the Ad Manager network.
- Google OAuth2 authentication
- Fetches Ad Manager report via SOAP
- Supports mock data for testing without a real account
- TypeScript support
- Deployed and ready for preview
- Node.js + Express
- TypeScript
- Google APIs (
googleapis) - SOAP (via
soappackage) - OAuth2 authentication
- Render (for deployment)
git clone https://github.com/holymark/node-admanager-analytics.git
cd node-admanager-analyticsnpm installCreate a .env file with the following:
CLIENT_ID=your-google-client-id
CLIENT_SECRET=your-google-client-secret
REDIRECT_URI=http://localhost:8080/oauth2callback
JWT_SECRET=jwt-secrete
npm run devServer runs on http://localhost:8080
The tool fetches the following metrics for the past week:
- Date
- Ad Server Impressions
- Ad Server Clicks
- Ad Server CTR
- Ad Server CPM and CPC Revenue