Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

Alex_Shelukhano
Level 2

How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

Is there any way to pull a segment lead count (segment size) into Marketo form hidden field as a token ?

So then we could use it in Javascript to determine how many people have filled out the form.

That's for an event registration purpose where number of participants is limited. As soon as a segment count reaches this number we could make the submit button inactive and show a message saying "registration closed".

9 REPLIES 9
Anonymous
Not applicable

Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

Hi Alex,

I think you mean to find 'number of leads in a smartlist'. I do not think there is a API call to get this information. You might be able to do it in a round about way by using a 'membership' list to store the people who filled out a form. There are API calls to get members in a list.

Using such API call in javascript poses some issues though. Especially regarding your API key security and also potentially exceeding daily API call limits if you get too many page visits.

If you are looking to get this done for event registration form capping purpose, you might find this blog post helpful. Using a webhook might be a better alternative.

Marketo Magic: Automatically Cap Registrations For Any Marketo Form. Part - II | Rajesh Talele | Lin...

Hope this helps.

Rajesh

Alex_Shelukhano
Level 2

Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

I am not talking about a smartlist. I am talking about Lead Database Segmentation Segment.

There are many different events leads will be registering for. Depending on what event each lead is registered for I am using a Segmentation to personalise emails (using dynamic Subject and dynamic Body) for Nurture campaign for each event.

This cannot be done with smartlists I assume.

Anonymous
Not applicable

Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

I see. So you have 2 business needs.

1> Personalize email for nurture campaign for each event.

2> Automatically disable submit button if the event is full.

Rajesh

Alex_Shelukhano
Level 2

Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

That's correct. These are some of our needs. Now everything is sorted except of "Submit button" thing.

Anonymous
Not applicable

Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

I have solved that 'disable submit button' functionality needs as described in the link I provided for several Marketo based event forms so far.

Rajesh

Alex_Shelukhano
Level 2

Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

Thanks Rajesh, I just looked at that. It's a good idea.

In our case it is a bit more complicated - there is just one form for multiple (around 50) events, which passes an event ID in a hidden form field.

Also, each lead is allowed to register for several events.

Anonymous
Not applicable

Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

Got it.

I think you might be able to use the same kind of logic to solve your case.

Basically, it means you would have to maintain the event registration counts (for all 50) outside of Marketo.

Have web hooks to increment these numbers when leads register for these events for each event.

And have web service(s) returning JSONP and use these web service(s) in AJAX calls to appropriately / conditionally enable / disable submit button(s) on the form.

In essence, you will have to create a custom version of the web hook I've described that fits exactly to your needs. I think it is doable. Please feel free to contact me at Rajesh@BrightAspects.com if you want to bounce ideas. I love this stuff.

Rajesh

Alex_Shelukhano
Level 2

Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

Any advice from Marketo team at all ?

Is there any way to pull a Lead Database Partition - Segmentation -  Segment lead count (segment size) into Marketo form hidden field as a token ?

Jerry_Cooper1
Level 2

Re: How to get a segment lead count (segment size) as a variable (token) to use with a form or landing page?

Alex,

Did you ever find a way to get the count of a segment and move it to a vaiable like a Marketo token to be displayed on a landing page?

I have the exact same problem now?

Jerry Cooper