Display number of registrants on landing page

Danja_Prahl
Level 1

Display number of registrants on landing page

I'm creating a registration page in Marketo for a webinar with GoToWebinar and I'm trying to find a way to display the current number of registrants on the registration page. I feel like this is something Marketo should be able to do as we have an integration with GoToWebinar, but I haven't yet figured out a way to make it work. Does anyone have ideas or suggestions? Thanks a lot!

9 REPLIES 9
Chris_Wilcox
Level 9 - Champion

Re: Display number of registrants on landing page

Hi Danja,

We don't use GTW, however I did a quick search for the GTW adapter documentation, and from what I can tell the only native token that the adapter provides through the integration is the {{member.webinar url}} token. 

I'm not entirely sure the best method to achieve what you're looking for, however my gut tells me you could write utilize the API, make a call to the API using the webinar program ID to retrieve the number of "registered" status leads in the database. I would imagine this would have to run on the LP itself as a piece of javascript or something, but unfortunately this isn't something that can be done right out of the box as far as I'm aware!

Good luck,

Chris

SanfordWhiteman
Level 10 - Community Moderator

Re: Display number of registrants on landing page

You can't call the API directly from a Landing Page.

Even if you call the API from an intermediate gateway, triggering the call from JS, you're creating a humongous Denial of Service vulnerability.

Sant_Singh_Rath
Level 7

Re: Display number of registrants on landing page

Hi Danja, Hope you are doing well.

Yes you can absolutely track the registrations. As you have mentioned you have created marketo landing page for registration and I am sure you must be using Marketo form in it. Here are two ways to check number of registrations in it:

1. Program Level -  If if you are managing the status through smart campaign then go to program summary dashboard  and you can see the numbers and if you want to check members then go to members tab in the program.

2. Build a smart list - Create a smart list with criteria "Filled out form = Your form name" and then you can define your landing page name as well if you are using your form in multiple pages

pastedImage_8.png

Hope this helps! 

Jo_Pitts1
Level 9

Re: Display number of registrants on landing page

@Sant_Singh_Rath ,

The use case for @Danja_Prahl is to display this information on a landing page.

Your solution (while super helpful) displays the information internally.

Cheers

Jo

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Display number of registrants on landing page

The only way to display the registrant count on the LP is to use a webhook to maintain the count; it can be maintained in a separate service or as a field on a special lead called a Resource Lead (a lead that collects aggregate statistics for a program).

I gave an NYC MUG talk on the latter approach in 2018, please search for it.

(I personally use the former approach, as we have access to a counter service designed for this purpose.)

pierrel
Level 1

Re: Display number of registrants on landing page

Hi Sanford,

I wasn't able to find your NYC MUG talk from 2018, any chance the talk is still availalbe and you can share a link to it please?

Cheers,

Pierre

SanfordWhiteman
Level 10 - Community Moderator

Re: Display number of registrants on landing page

It’s probably not archived anymore. But actually that second approach described in the MUG (the Resource Lead) doesn’t work anymore because of changes to the Marketo forms endpoint.

So you have to use a webhook now — while the webhook could update a Resource Lead, it makes more sense IMO to have the webhook update a program token, since you’re calling the webhook anyway.
Jo_Pitts1
Level 9

Re: Display number of registrants on landing page

@Danja_Prahl ,

you can do this using Flowboost (developed by the legendary @SanfordWhiteman - hence why he doesn't mention it by name)

 

It is a two step process. 

 

Step 1 - Incrementing the Counter

On form submission you'll need a triggered smart campaign that does all the things you need doing AND makes a call to Flowboost (via a Marketo Webhook) to increment a counter.  The code for the Webhook will look something like this:

var counterName = 'events/programid/{{Program.Id}}-registrants'; 
var numberToAdd = 1;

Promise.all(
    Array( numberToAdd )
    .fill( counterName )
    .map( FBCounter.autoAdd )
)

The reason I use a variable for numberToAdd is that for in person events, I will capture the number attending per registration, and set numberToAdd to that value, rather than 1.

 

Call the Webhook with a flow step 

Jo_Pitts1_0-1636681649638.png

 

Step 2 - Displaying the Count

On your landing page, you'll need something like this to retrieve the counter:

<script src="https://api.teknkl.com/fbcounter/v2/counter/count/events/programid/{{Program.Id}}-registrants?public-api-key=YOURKEYGOESHERE&cb=processRegCount"></script>

 

and then something like this to actually display it:

<script>
  function processRegCount(current){
    document.getElementById("registrants").innerHTML = current.count;
  } 
</script>

 

This of course requires you to have an HTML element with an ID of 'registrants'.  

 

The code blocks will also need to go the other way around in your code, so the processRegCount function exists before the call to Flowboost occurs (the processRegCount function gets called via the &cb=processRegCount in the call to Flowboost)

 

I've not debugged this code, or tested it.. just cut and pasted from a solution I built for a client a while back and then roughly edited to be closer to your requirements.

 

I seem to recall you need to use 'pro' mode in Flowboost to get access to the Flowboost counter.

 

Cheers

Jo

SanfordWhiteman
Level 10 - Community Moderator

Re: Display number of registrants on landing page

@Danja_Prahl please return to the thread and check responses.