Skip to content
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

Merged
merged 6 commits into from
May 11, 2022

Conversation

bohan-amplitude
Copy link
Contributor

  1. a flask simple app
  2. a django simple app
  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

Copy link
Contributor

@justin-fiedler justin-fiedler left a 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"))
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

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

Copy link
Contributor

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.

examples/README.md Outdated Show resolved Hide resolved


def track_event(request):
client.track(BaseEvent("Page Loaded", user_id="django_example_user"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

examples/README.md Outdated Show resolved Hide resolved
examples/django_example/README.md Show resolved Hide resolved


def track_event(request):
client.track(BaseEvent("Page Loaded", user_id="django_example_user"))
Copy link
Contributor

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.

@bohan-amplitude bohan-amplitude merged commit c71b8e0 into amplitude:main May 11, 2022
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.

None yet

3 participants