Solved

Code a Custom Event and Connect to Sign-Up Form Submission

  • 4 March 2022
  • 1 reply
  • 790 views

Badge +2

Hello!  I'm looking for direction when it comes to coding a custom event and making it so that when someone fills out one of my sign-up forms, it triggers that event and passes event data to the user’s profile.

I’m not a developer but I’m trying to get a handle on what exactly needs to be done (and if this is the right approach), so I can find someone to help me.

Here’s a little more context...

When someone buys one of our products on Amazon or another similar marketplace, we invite them to come register their product on our website.  We collect info like Email, Name, Product Registered, Order Number, etc. 

A regular Klaviyo sign-up form will work for someone’s first prodct registration.  But if they register a second time, it will override the data from the first submission.

We need to set it up so that someone can register a second (and third and fourth) product without overriding the existing values for each custom property.

Klaviyo support has suggested that I code a custom event for when someone is wanting to register a product and pass event data from there.

They said their /track endpoint would be how you build a custom metric: https://developers.klaviyo.com/en/reference/track-post

I’d be so grateful if you could offer some direction so I know what I need to do.

THANK YOU!!

Doug

icon

Best answer by alex.hong 4 March 2022, 23:22

View original

1 reply

Userlevel 7
Badge +58

Hi there Doug @copywriter789 ,

Thanks for posting to the Community.

I believe you are adding the $source field on form submission to add a property to a profile to collect data on where a user is coming from. You are right that the $source field is one that will always reflect the newest signup form they came in through and will be overwritten each time, so you aren't able to use the source to track more than one signup. However, you can add additional hidden fields to Klaviyo signup forms so that you have different values that do not overwrite each other. You can set these additional hidden fields to appear on form submission. 

You’re on the right track to utilizing custom metrics and I’d love to hear what feedback you received from support. Even better, you could reach out to them again and get advice since they can see more details about your account and give you a tailored approach.

I think using the track API would be a great idea. However, since you will be building a custom form I would recommend checking out our Partner Portal to find a dev to work with, or hopefully a community member can assist here!

 

All the best,

Alex

Reply