Overview
The sameattribution contract serves Braze, Meta, TikTok, GA4, Google Ads
conversions, S3 exports and event-derived webhooks. GA4 additionally accepts its
own ga4 identity/session object. Use the destination matrix below to check what
each integration sends.
Attribution tracking in Masivo enables you to measure and analyze the complete customer journey across all touchpoints. By implementing proper attribution parameters, you can track which marketing campaigns, channels, and touchpoints drive customer behavior, purchases, and engagement. This guide covers the complete attribution system, from generating tracking IDs to analyzing campaign performance.
Attribution data is automatically collected from deeplinks and can be manually
attached to events. All attribution parameters are optional but provide
valuable insights when implemented consistently across your marketing
campaigns.
Delivery to connected destinations
Send the captured context inattribution on each event, including the purchase
at checkout. Single-event and bulk ingestion preserve the same fields. Masivo
does not look up a customer’s previous campaign to fill missing purchase UTM;
retaining the context between landing, login, app navigation and checkout is the
client’s responsibility. A tracking ID alone does not populate missing UTM.
Non-empty fields at the event’s top level take precedence over attribution,
then legacy properties. Empty values do not erase captured context. The original
nested attribution object remains available in storage and exports.
Use real client cookies and click IDs. Masivo does not fabricate Meta
fbc from
UTM or from the purchase timestamp, and does not synthesize a Google or TikTok
click ID. Existing identifier consent filters continue to apply.
Provider references: Braze event properties,
TikTok’s official Events API mapping,
and Google Ads conversion identifiers and custom variables.
Google Ads custom variables require separately configured conversion-variable IDs
and are not supported with gbraid/wbraid; this integration does not configure
them automatically.
Check a complete journey
Use a test customer and configured event destinations in the environment running these changes. Enable events/purchases and allow the test event type in the connection filters.offer_opened must be an active custom event in your account.
- Open a Masivo short link with
?utm_source=braze&utm_medium=email&utm_campaign=qa_attribution&utm_content=button&utm_term=offer. Check that the final URL retains those values. For apps, repeat with the app installed and with deferred resolution after a fresh install. - Read the context from that final URL and keep it through login/navigation.
Send
offer_openedfrom the SDK with thatattribution, then callawait masivo.flush(). Inspect the request body to confirm the context reaches Masivo. Flush confirms SDK delivery to Masivo; provider delivery is asynchronous. - Make a purchase through your checkout backend. Its
POST /api/storefront/v1/behavior/eventsrequest must carry the same context. The backend authenticates with its SERVER-key credentials. CLIENT-key SDKs cannot send the protectedPURCHASEevent. The following example omitsissued_atso the API uses the current time. Replace the customer, SKU, order ID and currency with your test values, using a new order ID for every run.
- For GA4, include the real
ga4identity/session object separately on both events. For paid-media matching, use a real ad click and forward the captured provider identifiers/cookies. Synthetic values test transport, not paid-media attribution. Google Ads conversions without a native click ID are skipped. - After the integration workers run, inspect the custom event and purchase in
each destination. In Braze, check event and purchase properties; in Meta and
TikTok, inspect the event payload; in GA4, inspect the event parameters (use
debug_mode: truefor a debug session). Compare against the destination matrix above:utm_campaignmust remainqa_attribution. Check integration errors if a payload does not arrive. A successful connection test alone does not establish that this purchase was delivered. - Inspect an S3 export after its configured export job and a webhook generated by that event. Webhooks for rewards or tier changes require that the purchase actually triggers those actions. Both should retain the context in the matrix.
- Reverse the test purchase using
POST /api/storefront/v1/behavior/events/{eventId}/reversewith{ "reason": "Attribution QA" }, using the Masivo event ID returned for the purchase. Check the GA4refund, Braze reversal purchase properties, and any resulting webhooks for the original UTM. Meta must not receive the reversal as anotherPurchaseconversion.
Understanding Attribution Parameters
Attribution Data Structure
Attribution data in Masivo consists of several key parameters that help track the customer journey:How Attribution Works in Masivo
Attribution data flows through the system in several ways:- Automatic Collection: Generated automatically when customers click deeplinks
- Event Attribution: Manually attached to events via the API
- Purchase Handoff: Your application retains the context and forwards it to the checkout backend
- Analytics: Aggregated for campaign performance analysis
Campaign links
Masivo preservesutm_source, utm_medium, utm_campaign, utm_term, and
utm_content. Non-empty incoming values override the stored destination’s
values. Missing destination fields first use the selected fallback URL,
including campaign fields inside a Play Store referrer. Only fields still
missing on internal campaign links receive these defaults:
The default campaign is the link’s
campaign_id, or template_id if there is
no campaign. Explicit values remain unchanged. In-app/news-feed navigation
and external links do not receive automatic acquisition labels. Existing
links use these rules when clicked, without rewriting stored links.
For example, a Braze email should explicitly carry utm_source=braze and
utm_medium=email. A Meta ad can use utm_source=facebook and
utm_medium=paid_social, with its campaign in utm_campaign. Masivo preserves
these labels rather than replacing the source with the name of the shortener.
fbclid alone does not provide a manually tagged GA4 campaign.
The same UTM context travels through the direct destination, HTTPS fallback,
Android Intent and installed-app resolution ($app-found=true). Google Play
receives UTM inside its encoded referrer, alongside Masivo’s tracking_id
and link. Existing referrer fields are preserved. Editing UTM in the dashboard
also preserves unrelated query parameters and URL fragments.
1. Tracking ID Generation and Usage
Understanding Tracking IDs
Thetracking_id is a unique identifier that connects customer actions across your marketing funnel. It’s automatically generated for deeplinks and can be manually created for custom tracking scenarios.
Automatic Tracking ID Generation
When customers click on a Masivo deeplink, atracking_id is automatically generated:
Extracting Tracking ID from URLs
In your application, extract thetracking_id from URL parameters to maintain attribution throughout the customer journey:
Using Tracking ID in Events
Once you have thetracking_id, include it in attribution data when sending events:
2. UTM Parameters and Campaign Tracking
Understanding UTM Parameters
UTM parameters are standardized tags that help track the effectiveness of marketing campaigns:utm_source
Identifies the traffic source:"google"- Google search or ads"facebook"- Facebook ads or posts"email"- Email campaigns"newsletter"- Newsletter campaigns"organic"- Organic/direct traffic
utm_medium
Describes the marketing medium:"cpc"- Cost-per-click advertising"email"- Email marketing"social"- Social media"push"- Push notifications"sms"- SMS campaigns
utm_campaign
Names the specific campaign:"summer-sale-2024""new-user-onboarding""cart-abandonment-recovery"
utm_term
Used for paid search keywords:"premium headphones""wireless earbuds"
utm_content
Differentiates ad variations:"banner-ad-v1""email-button-cta""video-ad-30s"
Implementing UTM Tracking
3. Revenue and Cost Attribution
Tracking Revenue Attribution
Revenue attribution helps measure the financial impact of marketing campaigns and track the revenue and cost at each step of the customer journey until completion, providing a complete view of campaign ROI:Cost Tracking for Campaign Analysis
Track marketing costs to calculate ROI:Google Analytics 4 attribution
Theattribution object records Masivo tracking and UTM context. GA4 session
attribution additionally requires the real Google tag/Firebase identity and
session, supplied separately in the event’s optional ga4 object.
Masivo short links preserve incoming UTM through destination, app resolution
and fallback URLs. Google Play receives UTM inside referrer with Masivo’s
tracking ID. Non-empty incoming UTM override the destination configuration.
Internal email, push and WhatsApp links fill absent source/medium with
masivo and email, push or whatsapp; external links and internal
in-app/news-feed navigation do not receive an automatic acquisition source.
Keep explicit Braze/Meta labels when using their campaigns. A Masivo short
URL or a tracking_id alone does not identify a Google Analytics session.
See Google Analytics integration for the
web/app contract, legacy fallback and end-to-end verification steps.