-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add reddit pixel CDP destination #28493
base: master
Are you sure you want to change the base?
Conversation
95be0cc
to
d27f662
Compare
2d01b0c
to
d9dd697
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added a new Reddit Pixel CDP destination that enables tracking user interactions and e-commerce events through Reddit's pixel tracking system, with comprehensive test coverage using STPyV8 for JavaScript execution.
- Added
/posthog/cdp/templates/reddit/template_reddit_pixel.py
implementing standard e-commerce events (PageVisit, Search, AddToCart) with proper input validation - Added
/posthog/cdp/templates/reddit/test_template_reddit_pixel.py
with test coverage for event tracking and pixel initialization - Introduced
BaseSiteDestinationFunctionTest
inhelpers.py
for testing site destinations using STPyV8 - Added stpyv8==13.1.201.22 as a development dependency for JavaScript code execution in tests
- Integrated Reddit pixel template into CDP framework through
__init__.py
6 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile
5cb1ff2
to
9ee606a
Compare
Problem
We don't have a reddit ads CDP destination yet, and a few customers have asked for it
Changes
Add a reddit pixel destination
(A future PR will contain the back-end conversions API destination)
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Created a test page (see PostHog/posthog-js#1725) for manual testing
Added a test class which uses https://github.com/cloudflare/stpyv8 to run the JS code, testing that given events trigger the right calls