diff --git a/ruby/db/migrate/20250511151844_add_gear_setup_reminder_columns_to_users.rb b/ruby/db/migrate/20250511151844_add_gear_setup_reminder_columns_to_users.rb new file mode 100644 index 000000000..06185bbcf --- /dev/null +++ b/ruby/db/migrate/20250511151844_add_gear_setup_reminder_columns_to_users.rb @@ -0,0 +1,13 @@ + class AddGearSetupReminderColumnsToUsers < ActiveRecord::Migration + def self.up + execute "ALTER TABLE users ADD COLUMN gear_setup_reminder1_sent_at TIMESTAMP" + execute "ALTER TABLE users ADD COLUMN gear_setup_reminder2_sent_at TIMESTAMP" + execute "ALTER TABLE users ADD COLUMN gear_setup_reminder3_sent_at TIMESTAMP" + end + + def self.down + execute "ALTER TABLE users DROP COLUMN gear_setup_reminder1_sent_at" + execute "ALTER TABLE users DROP COLUMN gear_setup_reminder2_sent_at" + execute "ALTER TABLE users DROP COLUMN gear_setup_reminder3_sent_at" + end + end diff --git a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb index 193402404..9dec8cfe6 100644 --- a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb +++ b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb @@ -454,6 +454,32 @@ module JamRuby end end + + #################################### GEAR SETUP REMINDER EMAILS #################################### + def gear_setup_reminder1(user) + @user = user + mail(:to => user.email, :subject => I18n.t('user_mailer.gear_setup_reminder1.subject')) do |format| + format.text + format.html { render layout: "user_mailer_beta" } + end + end + + def gear_setup_reminder2(user) + @user = user + mail(:to => user.email, :subject => I18n.t('user_mailer.gear_setup_reminder2.subject')) do |format| + format.text + format.html { render layout: "user_mailer_beta" } + end + end + + def gear_setup_reminder3(user) + @user = user + mail(:to => user.email, :subject => I18n.t('user_mailer.gear_setup_reminder3.subject')) do |format| + format.text + format.html { render layout: "user_mailer_beta" } + end + end + #################################### NOTIFICATION EMAILS #################################### def friend_request(user, msg, friend_request_id) return if !user.subscribe_email diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder1.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder1.html.erb new file mode 100644 index 000000000..4507228a2 --- /dev/null +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder1.html.erb @@ -0,0 +1,22 @@ +

<%=I18n.t('user_mailer.gear_setup_reminder1.greeting') -%> <%= @user.first_name -%> -

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder1.paragraph1').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder1.paragraph2').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder1.paragraph3').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder1.paragraph4').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder1.regards') -%>,
+ <%=I18n.t('user_mailer.gear_setup_reminder1.signature') -%> +

\ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder1.text.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder1.text.erb new file mode 100644 index 000000000..be0d164b9 --- /dev/null +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder1.text.erb @@ -0,0 +1,12 @@ +<%=I18n.t('user_mailer.gear_setup_reminder1.greeting') -%> <%= @user.first_name -%> + +<%=I18n.t('user_mailer.gear_setup_reminder1.paragraph1') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder1.paragraph2') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder1.paragraph3') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder1.paragraph4') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder1.regards') -%>, +<%=I18n.t('user_mailer.gear_setup_reminder1.signature') -%> diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder2.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder2.html.erb new file mode 100644 index 000000000..f2382a262 --- /dev/null +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder2.html.erb @@ -0,0 +1,26 @@ +

<%=I18n.t('user_mailer.gear_setup_reminder2.greeting') -%> <%= @user.first_name -%> -

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder2.paragraph1').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder2.paragraph2').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder2.paragraph3').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder2.paragraph4').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder2.paragraph5').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder2.regards') -%>,
+ <%=I18n.t('user_mailer.gear_setup_reminder2.signature') -%> +

\ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder2.text.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder2.text.erb new file mode 100644 index 000000000..322681494 --- /dev/null +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder2.text.erb @@ -0,0 +1,14 @@ +<%=I18n.t('user_mailer.gear_setup_reminder2.greeting') -%> <%= @user.first_name -%> + +<%=I18n.t('user_mailer.gear_setup_reminder2.paragraph1') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder2.paragraph2') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder2.paragraph3') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder2.paragraph4') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder2.paragraph5') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder2.regards') -%>, +<%=I18n.t('user_mailer.gear_setup_reminder2.signature') -%> diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder3.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder3.html.erb new file mode 100644 index 000000000..d76f7ce43 --- /dev/null +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder3.html.erb @@ -0,0 +1,26 @@ +

<%=I18n.t('user_mailer.gear_setup_reminder3.greeting') -%> <%= @user.first_name -%> -

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder3.paragraph1').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder3.paragraph2').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder3.paragraph3').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder3.paragraph4').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder3.paragraph5').html_safe -%> +

+ +

+ <%=I18n.t('user_mailer.gear_setup_reminder3.regards') -%>,
+ <%=I18n.t('user_mailer.gear_setup_reminder3.signature') -%> +

\ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder3.text.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder3.text.erb new file mode 100644 index 000000000..68a6ee788 --- /dev/null +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/gear_setup_reminder3.text.erb @@ -0,0 +1,14 @@ +<%=I18n.t('user_mailer.gear_setup_reminder3.greeting') -%> <%= @user.first_name -%> + +<%=I18n.t('user_mailer.gear_setup_reminder3.paragraph1') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder3.paragraph2') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder3.paragraph3') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder3.paragraph4') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder3.paragraph5') -%> + +<%=I18n.t('user_mailer.gear_setup_reminder3.regards') -%>, +<%=I18n.t('user_mailer.gear_setup_reminder3.signature') -%> diff --git a/ruby/lib/jam_ruby/lib/gear_setup_reminder.rb b/ruby/lib/jam_ruby/lib/gear_setup_reminder.rb new file mode 100644 index 000000000..bb1f06ff5 --- /dev/null +++ b/ruby/lib/jam_ruby/lib/gear_setup_reminder.rb @@ -0,0 +1,21 @@ +module JamRuby + class GearSetupReminder + + def self.prospect_users + User.where("users.first_certified_gear_at IS NULL") + end + + def self.reminder1_users + GearSetupReminder.prospect_users.where("users.created_at > ? AND users.gear_setup_reminder1_sent_at IS NULL", 1.day.ago) + end + + def self.reminder2_users + GearSetupReminder.prospect_users.where("users.created_at > ? AND users.gear_setup_reminder1_sent_at IS NOT NULL AND users.gear_setup_reminder2_sent_at IS NULL", 3.days.ago) + end + + def self.reminder3_users + GearSetupReminder.prospect_users.where("users.created_at > ? AND users.gear_setup_reminder2_sent_at IS NOT NULL AND users.gear_setup_reminder3_sent_at IS NULL", 5.days.ago) + end + + end +end \ No newline at end of file diff --git a/web/config/locales/en.yml b/web/config/locales/en.yml index 92778cd01..5f841d9b4 100644 --- a/web/config/locales/en.yml +++ b/web/config/locales/en.yml @@ -100,3 +100,46 @@ en: update_profile: "Update Profile" regards: "Best Regards," signature: "JamKazam Team" + + gear_setup_reminder1: + subject: "Set up audio gear in JamKazam now so you can get in your first session" + greeting: "Hello" + paragraph1: "The next thing you should do with JamKazam is set up your audio gear and test it in a solo session by yourself." + paragraph2: | + If you already have an audio interface and the ability to connect your computer to your home router using an Ethernet cable, you are ready to set up your gear. You can find all of our gear setup articles here. We recommend you use our articles on setting up your audio interface for Mac or for Windows to make sure you get this critical step done properly, and that you use our article on connecting your computer via Ethernet, which is the other critical setup step. + paragraph3: | + If you’re not sure what gear you need, we recommend you start by reading this article that explains this topic in general terms. Next, check this list of articles to find the one that best describes you. You need to use an audio interface rather than relying on the built-in mic on your computer, and you need to connect your computer to your Internet router using an Ethernet cable rather than using WiFi. See this list of articles for recommendations on gear. If you’re worried about spending money on gear without knowing how well JamKazam will work for you, you can buy gear on Amazon, try it for a week, and return it for a refund if you’re not happy for a risk-free trial experience. + paragraph4: | + If you have any trouble or feel confused about gear setup, you can email us for help at support@jamkazam.com. You can also visit with a JamKazam support team member in our weekly Zoom office hours, which is offered every Wednesday from 11am to 12pm US Central Time. + regards: "Best Regards," + signature: "JamKazam Team" + + gear_setup_reminder2: + subject: "Set up your gear in JamKazam now to connect with other musicians" + greeting: "Hello" + paragraph1: "We share your profile with JamKazam members who may be a good fit to play music with you during your first week on the platform via an automated email feature. Don’t miss this opportunity to get connected!" + paragraph2: "One of the critical pieces of information in getting you connected is your latency to other musicians on JamKazam (this is the amount of time it takes to get your audio to them). To get this information, you need to set up your gear in the JamKazam app." + paragraph3: | + If you already have an audio interface and the ability to connect your computer to your home router using an Ethernet cable, you are ready to set up your gear. You can find all of our gear setup articles here. We recommend you use our articles on setting up your audio interface for Mac or for Windows to make sure you get this critical step done properly, and that you use our article on connecting your computer via Ethernet, which is the other critical setup step. + paragraph4: | + If you’re not sure what gear you need, we recommend you start by reading this article that explains this topic in general terms. Next, check this list of articles to find the one that best describes you. You need to use an audio interface rather than relying on the built-in mic on your computer, and you need to connect your computer to your Internet router using an Ethernet cable rather than using WiFi. See this list of articles for recommendations on gear. If you’re worried about spending money on gear without knowing how well JamKazam will work for you, you can buy gear on Amazon, try it for a week, and return it for a refund if you’re not happy for a risk-free trial experience. + paragraph5: | + If you have any trouble or feel confused about gear setup, you can email us for help at support@jamkazam.com. You can also visit with a JamKazam support team member in our weekly Zoom office hours, which is offered every Wednesday from 11am to 12pm US Central Time. + regards: "Best Regards," + signature: "JamKazam Team" + + gear_setup_reminder3: + subject: Don’t waste your free 30-day premium gold plan - set up your gear now! + greeting: "Hello" + paragraph1: | + When you sign up for JamKazam, we give you a free 30-day premium gold plan so you can fully experience how amazing our online sessions are and how JamKazam can help you play more music with more people to bring more musical joy to your life. + paragraph2: | + Don’t waste your 30-day window! Set up your gear in the JamKazam app now, and get started. + paragraph3: | + If you already have an audio interface and the ability to connect your computer to your home router using an Ethernet cable, you are ready to set up your gear. You can find all of our gear setup articles here. We recommend you use our articles on setting up your audio interface for Mac or for Windows to make sure you get this critical step done properly, and that you use our article on connecting your computer via Ethernet, which is the other critical setup step. + paragraph4: | + If you’re not sure what gear you need, we recommend you start by reading this article that explains this topic in general terms. Next, check this list of articles to find the one that best describes you. You need to use an audio interface rather than relying on the built-in mic on your computer, and you need to connect your computer to your Internet router using an Ethernet cable rather than using WiFi. See this list of articles for recommendations on gear. If you’re worried about spending money on gear without knowing how well JamKazam will work for you, you can buy gear on Amazon, try it for a week, and return it for a refund if you’re not happy for a risk-free trial experience. + paragraph5: | + If you have any trouble or feel confused about gear setup, you can email us for help at support@jamkazam.com. You can also visit with a JamKazam support team member in our weekly Zoom office hours, which is offered every Wednesday from 11am to 12pm US Central Time. + regards: "Best Regards," + signature: "JamKazam Team" \ No newline at end of file