🛄
Recrubo Documentation
  • Introduction
  • 🔠Terminology
    • 🔠General Terminology
    • 🔠Botstudio Terminology
  • 🤖Botstudio
    • 💬Adding flows
      • Generate flow
        • Step 1: Locate the right vacancy
        • Step 2: Start the process
        • Step 3: Adjust the general settings
        • Step 4: Adjust the tone of voice
        • Step 5: Determine the questions
        • Step 6: Open the botstudio
      • Import flow
      • Use template
      • Blank flow
    • 👨‍🔬How to test your flow
      • Bot Studio preview
      • WhatsApp
    • 🔢Steps
      • Add steps
      • Edit steps
    • ⁉️Actions
      • Add actions
      • Edit actions
    • 🆎Action types
      • Basic action types
        • Text (say)
        • Text (ask)
        • Appointment
        • Contact
        • List
      • Extra action types
        • Location
        • Document
        • Image
        • Audio
    • 🔀Links
      • No condition
      • Exact
      • AI
    • 🔚Endings
    • ↔️Deploy dialog
      • Chat widget (website)
      • Lead form (website)
      • Facebook (Meta)
      • LinkedIn
    • ⚙️Flow Settings
    • 📢Publication
    • 📄AI context
    • 🛠️Adding, Duplicating, Translating & Deleting flows
  • ↗️Distributing flows
    • 📣Integrate with Facebook & Instagram ads
      • Creating lead campaigns
      • Connect your campaign to the botflow
      • Finding IDs
    • GTM
      • Chat widget
      • Lead form
    • Integrate with your website
      • Web widget
      • Lead form
      • Custom implementations
  • 🫅Candidates
    • Filtering the candidate list
    • Export candidates
    • Broadcast
    • Detail page
  • Organization settings
    • Users
    • Leads
    • Locations
    • Message templates
  • Integrations
    • WhatsApp
      • Set up WhatsApp
      • Set up payment method
      • Customize WhatsApp profile
    • Facebook Messenger
    • Meta lead integration
    • LinkedIn lead integration
  • 🗓️Schedule
    • Setting up your calender
    • Creating a broadcast event
    • Creating a blocking event
  • 💪Best practices
  • ⚠️Common issues
    • Error in a chat message
    • Variable not found
    • The candidate got sent to the wrong path
    • The candidate got declined/accepted while this is not intended
  • ❓FAQ
    • ⚙️Settings
      • How do I reset my password?
      • How do I create an account?
      • How can I invite a colleague in Recrubo?
      • How can I integrate my ATS?
    • 🔀Distribution and Integration
      • What triggers the WhatsApp message, when do candidates get a message?
      • Can I automatically follow up candidates from Indeed via WhatsApp?
      • Does Recrubo also connect with other messaging channels?
      • Can I integrate with Zapier?
      • Can I connect the chatbot to Meta or LinkedIn campaigns?
      • Is it possible to place a chat widget on the website?
      • How do I place a "Apply via WhatsApp" button on the website
      • Can candidates start from a QR code?
      • What ATS integrations does Recrubo have?
    • 🧍‍♂️Leads and Candidates
      • What happens to candidates who do not respond?
      • What happens to candidates who are rejected?
      • Can a candidate who is rejected reapply?
      • What if a candidate applies twice?
      • Why don't my leads in meta match my leads in Recrubo?
      • My leads get an error, what's going on?
      • How can I easily see which leads have left their phone number via the lead form on the website?
    • 📲WhatsApp
      • Does the WhatsApp chat happen through my phone?
      • Are you using our existing Whatsapp Business Account?
    • 💬Chat functionalities
      • Can we enrich candidates' profiles through WhatsApp?
      • Is it possible to request a CV via WhatsApp?
      • Is it possible to automatically schedule appointments with candidates via WhatsApp?
      • Is it possible to send bulk messages via WhatsApp to a specific group?
      • Does Recrubo send a reminder if a candidate does not respond?
      • Does Recrubo send appointment reminders?
      • Can the chatbot switch to another language during the conversation?
      • Can I attach a chat flow to multiple vacancie
      • Can I add images or videos in the chat flow?
      • Can I use Recrubo as a calendar tooling/calendar software?
    • 📩Recrubo inbox
      • Can I manually chat back with the candidate ?
      • The chat is disabled, how can I send a message in the inbox?
      • Does Recrubo have WhatsApp templates in the inbox?
    • 🔡Building a flow
    • 🚀Testing
    • 🤖AI
      • Can the AI recruiter talk in different languages?
      • Can the candidate ask questions to the chatbot?
      • Where does the chatbot get the information to answer candidates' questions?
