SOLVED

Javascript help - Is this possible?

Go to solution
Taylor_McCarty
Level 4

So is this possible and how difficult would it be for a javascript dev to write the code?

 

So there is some history and back and forth that lead to the predicament I am now in and needing some help with a solution. We are using calendly to allow our existing leads to schedule appointments. However we are being tasked with using it for lead gen as well. So initially we were researching using calendly to create the lead in SFDC. However I didn't want to do this since it could result in duplicates. Additionally we need to cookie the records and capture some additional information that using a native calendly form won't allow. So my thought and possible solution is to first promote a marketo LP/form, and then upon form submission direct to the calendly appointment stuff. However after picking a date/time and what not the calendly page still asks for user info. I know I can prefill that using javascript variables or URL parameters. However I am not sure how to capture the info from the initial Marketo form submission to pass them along to the calendly to prefill. 

 

So again is that possible to upon Marketo form submission, pass their info along either in javascript or URL variables so that the calendly can pre-fill?? If this was already somehow answered in another post, I apologize, I hadn't find anything yet. 

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

To be clear, there isn't really any such thing as a "JavaScript variable" passed from page to page.

 

Cookies can be shared between pages if they share a common parent domain. Technically the document object is a global variable and document.cookie is a property of that global, but we don't usually think of it that way.

 

Likewise, sessionStorage and localStorage are technically global variables shared by pages on the same origin, but you wouldn't typically think of the individual props as being JS variables — or at least that isn't the clearest way to put it!

 

In any case, if you're trying to pass the variables from Page A on example.com to Page B on calendly.com, you couldn't use either  of the above. The fields must be passed in the URL.

 

And yes, the code in that other thread is designed to do just that.

 

 

View solution in original post

10 REPLIES 10