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

"New member joined your organization" email #3509

Merged
merged 16 commits into from
May 24, 2021
Merged

Conversation

Twixes
Copy link
Collaborator

@Twixes Twixes commented Feb 26, 2021

Changes

These Metabase emails got me inspired, I just could not resist. This adds a similar email that is sent to all organization members when a new member joins from an invite (obviously besides that new member themselves). Two benefits:

  • if an unexpected (malicious?) user joins, people get notice
  • people are nudged into coming back to PostHog, perhaps to discover something, driving retention

Sadly I have problems receiving the email locally despite everything seeming in order… mind taking a look @paolodamico?

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests

@timgl timgl temporarily deployed to posthog-someone-else-jo-yb2nat February 26, 2021 18:18 Inactive
Copy link
Contributor

@paolodamico paolodamico left a comment

Choose a reason for hiding this comment

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

👏 100% on board with this! Will be very helpful in terms of security & engagement.

I'm thinking we could simplify the workflow a little bit here, let me know your thoughts. Instead of adding another attribute used_at and keeping all these invite records, we could simply fire a celery task (with proper retry handling) that contains the invite ID for use as campaign_key. I don't think there's a ton of value on keeping the invite records and adds more stuff to maintain.

In terms of the email here are my thoughts (ignore the missing images, localhost thing),

  • I'm not sure about having the person who created the invite in there, think it may be leaking info out of PostHog, can even be interpreted as a bit accusatory, and the info is available in PostHog if you need it.
  • I think the main CTA should be something more valuable on PostHog. For instance, we could prompt users to go to their dashboards to share some of them with the new member. At least I think this should just take you to PostHog home.
  • Related to the above, we can change the members list to a secondary CTA. Something like, "To see the current member list for Hogflix Movies click here".
  • Visually I think using the avatar thing in there (the one we use in the top navigation bar) would make it even more clear what's going on and who joined.
  • I'm thinking the subject line should be "Bob just joined you on PostHog" (i.e. remove the org name), think it might be too much for the subject line, and the line does read confusing at first.
  • This is a more general comment for emails, but maybe worth adding something in the footer like: "This email is intended for {email} at Hogflix Movies".

@Twixes Twixes mentioned this pull request Mar 26, 2021
5 tasks
@mariusandra mariusandra mentioned this pull request May 7, 2021
@Twixes Twixes self-assigned this May 8, 2021
@Twixes Twixes requested a review from paolodamico May 19, 2021 21:40
@Twixes
Copy link
Collaborator Author

Twixes commented May 19, 2021

Thanks a lot for the feedback! Finally got to prioritize this, so I addressed the points, added tests, and did some refactoring.

Replying to points:

  1. Alright, removed inviting user from email.
  2. Replaced the CTA with a general "View PostHog insights" one. Should be more valuable.
  3. Didn't add a secondary CTA, I think we should keep this simple.
  4. Didn't add the avatar. This can be an improvement for a future PR, but it'd be additional work to get it in without React (which we rely on in the app), and ultimately it wouldn't be worth it as in most cases there'd be no Gravatar for a company email, leaving us with just the initial letter.
  5. Simplified the subject line.
  6. Appreciate the idea with adding the intended recipient email to the footer, but in this case particularly it's not feasible, as the email is mass sent. I don't think that'd we valuable enough to generate multiple personal versions really TBH.

@Twixes
Copy link
Collaborator Author

Twixes commented May 19, 2021

This is what such an email looks like now:

example

Copy link
Contributor

@paolodamico paolodamico left a comment

Choose a reason for hiding this comment

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

minor comments but lgtm!

)
# Don't send this email to the new member themselves
members_to_email = tuple(organization.members.exclude(email=invitee.email))
if members_to_email:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need either the conversion to tuple or the check on whether it's truthy. If the queryset is empty, it will simply not add any recipients in the for loop.

{{ invitee.first_name }} (<a href="mailto:{{ invitee.email }}">{{ invitee.email }}</a>) just joined you at {{ organization.name }}.
</p>
<p>
PostHog is a product analytics platform made to help you understand your users.<br/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Only comment: I would remove this line. If you're getting this message, you already know what PostHog is.

@Twixes Twixes merged commit 627c043 into master May 24, 2021
@Twixes Twixes deleted the someone-else-joined-email branch May 24, 2021 17:09
@Twixes Twixes added the highlight ⭐ Release highlight label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
highlight ⭐ Release highlight
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants