JS API/Activity Log

Human-Decode
Level 1

JS API/Activity Log

Hello Marketo Community,

 

I hope this message finds you well.

 

I am currently working on integrating Marketo using its JavaScript API, specifically through the method submit as described in the API reference (https://developers.marketo.com/javascript-api/forms/api-reference/). My goal is to track and debug form submissions.

 

I would like to know if there is an interaction log accessible from the Marketo dashboard that records form submissions and any associated errors. Having access to such logs would greatly assist in diagnosing and resolving any issues that arise during the submission process.

 

If such a log does not exist, is the only way to register errors by using the onError callback and implementing our own logging platform? Any insights or recommendations on the best practices for this would be greatly appreciated.

 

Thank you in advance for your assistance!

 

Best regards,
Javi from Human Decode

Tags (4)
7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: JS API/Activity Log

It would be better if you defined in full detail what you’re trying to do when onSubmit is fired. onSubmit fires before anything is put on the wire, and any onSubmit listener can abort submission.

 

The Marketo Activity Log records successful form fills, including the original form data. By definition, it can’t record form posts that never happen, and malformed payloads are also not reflected since they would not be allowed to update leads. (Note that a form submission may not update any lead fields; an existing person whose fields are all blocked from updates will have a Filled Out Form activity but no other effects.)

Human-Decode
Level 1

Re: JS API/Activity Log

Hi Sandford,

 

Thank you for your response.

 

To provide more context, this issue is occurring with a Marketo integration in Unbounce. The problem we're facing is that some leads are not being sent to Marketo despite the Unbounce form submission being successful.

 

The onSuccess callback fires without any issues, and our Marketo implementation seems correctly configured. However, since this issue is intermittent, it has been challenging to diagnose the exact cause.

 

I understand that the Marketo Activity Log only records successful form fills and does not capture malformed payloads or form posts that never happen. Given this, I'm looking for any way to obtain more detailed logs or records of form submission errors. This information would help us identify why some submissions are not being processed correctly and allow us to compare these instances against Unbounce lead reports.

 

I've implemented my own error handling based on your article Adding a Network/Server Error Handler to Marketo Forms, and we will probably use this to log issues into another platform. However, I would like to know if Marketo provides tools to capture such information directly, so we don't have to rely on a third party unnecessarily.

 

Any guidance or suggestions on how to capture this information would be greatly appreciated.

Thank you for your assistance.

 

Best regards,
Javi

SanfordWhiteman
Level 10 - Community Moderator

Re: JS API/Activity Log

Are you saying you have directly observed a situation in which the onSuccess fires yet no Filled Out Form activity is logged on any Marketo lead? That’s effectively impossible unless there’s a widespread outage. And not sure why logging in onSubmit or onError would help you there: if there’s an onSuccess, that tells you when something was attempted and what data was posted.

 

What code are you using to integrate with Unbounce and are you 100.00% sure it doesn’t have a race condition that causes it to simply not fire at all under some circumstances (i.e. there isn’t actually an onSuccess).

Human-Decode
Level 1

Re: JS API/Activity Log

Hi,

 

Thank you for your suggestions and I understand your concern, but I believe we are deviating from the focus of my original question. As I mentioned, we have observed cases reported by the client where Unbounce records a lead, but Marketo does not. I am trying to obtain more tools to be able to track when this happens.

 

I understand that if onSuccess fires, the process should work correctly. I mentioned that I am using the submit method from the Form Methods, not onSubmit. What I need to know is if there is an accessible error log in your application. I have already verified everything you mentioned, and I can assure you that the code does not have race conditions and fires correctly.

My specific request is to have access to an error log so that we can identify and record scenarios where intermittent failures might occur, such as the widespread outage you mentioned. This will allow us to have a more precise tracking mechanism in case any unexpected issues arise.

 

I appreciate your help and look forward to your response regarding the availability of an accessible error log.

 

Best regards,
Javi

SanfordWhiteman
Level 10 - Community Moderator

Re: JS API/Activity Log

There’s no HTTP-level log available.

 

You should link to the page so we can look at your integration code.

Human-Decode
Level 1

Re: JS API/Activity Log

Hi there,

 

Thank you for your response. Our implementation has been successfully sending data for quite some time and has undergone multiple tests to ensure its reliability. We suspect that the issue may be an intermittent error occurring between the form submission on Unbounce and the execution of the code that sends those values to Marketo.

The values are sent to Marketo through Unbounce's afterFormSubmit method. You can find more details here.

To better diagnose the issue, we are considering adding an error logging service as described in this article: Adding a Network/Server Error Handler to Marketo Forms.

Thank you again for your assistance.

 

Best regards,
Javi

SanfordWhiteman
Level 10 - Community Moderator

Re: JS API/Activity Log

We’d have to see your page and all the code you’ve written. It’s a near certainty that the error is in how you’re calling the Forms 2.0 JS API and not a bug in the API itself.

 

As such, an HTTP-level log is not what you need, you need deeper code analysis and wider test cases.