La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
Is there any way to display on a landing page the number of subscribers to a current list? The goal of the landing page is to have people subscribe to the list and I'd like them to see that there are already xxx subscribers.
Anyway to automatically update that number from the actual total of list subscribers?
Yes there is other option for this, Instead of passing hapikey as per our previous answer you need to pass access_token,this is link to generate access token to in your portal.
Yes, you can display number of subscribers of particular list by AJAX, All you need to do is make AJAX call. Below is code provided you just need to replace your list id and your HubSpot API key, if you are not aware from where you get your hubspot api key, here is link to Get Hubspot API-key.
<script>
$(document).ready( function(){
var listId = <Your list id>;
var apiKey = '<Your HubSpot API key>'
$.ajax({
type:"GET",
url:"https://api.hubapi.com/contacts/v1/lists/" + listId +"?hapikey=" + apiKey,
success:function(data){
alert('Total size of the list is ' + data.metaData.size);
}
});
});
</script>
Note: We just alert your list count value, If you are not familiar with this method please provide your page link in which you need to show list count, so we can assist you as per the link provided by you.
We hope it resolve your query.
Did my post help answer your query? Help the Community by marking it as a solution.
Thanks TRooInbound for the suggestion. I'd do it in a second but agree with Jimmy... I really don't want to post my unencrypted API key there.... Hmmmm... any other thoughts?
Yes there is other option for this, Instead of passing hapikey as per our previous answer you need to pass access_token,this is link to generate access token to in your portal.