Skip to content
  • There are no suggestions because the search field is empty.

Lead Capture Campaign Submissions

Lead capture campaigns allow you to create hosted forms that collect information from potential audience members (leads) who are not yet customers. You can use them for pre-sales, waiting lists, newsletter sign-ups, or any situation where you need to gather audience details.

Forms can be:

  • Branded using a branding set

  • Hosted online at a unique URL we supply (easy to share on social media or link from your website)

  • Embedded on your site using provided HTML and inline CSS

You can also submit data directly to the form endpoint. This makes it possible to:

  • Build and manage your own custom forms

  • Send leads from Google Sheets via Apps Script

  • Connect third-party services like TikTok or Meta Lead Ads through Zapier


Setup

  1. Create the campaign in Activity Stream and select the fields you want to capture.

  2. If data is sent to a field that is not enabled in your campaign, it will be ignored (other data in the submission will still be stored).

  3. If a required field is missing, the entire submission will fail.

Lead capture forms are made up of one or more HTML input fields. The <form> element’s action attribute points to the unique endpoint for your campaign.

Data is submitted using the POST method, with values passed in the request body. The hosted form URL and the form action endpoint are the same. You can find this by clicking Share and Embed in your campaign and copying the Hosted Form URL.

Xnapper-2025-09-23-13.32.03-A9E134B7-C0D9-49A5-B8B0-90ACDB06CD8E


Example Form

Here is a sample form that includes all available fields:

<form method="post" action="https://www.encoreform.com/forms/xxx/yyy/">
<label>Email Address
<input type="email" name="email_address">
</label><br>

<label>First Name
<input type="text" name="first_name">
</label><br>

<label>Last Name
<input type="text" name="last_name">
</label><br>

<label>Address
<input type="text" name="address_1">
</label><br>

<label>Postcode
<input type="text" name="postcode">
</label><br>

<label>City
<input type="text" name="city">
</label><br>

<label>Country
<input type="text" name="country">
</label><br>

<label>Phone Number
<input type="text" name="primary_phone_number">
</label><br>

<label>Company Name
<input type="text" name="company_name">
</label><br>

<label>Date of Birth
<input type="date" name="date_of_birth">
</label><br>

<label>I agree to the privacy statement
<input type="checkbox" name="checkbox1">
</label><br>

<button type="submit">Submit</button>
</form>

 

Supported Fields

Field name Type Notes
email_address email  
first_name text  
last_name text  
address_1 text  
postcode text  
city text  
country text  
primary_phone_number text  
company_name text  
date_of_birth date (yyyy-mm-dd)  
checkbox1 boolean (yes/no) Used for email marketing opt-in

Importing Leads from Google Sheets

You can send each row of a Google Sheet to your campaign endpoint using an Apps Script.

  1. In your Google Sheet, go to Extensions > Apps Script.

  2. Paste the script contents into the editor:

    /**

     * Menu entry to run from the sheet

     */

    function onOpen() {

      SpreadsheetApp.getUi().createMenu('Send leads')

        .addItem('Post all rows', 'postAllRows')

        .addToUi();

    }

    /**

     * Lead Capture Campaign Configuration

     */

    const ENDPOINT_URL = 'https://www.encoreform.com/forms/xxx/yyy';  // change me

    const SHEET_NAME = 'Sheet1';                              // change if needed

    const FIRST_DATA_ROW = 2;                                 // 1 for headers, 2 for first record

    const STATUS_COL =  lastCol => lastCol + 1;               // writes status in the next free column

    /**

     * Main runner, posts each row as a form payload

     */

    function postAllRows() {

      const sheet = SpreadsheetApp.getActive().getSheetByName(SHEET_NAME);

      const range = sheet.getDataRange();

      const values = range.getValues();

      if (values.length < FIRST_DATA_ROW) {

        Logger.log('No data rows found');

        return;

      }

      const headers = values[0].map(h => String(h).trim());

      const lastColIndex = headers.length;                    // 1 based when writing

      sheet.getRange(1, STATUS_COL(lastColIndex), 1, 1).setValue('Post Status');

      for (let r = FIRST_DATA_ROW - 1; r < values.length; r++) {

        const row = values[r];

        if (row.every(cell => String(cell).trim() === '')) {

          continue; // skip empty row

        }

        const payload = {};

        headers.forEach((key, i) => {

          if (!key) return;

          payload[key] = row[i] == null ? '' : row[i];

        });

        const result = tryPost(payload);

        const status = result.ok

          ? `OK ${result.code}`

          : `ERR ${result.code} ${(result.body || '').toString().slice(0, 120)}`;

        // write status

        sheet.getRange(r + 1, STATUS_COL(lastColIndex), 1, 1).setValue(status);

        Utilities.sleep(200); // gentle pacing

      }

    }

    /**

     * POST with simple retry and backoff

     */

    function tryPost(payload) {

      const options = {

        method: 'post',

        payload,                          // form encoded by default

        followRedirects: true,

        muteHttpExceptions: true,

      };

      let attempt = 0;

      let waitMs = 500;

      while (attempt < 3) {

        attempt++;

        try {

          const res = UrlFetchApp.fetch(ENDPOINT_URL, options);

          const code = res.getResponseCode();

          if (code >= 200 && code < 300) {

            return { ok: true, code, body: res.getContentText() };

          }

          if (code >= 500) {

            Utilities.sleep(waitMs);

            waitMs *= 2;

            continue;

          }

          return { ok: false, code, body: res.getContentText() };

        } catch (e) {

          if (attempt >= 3) return { ok: false, code: 'NET', body: String(e) };

          Utilities.sleep(waitMs);

          waitMs *= 2;

        }

      }

      return { ok: false, code: 'UNK', body: '' };

    }
  3. Update the URL on line 13 with your campaign’s form action endpoint.

  4. Save and return to your Sheet.

Make sure your column headers exactly match the field names.

After setup, you will see a Send Leads menu in Google Sheets. Clicking Post all rows will:

  • Send each row to your lead campaign

  • Add a column called Post Status, showing 200 OK when successful

Note: the lead creation time in your campaign reflects when the script is run, not when the original data was collected.

Xnapper-2025-09-23-13.54.56-C9AD0A0B-98F4-4FBA-B97B-79C7E1E4F4A0


Importing Leads with Zapier

You can also use Zapier’s Webhooks app to send leads to your campaign. This lets you connect TikTok, Meta Lead Ads, or any other source Zapier supports.

  1. Set up your source integration and map the fields you need.

  2. Add a step using Webhooks by Zapier with a POST request.

  3. Set the URL to your campaign’s form action endpoint.

  4. Set Payload Type to Form.

  5. Add each field in the Data section, mapping the names to values from your source.

You usually do not need to adjust other webhook settings. Test the Zap, then check your campaign to confirm successful submissions.

If your Zap is triggered by an app that receives data in real time, new leads will be passed to your campaign immediately.

Xnapper-2025-09-23-12.16.39-3264A7B2-9C71-42C1-B1BE-C9B70D3E39AC