Powered by GitBook
On this page
  • Variable (Lookup Table)
  • Trigger
  • Custom HTML tag
  • The code
  • The tag
  1. Distributing flows
  2. GTM

Lead form

To add the lead form widget to your site you can follow this guide.

PreviousChat widgetNextIntegrate with your website

Last updated 7 months ago

In this guide we are going to add the lead form widget to your job pages via GTM. Adding the script using GTM requires you to add a Custom HTML tag, a Trigger and a Variable. This guide will go in to detail on what settings your need to add.

This guide expects you to use some sort of CMS making sure your vacancy pages all use the same layout. This guide will not work if your vacancy pages are not build by some sort of layout builder.

Variable (Lookup Table)

First determine what flow needs to be added to what page. This mapping is defined using a Go to the Variables page in your GTM environment and scroll down to add a user defined variable.

Select the option to add a Lookup table and add the text {{Page Path}} as your Input variable.

In the section 'Lookup Table' add the Page path on the left side and the flow id on the right side of the table.

If you are unsure what the Page Path is you can use the preview mode to see the Page Path in the variables tab of every event.

To find the flow id you can open the flow using the Botstudio, the ID can be found in the URL.

Trigger

The trigger will make sure the code we are adding in the next step will be excecuted at the right time. The trigger needs to fire on all the pages that are added in the Lookup table.

To make this happen navigate to the Trigger page in your GTM environment and add a new trigger. After creating the trigger select the trigger type 'Page View'. To make sure the trigger is only fired on the correct pages switch the radio button to 'Some Page Views and set it up by adding the Recrubo Lookup variable you have just made as the first option, does not equal as the second and add the text undefined as the third.

Custom HTML tag

The Custom HTML tag determines what code is excecuted on your site. The code below will create the lead form script Recrubo provides in the deploy dialog dynamically.

The code

The code does need some configuration before being added to a tag. This can be done in two steps.

First the organization id needs to be added to the script replace *YOUR ORGANIZATION ID* with the id of your organization. You can find this id in the script provided in the deploy dialog.

In this case i'm using the 'Book a demo' button. To find the querySelector, right click the button and click the option 'inspect'.

After clicking 'inspect' and editor will open highlighting the element you've just inspected. Right click the element and copy the selector as shown in the example. This will result in something similar to the code below. Replace the text *PATH TO PARENT* with the code you've copied.

#page > section.pb-[100px].pt-[50px].md:pt-[70px].lg:pt-[100px].overflow-hidden > div > div.max-w-[614px].mx-auto.text-center.mb-20 > div.[&_>div]:justify-center > div > a

<script>
    // Build the div
    var desktopButton = document.createElement('div');
    desktopButton.className = 'recrubo-lead-form';
    desktopButton.dataset.flowId = {{Recrubo Lookup}};
    desktopButton.dataset.organizationId = '*YOUR ORGANIZATION ID*';
    
    // Find the element you want the button to be displayed under.
    var desktopTopButton = document.querySelector(*PATH TO PARENT*);
    // Check if the element can be found and add the recrubo div
    if (desktopTopButton != null) {
        desktopTopButton.parentNode.insertBefore(desktopButton, desktopTopButton.nextSibling);
    }
</script>

<script type="application/javascript" src="https://widget.recrubo.app/form/webwidget.js"></script>

The tag

After setting up the code it is now time to set up the tag. The Tag Type should be Custom HTML. Paste the code in the input field en select the trigger build in the previous step.

Don't forget to test and publish your changes after you are finished with this guide.

Second the location of the button needs to be determined. In this example the site will be used to show how you can find the querySelector you need to add on line 9 of the code.

↗️
https://recrubo.com/en/
Lookup Table.