Skip to content

feat(ads): pixels, conversions API and custom conversions - #39

Merged
alihesari merged 6 commits into
mainfrom
feature/ads-tracking
Oct 18, 2026
Merged

alihesari merged 6 commits into
mainfrom
feature/ads-tracking

Conversation

@alihesari

Copy link
Copy Markdown
Member

What changed

  • HttpClient.request/post accept per-request headers (needed for Idempotency-Key).
  • ads.upload_conversions takes an optional idempotency_key and now returns ConversionUploadResult (id, accepted, event_count, replayed) instead of a dict. Noted under Changed in the changelog.
  • New ads.send_conversions(..., idempotency_key=...) for POST /v1/ads/conversions/events. Named send_conversions because ads.send_conversion_events(rule_id, ...) already exists for LinkedIn conversion rules and renaming it would break callers.
  • ads.conversion_batches, pixels (pixels, create_pixel, get_pixel, update_pixel, share_pixel, pixel_stats, event_match_quality) and custom conversions (custom_conversions, create_custom_conversion, get_custom_conversion, update_custom_conversion, delete_custom_conversion).
  • Models and enum tuples exported from fopost. README table and CHANGELOG (Unreleased) updated.

Tests

uv run ruff check . && uv run ruff format --check . && uv run mypy && uv run pytest: all pass, 213 tests. New tests/test_ads_tracking.py covers the idempotent send (header sent, replay parsed), a pixel read, and a custom conversion create.

Owed

  • No version bump, no tag (releases are batched).
  • fopost-django and fopost-fastapi only pin fopost>=0.1,<1.0 and do not touch ads, so no downstream PR.

@alihesari
alihesari merged commit 6b12d99 into main Oct 18, 2026
4 checks passed
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.

1 participant