Solved

Possible to write a track event on form submit?

  • 5 January 2022
  • 1 reply
  • 17 views

Badge

The use case here is the collection of NPS scores. Upon order completion we are sending an email with NPS score buttons. When a button is clicked, the user is taken to a Klaviyo custom page where the NPS score is preselected and a text field is available for them to leave a comment. Once they write their comment and hit submit we’d like to capture the user email, order number, nps score and comment in an event so the data is available to pull out via FiveTran for aggregation in an external system. 

I’m not a developer but was hoping to take a crack at this myself if it is indeed possible and someone on the Klaviyo side can provide some sample code for the form action. 
 

 

icon

Best answer by David To 5 January 2022, 17:29

View original

1 reply

Userlevel 6
Badge +43

Hello @bmask.

Thanks for being a part of the Klaviyo Community!

Having a custom event recorded and tracked after a form has been submitted has been explored by other Community members and certainly is possible! Similar to what @jallain had mentioned in the below Community post, because form submissions should already be leveraging and passing the _learnq function of identifying your users, you can then set up any corresponding custom event to record based on this identified user. 

Since this behavior and action would be custom, I advise working with a developer you are familiar with or finding an accredited Klaviyo Partner to further assist in setting this up. If you haven’t already, I also suggest taking a look at some of the helpful resources Klaviyo offers on building your own custom events and leveraging its API from the Help Center articles and documentations below:

I hope this helps!

David

Reply