Title: Tracking Registration Event
Last modified: June 19, 2020

---

# Tracking Registration Event

 *  Resolved [shaniz](https://wordpress.org/support/users/shaniz/)
 * (@shaniz)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/)
 * Hi,
 * I need to track GA event when the registration is successful. Can I know a listener
   event or any other option to track the successful registrations?

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Support [Aswin Giri](https://wordpress.org/support/users/aswingiri/)
 * (@aswingiri)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13019573)
 * [@shaniz](https://wordpress.org/support/users/shaniz/) You can user this hook
   to run a function after registration is complete. Please check the sample code
   and change it accordingly.
 * add_action( ‘um_registration_complete’,function($user_id, $args){
    // your code
   goes here, $user_id is the id of the newly added user. },10,2);
 * Hope this works for you.
 *  Thread Starter [shaniz](https://wordpress.org/support/users/shaniz/)
 * (@shaniz)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13022370)
 * [@aswingiri](https://wordpress.org/support/users/aswingiri/) So is it possible
   to add a javascript with scripts tag inside this hook?
 *  Plugin Support [Aswin Giri](https://wordpress.org/support/users/aswingiri/)
 * (@aswingiri)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13022433)
 * You can always add javascript with hook
 * add_action(‘wp_footer’,function(){
 * });
 *  Thread Starter [shaniz](https://wordpress.org/support/users/shaniz/)
 * (@shaniz)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13022473)
 * [@aswingiri](https://wordpress.org/support/users/aswingiri/) But I need to track
   the successful registrations and trigger a event to google analytics. So I cannot
   user the wp_footer to add my javascript. Isn’t this possible?
 *  Plugin Support [Aswin Giri](https://wordpress.org/support/users/aswingiri/)
 * (@aswingiri)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13022480)
 * You can write javascript with in action callback.
 *  Thread Starter [shaniz](https://wordpress.org/support/users/shaniz/)
 * (@shaniz)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13022523)
 * [@aswingiri](https://wordpress.org/support/users/aswingiri/) So it means that
   I need to edit the plugin core?
 *  Plugin Support [Aswin Giri](https://wordpress.org/support/users/aswingiri/)
 * (@aswingiri)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13022528)
 * [@shaniz](https://wordpress.org/support/users/shaniz/) No, you dont need to edit
   plugin core. You just have to hook it to action hook. Like in the example below:
 * add_action( ‘um_registration_complete’,function($user_id, $args){
    ?> <script
   > alert(‘Hello’); </script> <?php },10,2);
 * But remember this script will be included on page when this action triggers.
 *  Thread Starter [shaniz](https://wordpress.org/support/users/shaniz/)
 * (@shaniz)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13023103)
 * [@aswingiri](https://wordpress.org/support/users/aswingiri/) This alert is not
   working once I added this. But when I added some php codes inside the action 
   then it is working
 *  Plugin Support [Aswin Giri](https://wordpress.org/support/users/aswingiri/)
 * (@aswingiri)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13023172)
 * I think you should just add js to wp_footer action
 *  Thread Starter [shaniz](https://wordpress.org/support/users/shaniz/)
 * (@shaniz)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13023236)
 * [@aswingiri](https://wordpress.org/support/users/aswingiri/) Yes I can run the
   script in the wp_footer action but it is not possible to track the successful
   registration if I do not run it within the um_registration_complete action.
 * Below is the code I need to run.
    ga(‘send’, { hitType: ‘event’, eventCategory:‘
   Register Form’, eventAction: ‘register’, eventLabel: ‘register’ });
 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13227647)
 * Hi [@shaniz](https://wordpress.org/support/users/shaniz/)
 * Sorry for the late response. Could you please tell us if you’re still having 
   issues?
 * Please feel free to re-open this thread if there’s any question that may come
   up.
 * Regards,

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Tracking Registration Event’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/tracking-registration-event/#post-13227647)
 * Status: resolved