# How to market a Bubble app

- Tool: Bubble
- Difficulty: Beginner
- Time required: 20-25 min
- Compatibility: All Bubble plans
- Last updated: March 2026

## TL;DR

Digital marketing features in Bubble include landing pages with email capture, UTM parameter tracking for campaign attribution, conversion funnel analytics, and integrations with marketing tools like Mailchimp and HubSpot via the API Connector. This tutorial covers building marketing pages, tracking campaign performance, and connecting to email marketing platforms.

## Overview: Handling Digital Marketing Features in Bubble

This tutorial shows how to build marketing capabilities directly in your Bubble app including landing pages, lead capture, campaign tracking, and email marketing integrations.

## Before you start

- A Bubble app
- Basic understanding of Workflows and Data Types
- Optional: Mailchimp or HubSpot account
- Familiarity with URL parameters

## Step-by-step guide

### 1. Build a landing page with email capture

Create a dedicated landing page with a compelling headline, value proposition, social proof, and a prominent email capture form. Add an Input for email and a CTA button (e.g., Get Started Free). Create a Lead data type: email (text), name (text), source (text), utm_campaign (text), utm_source (text), utm_medium (text), captured_at (date). The submit workflow creates a Lead record and shows a thank you message.

**Expected result:** A conversion-optimized landing page captures email leads.

### 2. Track UTM parameters for campaign attribution

On the landing page load, read UTM parameters from the URL using Get data from page URL. Store them in Custom States: utm_source, utm_medium, utm_campaign. When a lead submits their email, save these UTM values on the Lead record. This tells you which campaign, source, and medium brought each lead. Build a dashboard showing leads grouped by campaign.

> Pro tip: Add UTM tracking to ALL lead capture points in your app, not just landing pages. This gives you complete attribution data.

**Expected result:** Each lead is attributed to the campaign that brought them.

### 3. Set up conversion funnel tracking

Create a FunnelEvent data type: user (User or lead email), event_name (text), page (text), timestamp (date), session_id (text). Track key events: page_view, email_captured, signup_completed, first_action, purchase. Create workflows that log FunnelEvents at each stage. Build a funnel dashboard showing conversion rates between stages (e.g., 1000 visits → 200 signups → 50 purchases = 5% overall conversion).

**Expected result:** Conversion funnels show drop-off rates between marketing stages.

### 4. Integrate with email marketing platforms

Use the API Connector to connect to Mailchimp, HubSpot, or ConvertKit. For Mailchimp: POST to /lists/{list_id}/members with email and merge fields. For HubSpot: POST to /contacts/v1/contact with email and properties. In your lead capture workflow, after creating the Lead record, call the marketing platform API to add the contact to your email list. Map UTM data to custom fields for segmentation.

**Expected result:** Leads are automatically added to your email marketing platform.

### 5. Add Google Analytics and pixel tracking

Go to Settings → SEO/metatags. Add your Google Analytics tracking code and Facebook Pixel code in the Script/meta tags in header section. For event tracking, add JavaScript snippets that fire on specific workflows using the Run JavaScript action. Track events like lead_captured, signup_completed, and purchase. For comprehensive marketing analytics and attribution, RapidDev can help build custom tracking and reporting systems.

**Expected result:** Marketing events are tracked in Google Analytics and Facebook Ads for campaign optimization.

## Complete code example

File: `Workflow summary`

```text
DIGITAL MARKETING WORKFLOW SUMMARY
====================================

DATA: Lead (email, name, source, utm_campaign/source/medium)
FunnelEvent (user, event_name, page, timestamp, session_id)

LANDING PAGE:
  Email capture → Create Lead with UTM params
  → Add to Mailchimp/HubSpot via API
  → Log FunnelEvent (email_captured)

UTM TRACKING:
  Page load → Read URL params → Store in Custom States
  Submit → Save UTMs on Lead record

FUNNEL: page_view → email_captured → signup → first_action → purchase

INTEGRATIONS:
  Mailchimp: POST /lists/{id}/members
  HubSpot: POST /contacts/v1/contact
  Google Analytics: gtag in header
  Facebook Pixel: fbq in header
```

## Common mistakes

- **Not capturing UTM parameters before the user navigates away** — UTM parameters are only in the URL of the landing page. If the user navigates to another page, the parameters are lost. Fix: Read and store UTM parameters in Custom States or the database on page load, before any navigation occurs.
- **Not testing email marketing API integrations in sandbox mode** — Sending to real email lists during testing pollutes your marketing lists and may trigger spam complaints Fix: Use test/sandbox modes provided by your email marketing platform during development.
- **Hard-coding tracking pixels instead of using Bubble's settings** — Hard-coded scripts may not load correctly on all pages and are harder to maintain Fix: Add tracking scripts in Settings → SEO/metatags → Script/meta tags in header for consistent loading.

## Best practices

- Capture UTM parameters on page load and store them immediately
- Add leads to email marketing platforms automatically via API
- Track conversion funnel events at every key user action
- Use A/B testing on landing page headlines and CTAs
- Set up Google Analytics and Facebook Pixel for campaign optimization
- Segment leads by source for targeted email campaigns
- Review funnel conversion rates weekly to identify drop-off points

## Frequently asked questions

### Can I do A/B testing in Bubble?

Yes. Create two versions of your landing page content. Use a random number or user ID to show version A or B. Track conversions per version using your FunnelEvent data type.

### How do I set up email automation sequences?

Email sequences are best handled by your marketing platform (Mailchimp, HubSpot). Use the API Connector to trigger sequences by updating contact properties or tags.

### Can I track which marketing channel has the best ROI?

Yes. By storing UTM parameters on Lead and conversion records, you can calculate revenue per channel and compare acquisition costs.

### Do I need a separate landing page for each campaign?

Not necessarily. Use URL parameters to customize headlines and CTAs dynamically on a single page template. Track each variation through UTM parameters.

### How do I comply with email marketing regulations?

Add a consent checkbox on your email capture form. Only add contacts who explicitly opt in to your marketing lists. Include unsubscribe links in all marketing emails.

### Can RapidDev help with marketing technology setup?

Yes. RapidDev can build custom marketing dashboards, implement advanced attribution models, set up marketing automation, and integrate with multiple marketing platforms.

---

Source: https://www.rapidevelopers.com/bubble-tutorial/handle-digital-marketing-in-bubble
© RapidDev — https://www.rapidevelopers.com/bubble-tutorial/handle-digital-marketing-in-bubble
