# Segment + Redirectly Attribution > Send Redirectly deep link attribution events to Segment. Track install sources, campaigns, and user attribution across your entire analytics stack with ease. - Canonical: https://redirectly.app/integrations/segment - Site: [Redirectly](https://redirectly.app) — deferred deep linking for Flutter & React Native Send install attribution and deep link events from Redirectly to Segment. Track which links drive your most valuable installs across your entire analytics stack. ## Attribution data in your analytics stack Redirectly captures rich install attribution data—which link drove the install, which campaign, which source. By forwarding this data to Segment, you centralize attribution alongside all other user behavior, enabling more powerful analytics and downstream integrations. ### Attribution data captured - **Link ID:** Which Redirectly link was clicked - **Campaign:** Campaign from link parameters - **Source:** Where the link was clicked from - **Device:** OS, device type, country - **Custom parameters:** Any data in the deep link ### What Segment enables - **Unified profiles:** Link attribution to user behavior - **Downstream destinations:** Send to 200+ tools - **Audiences:** Build segments based on attribution - **ROI analysis:** Measure campaign profitability - **Real-time dashboards:** Track attribution in real time ## Send attribution to Segment When a user installs your app after clicking a Redirectly link, capture the attribution data and send it to Segment. ```dart // lib/services/attribution_service.dart import 'package:segment_flutter/segment_flutter.dart' import 'package:redirectly/redirectly.dart' class AttributionService { final analytics = Segment() /// Called on app startup to capture install attribution Future captureInstallAttribution() async { try { // Get initial deep link from Redirectly final link = await Redirectly.getInitialLink() if (link != null) { // Track install with attribution data await analytics.track( 'Install Attributed', properties: { 'redirectly_link_id': link.id, 'redirectly_path': link.path, 'campaign': link.params['campaign'], 'source': link.params['source'], 'medium': link.params['medium'], 'content': link.params['content'], 'term': link.params['term'], // Include any custom parameters ...link.params, }, ) // Identify user with attribution data await analytics.identify( userId: getUserId(), traits: { 'attributed_link': link.id, 'install_source': link.params['source'], 'install_campaign': link.params['campaign'], }, ) } } catch (e) { print('Error capturing attribution: $e') } } /// Listen for deep link events during app lifecycle void listenToDeepLinks() { Redirectly.onDeepLink.listen((link) { // Track re-engagement through deep links analytics.track( 'Deep Link Opened', properties: { 'redirectly_link_id': link.id, 'path': link.path, 'campaign': link.params['campaign'], 'source': link.params['source'], ...link.params, }, ) }) } } ``` Call `captureInstallAttribution()` in your main app initialization to track installs. Set up the deep link listener to track re-engagement. ## Advanced attribution tracking Track more granular attribution events and connect them to downstream user behaviors like signup, purchase, and retention. ```dart // Track signup with attribution context Future signupUser(String email, String password) async { try { // Sign up in your backend final user = await _signupBackend(email, password) // Get attribution context from Redirectly final link = await Redirectly.getInitialLink() // Track signup with attribution await analytics.track( 'Signup Completed', userId: user.id, properties: { 'email': email, 'redirectly_link_id': link?.id, 'attributed_source': link?.params['source'], 'attributed_campaign': link?.params['campaign'], }, ) // Identify user await analytics.identify( userId: user.id, traits: { 'email': email, 'install_link': link?.id, 'signup_timestamp': DateTime.now().toIso8601String(), }, ) } catch (e) { print('Signup error: $e') } } // Track purchase with attribution Future recordPurchase(String orderId, double amount) async { final link = await Redirectly.getInitialLink() await analytics.track( 'Purchase Completed', properties: { 'order_id': orderId, 'amount': amount, // Connect to original install attribution 'install_link_id': link?.id, 'install_source': link?.params['source'], 'install_campaign': link?.params['campaign'], }, ) } ``` ## Forward attribution to 200+ tools Once attribution data flows into Segment, you can forward it to any destination. Popular integrations for attribution analysis include: ### Analytics & BI - Mixpanel (funnel attribution) - Amplitude (cohort analysis) - Google Analytics 4 (conversions) - Redshift / BigQuery (data warehouse) - Looker (dashboards) ### Advertising Platforms - Facebook Conversions API - Google Ads conversion tracking - TikTok Events API - Apple Search Ads - Adjust (attribution partner) ### CRM & Email - Hubspot (user properties) - Salesforce (account data) - Mailchimp (audience sync) - Intercom (user profiles) ### Retention & Engagement - OneSignal (push campaigns) - Braze (user journeys) - Apptentive (NPS) - Firebase Analytics ## Next steps Combine Redirectly attribution with Segment for complete analytics: - [Amplitude Attribution](https://redirectly.app/integrations/amplitude.md) - [Mixpanel Integration](https://redirectly.app/integrations/mixpanel.md) - [Flutter Deep Linking](https://redirectly.app/flutter-deferred-deep-linking.md) - [All Integrations](https://redirectly.app/integrations.md) --- Full site index for AI agents: https://redirectly.app/llms.txt