Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

fill the data field in analytics events #31

Merged
merged 2 commits into from
Oct 9, 2023
Merged

fill the data field in analytics events #31

merged 2 commits into from
Oct 9, 2023

Conversation

xvello
Copy link
Contributor

@xvello xvello commented Oct 9, 2023

This PR brings payload equivalence with capture.py for payloads sourced from the latest posthog-js version:

  • check that the event name is not empty
  • add the missing optional timestamp, offset, $set and $set_once toplevel fields
  • serialize the RawEvent in the output data field
  • set the skip_serializing_if = "Option::is_none" serde annotation where relevant
  • make it_matches_django_capture_behaviour unmarshall both data and compare the object instead of the byes
  • un-ignore it_matches_django_capture_behaviour as it now passes 🎉
  • allow to ommit theRawEvent.properties field in requests, default to an empty dict if not set

@xvello xvello marked this pull request as ready for review October 9, 2023 16:25
@xvello xvello requested a review from ellie October 9, 2023 16:27
@ellie ellie merged commit 7e74df8 into main Oct 9, 2023
4 checks passed
@ellie ellie deleted the xvello/data branch October 9, 2023 17:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants