I'm having some trouble wrapping my head around how this JS API works for custom events.
Before I explain what I've done, why don't I explain what I'm trying to do.
We have a webapp that allows users to create surveys. Whenever a user creates a new survey, I would like to add an event to that Contact's timeline and also increment a surveys_launched count on the Contact record.
I've created an event in Reports > Analytics Tools called "Launched A Survey". I saved it and then grabbed the unique id for it. I did not add any code to the Custom JS field because I don't want this code to fire when the HS tracking code loads. I only want it to fire after our server responds with a 200 (i.e. the survey was created successfully).
In our codebase, when we do get a successful server response, I pasted this code in:
Where '000006701463' corresponds to the "Launched A Survey" event.
Am I missing something here?