Sep 28, 2026
Written by
Ieva Dubricke
Key takeaways
If you are a builder, marketer, or founder with a live Base44 app, it matters to track performance in Google Analytics 4 and Meta to drive growth. When configuring analytics for apps built with Base44, setting up proper measurement ensures accurate attribution across all your marketing channels. In this guide, we’ll show you how to set up solid server-side tracking for Base44 right from within the chat and how to add the Meta Pixel to a Base44 app, therefore avoiding the need for manual configuration in Google Tag Manager.
Base44 is an app builder powered by AI that converts natural language prompts into fully functional apps. Whether you need landing pages and waitlists or complete SaaS products and internal tools, you can design, build, and publish all of them straight from the chat in the editor.
When the apps are first published, they come with built-in website analytics. To gain access to these insights, you just need to go to Dashboard → Analytics in the editor:
For early-stage applications, built-in analytics provide an excellent way to assess user engagement and activity. But as soon as you launch paid advertising campaigns, your tracking requirements jump to another level.

Although Base44’s built-in dashboard is good for obtaining quick internal insights, ad platforms have no means of accessing or reading the data it provides. To run effective ad campaigns, Google Analytics 4 needs direct hits to its property, Meta must use Pixel and Conversions API events to record browser conversions, and Google Ads requires data that can be linked back to specific ad clicks. Any interactions tracked only within Base44 remain invisible to these networks and therefore can’t be properly attributed or optimized in your marketing campaigns.
These limitations typically become noticeable once you prepare to run ad campaigns:
Putting GTM together with server-side tracking fully removes these limitations. The application loads one GTM script and pushes clean events into the data layer, with all the management remaining within GTM. The data then flows securely through your dedicated tagging server on Stape and is sent directly to GA4 and Meta using the Conversions API.
Although manual GTM setup takes time, Stape makes server-side tracking for Base44 far easier with free MCP servers you can connect to the project.
The Base44 editor chat goes far beyond simply writing application code – it integrates with external tools using MCP connections. The Model Context Protocol (MCP) is an open standard that allows remote actions for your AI assistant, from inspecting containers to building and configuring tags. Stape provides free MCP servers for Google Tag Manager, Google Analytics 4, and the Stape platform itself. Check out our comprehensive guide to Stape’s AI Assistant and free MCP servers to discover everything they can do.
In Base44, you add MCP connections at the account level. You set each server up once, and the chat can use it in every app you open. Two connections cover the tracking setup:
Once both are connected, a few prompts in the project chat replace an afternoon of manual setup. Base44 can:
These connections only exist in the editor. Base44 uses them while you build, but the published app never calls them, and neither your API key nor your Google sign-in is added to the site.
The tracking itself runs as ordinary server-side tagging. The browser transmits events directly to your dedicated Stape server container, which then securely routes them to GA4 and Meta. Because data reaches a server under your full control before being forwarded to third-party vendors, you bypass strict ad blockers and browser privacy restrictions – giving you complete authority over exactly which parameters are shared with each platform.

You’ll need to have the following:
1. In Base44, at the bottom of the screen click on your account → Account preferences.

2. Under MCP connections click Add custom MCP.

3. Fill in the following:
GTMhttps://gtm-mcp.stape.io/mcpOAuth4. Click Authorize & Add and sign in with the Google account that has access to GTM.

5. Repeat steps 1-2 and now add a Stape MCP:
Stapehttps://mcp.stape.io/mcpNot required. 6. Click Test & Add.

7. To check the connections, ask in the project chat:
Create a web GTM container for this project. Then create a server GTM container and host it on Stape in the EU zone. Configure GA4 server-side and the Facebook pixel <your pixel ID> with CAPI.

Tip:
You can go to your GTM and Stape accounts and watch how everything appears in real-time.
2. Base44 takes a few minutes, then replies with a summary like this:

3. Reply with your measurement ID.

Access tokens are sensitive information, and you should add this yourself.
1. Go to Google Tag Manager → your server container.

2. Click Variables → Meta Access Token.

3. Enter the Value that you copied earlier from the Meta Events Manager.

