Repository navigation
feat(ads): pixels, conversions API and custom conversions - #39
Merged
Merged
Conversation
# Conflicts: # CHANGELOG.md # src/fopost/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
HttpClient.request/postaccept per-requestheaders(needed forIdempotency-Key).ads.upload_conversionstakes an optionalidempotency_keyand now returnsConversionUploadResult(id,accepted,event_count,replayed) instead of a dict. Noted under Changed in the changelog.ads.send_conversions(..., idempotency_key=...)forPOST /v1/ads/conversions/events. Namedsend_conversionsbecauseads.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).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. Newtests/test_ads_tracking.pycovers the idempotent send (header sent, replay parsed), a pixel read, and a custom conversion create.Owed
fopost-djangoandfopost-fastapionly pinfopost>=0.1,<1.0and do not touchads, so no downstream PR.