-
Notifications
You must be signed in to change notification settings - Fork 8
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: flask and django simple example #22
Conversation
bohan-amplitude
commented
May 2, 2022
- a flask simple app
- a django simple app
- Does your PR title have the correct title format?
- Does your PR have a breaking change?: no
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.
Can you please add README to each example. Ideally the README should assume zero knowledge of Python or Amplitude so any developer can get up and running from scratch.
See ampli-examples for samples:
https://github.com/amplitude/ampli-examples/tree/main/node/typescript
|
||
|
||
def track_event(request): | ||
client.track(BaseEvent("Page Loaded", user_id="django_example_user")) |
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.
I wonder if we can provide more examples, covering identify, setGroups and groupIdentify, track with event type and track with event properties. If possible, a sample enrichment plugin.
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.
+1
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.
Added more examples to cover identify, group_identify, revenue, set_group, plugins
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.
Should we add example usage in each example? Right now I only see it in track_example.
|
||
|
||
def track_event(request): | ||
client.track(BaseEvent("Page Loaded", user_id="django_example_user")) |
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.
+1
|
||
|
||
def track_event(request): | ||
client.track(BaseEvent("Page Loaded", user_id="django_example_user")) |
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.
Should we add example usage in each example? Right now I only see it in track_example.