Skip to content

feat: Gravity Conversions API server destination - #767

Open
laurentdav wants to merge 2 commits into
elbwalker:mainfrom
laurentdav:feat/destination-gravity
Open

laurentdav wants to merge 2 commits into
elbwalker:mainfrom
laurentdav:feat/destination-gravity

Conversation

@laurentdav

Copy link
Copy Markdown

Closes #766.

What

New package @walkeros/server-destination-gravity for the Gravity Conversions API (ads in AI assistants), laid out like the other HTTP destinations:

  • POST https://api.trygravity.com/gateway/events, Authorization: Bearer <apiKey>, one event per request.
  • Mapped name → event_name (standard or custom), event_time in seconds, event_id = walkerOS id (Gravity dedups on id + name for 48 h), action_source (default website), event_source_url (default event.source.url).
  • Mapped data: email / phone → user_data.em / ph (normalised, SHA-256, existing digests kept), external_id, the Gravity click parameters (grclid, grcpid, grpuid, gradid, grsig, graid, oppref), client_context, value / currency (default USD) / order_id → custom_data.
  • Client IP and user agent from ingest / event.user by default (ip, userAgent settings).
  • An error status inside the 200 answer fails the push (not retried); invalid value or currency fail with mapping before any request.
  • Settings: apiKey, action_source, test_event_code, url, ip, userAgent.

Also: docs page, sidebar and marketing-tools index rows, website dependency, changeset (minor).

Verify

npm run verify:touched -- server-destination-gravity: typecheck, lint, conformance, 3 step examples + silent rule, 12 unit tests. walkerOS.json builds.

We run a vendored version of this destination on our own walkerOS server flow; this PR is that code ported to the monorepo conventions.

🤖 Generated with Claude Code

Closes elbwalker#766

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: edd2a734-1e1f-47bd-ab34-e8ab9abb3b8d
Commits

Reviewing files that changed from the base of the PR and between dedbdf7 and e7261cc.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 26

  • .changeset/gravity-server-destination.md
  • packages/server/destinations/gravity/README.md
  • packages/server/destinations/gravity/jest.config.mjs
  • packages/server/destinations/gravity/package.json
  • packages/server/destinations/gravity/src/__tests__/conformance.test.ts
  • packages/server/destinations/gravity/src/__tests__/index.test.ts
  • packages/server/destinations/gravity/src/__tests__/stepExamples.test.ts
  • packages/server/destinations/gravity/src/config.ts
  • packages/server/destinations/gravity/src/dev.ts
  • packages/server/destinations/gravity/src/examples/env.ts
  • packages/server/destinations/gravity/src/examples/index.ts
  • packages/server/destinations/gravity/src/examples/minimal.ts
  • packages/server/destinations/gravity/src/examples/step.ts
  • packages/server/destinations/gravity/src/index.ts
  • packages/server/destinations/gravity/src/push.ts
  • packages/server/destinations/gravity/src/schemas/index.ts
  • packages/server/destinations/gravity/src/schemas/mapping.ts
  • packages/server/destinations/gravity/src/schemas/primitives.ts
  • packages/server/destinations/gravity/src/schemas/settings.ts
  • packages/server/destinations/gravity/src/types/index.ts
  • packages/server/destinations/gravity/tsconfig.json
  • packages/server/destinations/gravity/tsup.config.ts
  • website/docs/destinations/index.mdx
  • website/docs/destinations/server/gravity.mdx
  • website/package.json
  • website/sidebars.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

- phone values that normalise to nothing are dropped before hashing
- client IP / user agent mappings get the event and the event's consent
- docs: no promise of automatic retries

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New server destination: Gravity Conversions API (ads in AI assistants)

1 participant