Not sure why Marketo makes it so hard to pass a program ID within the standard embed code | Community
Skip to main content
Level 2
June 14, 2021
Question

Not sure why Marketo makes it so hard to pass a program ID within the standard embed code

  • June 14, 2021
  • 2 replies
  • 3956 views

Maybe I'm missing something... the standard embed code allows you to pass the formid, why not the programid?

 

<script src="//pages.fiscalnote.com/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_1017"></form> <script>MktoForms2.loadForm("//pages.fiscalnote.com", "---ILL-989", 1017);</script>

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
Level 10
June 14, 2021

What is "the" program ID of a global form, though? Some forms don't have an associated program, and some are implicitly tied to more than one program.

 

There's no form-related action on the back end that uses a program id, but if you wanted to use a custom field and consult it in a Smart List, you can do:

MktoForms2.whenReady(function(mktoForm){ mktoForm.addHiddenFields({ relatedProgramId : 1234 }); });

 

BrianHo9Author
Level 2
June 14, 2021

This particular form is a form we use for gated content, so with each piece of content the program id is different, if that makes sense.

SanfordWhiteman
Level 10
June 14, 2021

This particular form is a form we use for gated content, so with each piece of content the program id is different, if that makes sense.

What's the real relationship between the form and the Marketo program?

 

Is the form on a Marketo LP that's within a program? Because if so, the Web Page constraint is the name of the LP.

Amy_Goldfine
Level 9
June 22, 2021

Hi Brian, what are you trying to accomplish here? Can you elaborate more?

Amy GoldfineMarketo Champion &amp; Adobe Community Advisor
BrianHo9Author
Level 2
July 28, 2021

Hey there, so we have our main site and we have a couple of standalone sites. What I am trying to do is have a marketo embed that I can place on my blog posts that gates content. The form ID doesnt need to change but the program ID would change per use so it knows which content to serve up. I think Im stating that correctly.

SanfordWhiteman
Level 10
July 30, 2021

I think what’s still fuzzy here is exactly how you’re connecting the Program and “its (single) piece of content.“

 

In Marketo, there’s no native property of a Program called “content”. A program can relate to one or more Design Studio assets, or one or more external URLs for that matter. But, as self-evident as it might seem in your particular setup, there’s no default thing that connects a Program to a downloadable.

 

This is not to say there aren’t easy ways of implementing such a connection. For example, a {{my.token}} called {{my.download url}} fills the bill. But it’s not precisely clear that’s what you’re doing.

 

The reason I’ve been wondering above about your chosen implementation is it’s quite possible to have the same global form switch between Thank You URLs (which can be downloadable assets — they certainly don’t need to be pages) based on a field on the form. For example, create an Integer field Last Form Program ID. Then add that to the form as a Hidden field; set it based on the URL of the page or any other criteria. Have the Thank You URL choices based on that field.