Whether you’re customizing revenue data for ad networks or routing events with specific conditions, Connection Builder gives you the power to build seamless, tailored workflows - no engineering bottlenecks required.
Apphud’s latest update introduces Connection Builder, a flexible tool that enables you to send subscription events to any third-party service, even if it’s not among the pre-built integrations like AppsFlyer, Meta (Facebook) Conversions API, or Amplitude.
With Connection Builder, you can build custom integrations in just a few steps:
For example, here’s a simple POST body that sends the event name:
{ "event_name": "{{ event.name }}" }
You can use a wide range of macros to customize the request payload. Below are some useful examples:
{{ event.receipt.transaction_id }}
– Unique transaction ID of a purchase.{{ event.receipt.proceeds }}
/ {{ event.receipt.proceeds_usd }}
– Revenue from the purchase in local currency or USD.{{ user.attribution.fbc }}
– Facebook Click ID (fbclid
), useful for Meta’s Conversions API.{{ user.click_event.properties.some_click_id }}
– Any custom URL parameter from a Web-to-App campaign (e.g., some_click_id
).{{ user.user_properties.some_property_name }}
– Custom user-defined property passed via Apphud SDK.See the full list of macros in our Connection Builder documentation.
With Connection Builder, you can embed conditional logic directly in your request body using Liquid if/else
tags.
Example: Send a has_idfa
flag based on the availability of IDFA:
"has_idfa": {% if user.idfa %} 1 {% else %} 0 {% endif %}
You can also apply conditions to multi-line blocks or entire JSON payloads:
{% if user.country == "US" %} { "region": "NA" } {% else %} { "region": "Other" } {% endif %}
Transform values on the fly using built-in modifiers. Examples include arithmetic operations, string formatting, and date formatting.
Arithmetic:
"revenue_x2": {{ event.receipt.price | times: 2 }}
String case formatting:
"product": "{{ event.receipt.product_id | upcase }}"
Date formatting:
"event_time": "{{ event.created_at | date: "%Y-%m-%d %H:%M:%S.000" }}"
UNIX timestamp:
"timestamp": "{{ event.created_at | date: "%s" }}"
For more on date formatting, check this Liquid guide.
Add powerful event filters to ensure only specific data is sent to a destination. For example:
These filters can be applied per connection for precise control.
Here are some popular ways to use Connection Builder:
Marketers often want to control what value is passed to ad platforms - for instance, assigning a custom value to free trials or inflating revenue to reflect LTV.
"value": {% if event.receipt.trial_period %} 10 {% else %} {{ event.receipt.price | times: 2.5 }} {% endif %}
This sends 10
for trial conversions and 2.5x the original price for standard purchases.
To optimize for annual plans in Meta Ads or another platform, you might want to rename those events.
Option 1: Use conditional logic in a payload
"event_name": {% if event.receipt.price_usd > 20 %} "annual_purchase" {% else %} "{{ event.name }}" {% endif %}
Option 2: Create two separate connections with filters
Connection A
Filter: Product Duration = Yearly
Body: "event_name": "annual_purchase"
Connection B
Filter: Product Duration != Yearly
Body: "event_name": "{{ event.name }}"
Developers can enhance ad campaign performance by passing predicted LTV (Lifetime Value) instead of actual revenue. Apphud supports special macros:
{{ user.pltv_30d }}
– Predicted LTV over 30 days{{ user.pltv_365d }}
– Predicted LTV over 365 daysExample:
"value": {{ user.pltv_30d }}
This allows ad networks to optimize for high-value users even before full revenue is realized.
If you're working with custom ad networks, you can pass your own click IDs for improved attribution.
There are two main ways to do this:
Option 1: Using user properties
If you save custom click IDs via the Apphud SDK or API:
"value": {{ user.user_properties.custom_click_id }}
Option 2: Using Web-to-App campaigns
If you're using Apphud’s Web-to-App solution, you can capture and forward click parameters directly from the original click event:
"value": {{ user.click_event.properties.custom_click_id }}
This is particularly useful for custom attribution pipelines where you want to track ad performance using your own identifiers.
Apphud’s Connection Builder gives you complete control over how, when, and what data you send to any third-party platform. It’s designed for marketers, developers, and data engineers who need flexible workflows for attribution, analytics, and custom event handling, without being limited to built-in integrations.
Ready to build your first connection? Explore the full documentation here and sign up to Apphud today!