Lesson 02 · Lead capture

Connect the journal form to Brevo.

A button is not a lead-generation system by itself. The real lesson was connecting the page, the Brevo tracker, the form, the confirmation email, and the contact list—and then testing every link in the chain.

Read this lesson online. Sign in or create an account to download the PDF.

What we wanted to achieve

Every Get the Journal call to action on the website needed to open the same Brevo lead-capture experience. A visitor should be able to submit an email address, receive the expected message, and appear in the correct Brevo contact list.

Visitor clicks CTABrevo form opensEmail is confirmedContact appears in list

The parts of the workflow

The integration involved more than copying one code snippet:

  • The Brevo SDK loader had to be added to the page.
  • The public client key had to initialize the tracker.
  • Every journal CTA needed the same trigger behavior.
  • The browser needed to open the configured form experience.
  • The submitted address needed to reach the intended Brevo list.
  • The confirmation or follow-up email needed to arrive.

The website code

The tracker was loaded in the page head and initialized before the CTA logic:

<script src="https://cdn.brevo.com/js/sdk-loader.js" async></script> <script> window.Brevo = window.Brevo || []; Brevo.push(["init", { client_key: "PUBLIC_CLIENT_KEY" }]); </script>

The journal buttons share one CSS class. JavaScript listens for clicks on that class and sends visitors through the same form-opening path. This avoids maintaining separate logic for the header, hero, lesson cards, and footer.

document.querySelectorAll(".journal-signup-trigger") .forEach(button => button.addEventListener("click", openSignup));

Security note: only the public browser-side tracker identifier belongs in the frontend. Passwords, private API keys, customer exports, and internal credentials must never be committed to this public repository.

How we tested it

  1. Open the live page in Google Chrome.
  2. Click each journal CTA, not only the first one.
  3. Submit a controlled test email address.
  4. Check whether the browser reports a successful action.
  5. Check the inbox and spam folder for the expected message.
  6. Open Brevo and inspect the relevant contact list.
  7. Confirm that the test contact has the correct details and status.

Testing the full journey was essential. Seeing the form open only proves that the first visual step works; it does not prove that the lead was stored or that the email sequence was triggered.

What made the work difficult

The work became tiring because the visible symptoms did not point clearly to the failing layer. At different moments the tracker appeared, the form name was difficult to locate, the contact list looked empty, the confirmation email arrived, and the form still did not consistently open from every button.

This created a common integration problem: partial success looked like total failure. The form, automation, list, email, browser cookie, and CTA code were separate components, so each needed its own test.

Practical lesson: define one test result for each layer. “The form opened,” “the submission completed,” “the email arrived,” and “the contact entered the list” are four different checks.

Problems and fixes

The list appeared empty

We verified that the test submission used the intended list and checked the contact view rather than assuming the form interface itself would show every captured contact.

The email arrived but the form did not open reliably

We connected all CTA buttons to one shared trigger, cleared the relevant browser cookie before reopening the experience, and added a short status message so the click did not feel unresponsive.

It was difficult to know where to look in Brevo

We separated the Brevo objects conceptually: the form collects the data, the list stores the contact, and the automation or campaign sends the email. Finding one does not automatically reveal the others.

What I learned

  • Frontend integration requires both code and configuration.
  • A successful form display is not proof of successful lead storage.
  • Reusable button classes reduce inconsistent behavior.
  • Browser cookies and cached state can affect repeated form tests.
  • A lead workflow should be tested from the visitor’s click to the final contact record.
  • Documenting frustration is useful because it shows where beginners are most likely to get lost.

Reusable checklist

  1. Add the official tracker script.
  2. Use only the public client identifier in frontend code.
  3. Give every lead CTA the same trigger class.
  4. Test in a fresh or private browser session.
  5. Submit a controlled test address.
  6. Verify the email response.
  7. Verify the contact list entry.
  8. Remove test contacts when no longer needed.
  9. Never upload customer data or private keys to GitHub.

Follow the next release.

The learning journal will continue with new frontend, backend, database, testing, and deployment problems as they are solved.

Contact · Budapest

Let’s build a conversation.

Collaborations, partnerships, or a question about the journey.

info@tickerbell.biz

Népfürdő u. 22B · 1138 Budapest, Hungary
Monday–Friday, 9:00–17:00 CET / CEST

Find our office