03 — Deployment & Management
This document defines how to deploy the Adventive Looker Studio connector, manage versioning, publish to the marketplace, and roll back. The connector runs entirely as a Google Apps Script project — there is no server infrastructure to manage.
Prerequisites
Section titled “Prerequisites”- Node.js (v18+) and npm — required to install
clasp clasp— Google’s command-line tool for Apps Script projects- Google account — must be a project owner or editor on the Apps Script project
Install clasp
Section titled “Install clasp”npm install -g @google/claspclasp loginclasp login opens a browser OAuth flow. Use the Google account that owns the Apps Script project. Credentials are stored in ~/.clasprc.json.
Clone credentials
Section titled “Clone credentials”After first login, authenticate against the Apps Script project:
cd /path/to/google-data-studio-connector.gitclasp clone <SCRIPT_ID>The SCRIPT_ID is found in the Apps Script editor: Project Settings → Script ID. This creates a .clasp.json file in the repository root. Do not commit .clasp.json — it is in .gitignore.
Environments
Section titled “Environments”The connector has one production Apps Script deployment. There is no built-in environment promotion (unlike Cloudflare Workers). The recommended pattern is to maintain two separate Apps Script projects:
| Environment | Purpose | Who uses it |
|---|---|---|
staging | Verify changes before publishing | Engineering only |
production | Live marketplace deployment | All paying customers |
Each environment has its own SCRIPT_ID. Store them in a local .env or use separate .clasp.json files:
# Switch to stagingcp .clasp.staging.json .clasp.json && clasp push
# Switch to productioncp .clasp.production.json .clasp.json && clasp pushNever push directly to production without staging verification first.
Deploy flow
Section titled “Deploy flow”Standard deploy
Section titled “Standard deploy”1. Make changes in the repository2. Push to staging clasp push (with .clasp.json pointing to staging script ID)
3. Verify in staging (see Verification below)
4. Create a new deployment version in staging: clasp deploy --description "v<version> — <summary>"
5. Push to production cp .clasp.production.json .clasp.json clasp push
6. Create a new deployment version in production: clasp deploy --description "v<version> — <summary>"
7. Update the marketplace listing if the description or name changed (See Marketplace publishing below)Pushing changes
Section titled “Pushing changes”clasp pushThis uploads all .gs and appscript.json files from the local repository to the linked Apps Script project. It does not create a new versioned deployment — users on the connector continue to use the last published version until step 6.
Creating a versioned deployment
Section titled “Creating a versioned deployment”clasp deploy --description "v1.1.0 — Fix JSON parse bug, update to Looker Studio branding"This creates a numbered version in Apps Script (v1, v2, v3…). Each version can be independently deployed via the Looker Studio marketplace. Keep a mapping of version numbers to semantic versions in CHANGELOG.md.
Viewing existing deployments
Section titled “Viewing existing deployments”clasp deploymentsOutput example:
- AKfycbw... @1 - Initial- AKfycbx... @2 - v1.1.0 — Fix JSON parse bugVerification after deploy
Section titled “Verification after deploy”After pushing to staging and creating a new deployment, run through this checklist manually:
1. Open Looker Studio (lookerstudio.google.com)2. Create a new report → Add data → Search for "Adventive Ads for Looker Studio"3. Select the staging deployment if prompted4. Enter a valid Integration Key + API Key - Expected: "Connected" confirmation, no error5. Enter an invalid API Key - Expected: "Invalid credentials" error from Looker Studio - NOT expected: a generic error or spinner that never resolves6. Configure a date range with known data (use a recent 7-day window) - Expected: data appears in the table7. Add a second chart with different fields - Expected: data appears correctly, no empty columns8. Refresh the report (force cache miss by using a different date range) - Expected: data loads within ~5 seconds; no error9. Check Cloud Logging (console.cloud.google.com → Logging → Log Explorer) - Expected: log entries for date range, no credential values visibleMarketplace publishing
Section titled “Marketplace publishing”The connector is listed in the Looker Studio connector gallery. Updating the marketplace listing requires a separate step after deploying a new version.
Update a published connector
Section titled “Update a published connector”- Go to Google Workspace Marketplace SDK in the Cloud Console for the Apps Script project.
- Navigate to App Configuration → Looker Studio connectors.
- Select the target deployment version from the dropdown.
- Save. The updated version is now active for new connector configurations. Existing report users are not affected until they re-authorize or re-configure.
When to republish
Section titled “When to republish”- Any change to
appscript.json(name, description, OAuth scopes) - Any change to the authentication flow
- Any change to
getConfig()orgetSchema()that affects the user-facing setup
Purely backend changes (data fetching, caching) do not require republishing — they take effect immediately after clasp push and clasp deploy.
Version management
Section titled “Version management”Use semantic versioning (MAJOR.MINOR.PATCH) with a CHANGELOG.md at the repository root.
| Increment | When |
|---|---|
| PATCH | Bug fixes, security fixes, comment updates |
| MINOR | New fields added to the schema, non-breaking behavior changes |
| MAJOR | Auth type change, schema field removals, breaking API changes |
Tag each release in git:
git tag v1.1.0 -m "Fix JSON parse bug, Looker Studio branding, security fixes"git push origin v1.1.0Rollback
Section titled “Rollback”Apps Script does not have an instant rollback command equivalent to wrangler rollback. Rollback is a re-deploy of the previous version.
Rollback procedure
Section titled “Rollback procedure”# 1. Find the last known-good commitgit log --oneline
# 2. Check out that commit to a temp branchgit checkout <commit_sha> -b rollback/v<version>
# 3. Push to the affected environmentclasp push
# 4. Create a new deployment version with a rollback noteclasp deploy --description "ROLLBACK to v<version>"
# 5. Verify using the checklist above
# 6. If rolling back production, immediately post to the platform channel# documenting what was reverted and whyDo not delete the broken deployment version — preserve it for post-mortem analysis.
Credential management
Section titled “Credential management”User credentials (Integration Key + API Key)
Section titled “User credentials (Integration Key + API Key)”- Stored in
PropertiesService.getUserProperties()per user - Engineers cannot access or reset individual user credentials
- Users can reset their own credentials by going to the connector configuration in their Looker Studio report and clicking “Edit connection”
Connector credentials (Apps Script project access)
Section titled “Connector credentials (Apps Script project access)”- Managed via
clasp login/~/.clasprc.json - Only project owners and editors can push code
- Rotate access by removing the account from the Apps Script project and re-running
clasp loginwith the new account
Deploy freezes
Section titled “Deploy freezes”Do not deploy to production during:
- Active Adventive platform incidents
- End-of-quarter close (last 3 business days of the quarter)
- Major client campaign launches (announced ≥ 24 hours in advance)
Freeze announcements go in the platform Slack channel. Break-glass deploys during a freeze require written approval from the Platform lead in the same channel before proceeding.
Next: 04 — Runbook