Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
Event on click only when user sign up successful ruby on rails

I have an event snippet for log sign-ups in my ruby on rails project. When a user creates an account (click on sign up) it will load the javascript with the snippet, but I want to load the javascript only when the user makes the account successful

Script:

<script>
 function googleAnalytics() {
   console.log("google analytics snippet loaded");
 }
</script>

html.erb file:

<%= button_tag f.submit t('sign_up'), type: 'button', onclick: 'googleAnalytics()', class: 'btn w-full' %>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!