• Support
  • The limitation of group number

Hi I've built a listings site (400 lists above) and want to put different buttons (different contact information) on different pages. My current approach is to create different groups and urls to specify where to place them.
However, "412: Unknown" appeared recently when creating a group Wow that are a lot of groups."
Want to ask what is the upper limit of the group?
Or is there a better way for me to set it up?

Thanks!

    Hi ben880153 ,

    Thanks for reaching out to us!

    Our group limit is currently 50. This is quite a high limit already and if there are cases where you may need more groups, there usually is a better way to set it up. 🤔

    You could just create 1 button, make it use JavaScript and add the contact information per page instead.

    For example, per page you would add the contact information like this:

    <script>
      window.buttonizerPhoneNumber = "06123456789";
    </script>

    Then you can make a single Buttonizer button call this phone number using Javascript.

    document.location.href = `tel:${window.buttonizerPhoneNumber}`

    Or if you already have the contact information in the page, then we can skip the script part and just make the button get the contact information from the page.

    document.location.href = `tel:${document.querySelector(".telnumber").innerText}`;

    This way, you don't need to make a button and page rule for each of your listing and just reuse the same button instead.

    Let me know what you think of this! 😄

      James

      Hi James,

      Thanks! Could you help me to increase the limit to 500?
      And I would check the feasible about the javascript code for my site. 😅 Thanks!

        Hi ben880153 ,

        I took a look at the site listed in your account and I noticed that the listings already have a phone number on the page that you can get use for a single Buttonizer button.

        We highly recommend using the JavaScript option for your use case, as having many groups will not be a manageable solution (e.g. in the editor, etc.) and could significantly slow down working with Buttonizer.

        I could help you out with setting up the Buttonizer button that you could use.

        Here are the steps to make a button that gets the phone number on your listing pages.

        1. Create a call me button and use the Custom JavaScript button action.

        2. Copy and paste the code of your button into the header or footer of your site.

        3. Replace the console.log(...) line into this:

          const phoneNumber = document.querySelector(".lp-listing-phone")?.innerText.trim();
          const lineNumber = document.querySelector(".extra-fields")?.innerText;
          if(phoneNumber) return document.location.href = `tel:${phoneNumber}`;
          if(lineNumber.includes("LINE ID:")) return window.open(`https://line.me/ti/p/~${lineNumber.replace(/\D/g, "")}`)

          So it should end up looking something like this:

          window.addEventListener("buttonizer_button_clicked", event => {
            if(event.detail.button_id === "2b16bc45-16cd-4233-971f-e0f738ec34c0") {
              const phoneNumber = document.querySelector(".lp-listing-phone")?.innerText.trim();
              const lineNumber = document.querySelector(".extra-fields")?.innerText;
              if(phoneNumber) return document.location.href = `tel:${phoneNumber}`;
              if(lineNumber.includes("LINE ID:")) return window.open(`https://line.me/ti/p/~${lineNumber.replace(/\D/g, "")}`)  }
          });

        Save the changes and that should be it! 😄
        Your button will now call the phone number of the listing or redirect them to Line if they don't have a phone number but a Line number instead.

        You can then use a single page rule to make this button only show on your listing pages by using this condition:

        Hopefully this shows how much easier it will be using the Javascript function! 😃

          James

          hi James,

          The suggestion can work. Thanks!
          But I have another question...
          Besides showing the phone number, even though some pages have line, but some pages have no line...

          I hope that the pages which only has phone number could only show the call me icon. And only the pages having line will show line icon. Below shows my code on the website, could you help me to check if it works or not? thanks!

          <script>
          window.addEventListener("buttonizer_button_clicked", event => {
          if(event.detail.button_id === "7b579228-3fd8-44aa-8e5f-abb742ab13fa") {
          const phoneNumber = document.querySelector(".lp-listing-phone")?.innerText.trim();
          if(phoneNumber) return document.location.href =
          tel:${phoneNumber};
          if(lineNumber.includes("LINE ID:")) return window.open(
          https://line.me/ti/p/~${lineNumber.replace(/\D/g, "")}`) }
          });
          </script>

          <script>
          window.addEventListener("buttonizer_button_clicked", event => {
          if(event.detail.button_id === "9692f8bb-79c7-4234-b0bd-5c3a1816e3d4") {
          const lineNumber = document.querySelector(".extra-fields")?.innerText;
          if(lineNumber.includes("LINE ID:")) return window.open(https://line.me/ti/p/~${lineNumber.replace(/\D/g, "")}) }
          });
          </script>`