1. Now that the containers exist, ask Base44 to connect the app to them and set up some events that you’d like to fire. The following text is an example of what you could ask:
Add my web GTM container to this app, then set up these two things:
1. Track page views. Record a page view when someone opens a page and when they move to another page within the app.
2. Track signups. When someone successfully submits the signup form, record it as a "generate_lead" event. Tag it with the name "waitlist", give each signup a unique ID, and include the person's email.
Send this data to both GA4 and Meta:
- Send it to GA4 through my server container.
- Send it to Meta two ways: once from the browser with the Meta Pixel, and once from the server container with the Meta Conversions API.
- Use the same unique ID in both the browser and the server versions, so Meta counts each signup once instead of twice.
Set everything up, but do not publish the GTM containers.
Here we’re asking Base44 to connect the app to the containers and set up firing events. We’ll need to ask to add a unique event ID. When we track the same conversion in two places, the Meta Pixel in the browser and the Facebook Conversions API on the server, Meta receives two events for one lead. The event_id is how Meta knows they're the same action: when the browser event and the server event carry an identical ID, Meta merges them and counts as one conversion instead of two. This is called event deduplication, and without it your Lead numbers will inflate. For more information about deduplication you can read How to set up Facebook event deduplication in Google Tag Manager.
When passing personal data to ad platforms, check whether it’s acceptable for your business and you have a legal basis and consent for it. You can include that data to raise Event Match Quality (EMQ). The best way to do it is to pass the values to the server container and let the Meta Conversions API tag hash them (SHA-256) before they reach Meta. The Meta Conversions API tag automatically hashes the applicable parameters.
2. On the top-right of the screen, click Publish to publish your app.
By default, your server container runs on a Stape domain. Routing it through a custom subdomain of your own website (such as metrics.yourdomain.com) incorporates the tagging server directly into your site's traffic flow rather than treating it as a third-party service.
You get two benefits from this:
Before getting started, make sure you know who manages your domain's DNS records (Base44 itself, or the external registrar). The Stape MCP server handles the Stape side of the setup by linking the domain to your container and generating the required DNS entries. If your DNS is managed externally (such as through Cloudflare or your domain registrar), you’ll just need to add those records there manually.
To kick off the process, send this quick prompt in your project chat and follow the conversation:
Using Stape connector, connect a custom subdomain.
Once you’ve added the records at your DNS provider, head back to the chat and ask it to verify the domain status in Stape and update the server container URL inside your web GTM container. Finally, hit publish on your web container again once the domain verification is complete.
1. In Google Tag Manager, go to your server container, and click Preview. Then, go to your web container, and click Preview as well. Enter the live site URL when asked. You’ll get a new screen with the Tag Assistant.
2. In the Tag Assistant screen do some actions on your site that would trigger the events. In web preview, your event should appear, click on it to check whether GA4 and Meta tags have successfully fired.

3. In the server container preview, open your event. Check the incoming request from the web container and the outgoing HTTP requests. Everything should have 200 status.

4. Go to GA4 → Admin → Debug view.

5. You should see your events.

6. Go to Meta Events Manager → Datasets → select your dataset. You should see your events.

7. Go back to Base44, and ask to publish the GTM containers:
Publish both GTM containers.
Tips:
Using the Stape connector, enable the Custom Loader, select 'Other' as the platform, enter web GTM container ID, and add the generated code to this project.
Even though Base44 greatly speeds up app development, setting up analytics and tracking might slow that progress. Since Stape and GTM have now been incorporated directly into the Base44 chat interface, configuring your analytics becomes part of a natural conversation. All you have to do is describe your requirements in order to set up GA4, Meta Pixel, and the Conversions API.
Beyond the initial setup, the chat assistant can keep refining your tracking architecture. You can easily add new conversion events for forms or checkout flows and integrate additional marketing platforms.
Want to start on the server side?
Try for freeSep 28, 2026
Blog
Learn how to safely connect AI to Google Tag Manager with six key controls – from permission scoping to consent verification – before you publish live.
Aug 11, 2026
Comments