Skip to main content
When a user opens a DeepLink URL (e.g. from an email or ad), your app can receive the URL and navigate to the right screen. The DeepLink Flutter SDK helps you capture that URL and optional query/UTM parameters. After initializing the SDK with InvytoDeeplink.init(), you can listen for incoming link open events. The exact API depends on the invyto_deeplink package; a typical pattern is a stream or callback of URI or path + query. Example (adapt to your package’s API):
import 'package:invyto_deeplink/invyto_deeplink.dart';

// In your app (e.g. in initState of a root widget or in main after init):
void setupDeeplinkListener() {
  InvytoDeeplink.onLinkReceived((Uri uri) {
    // uri.path = e.g. "/sale", "/promo"
    // uri.queryParameters = UTM and other query params from the link
    final path = uri.path;
    final utmSource = uri.queryParameters['utm_source'];
    final utmCampaign = uri.queryParameters['utm_campaign'];
    // Navigate to the right screen
    if (path == '/sale') {
      navigatorKey.currentState?.pushNamed('/sale');
    } else if (path.startsWith('/product/')) {
      final id = path.replaceFirst('/product/', '');
      navigatorKey.currentState?.pushNamed('/product', arguments: id);
    }
  });
}
Check the invyto_deeplink documentation for the exact method names (onLinkReceived, getInitialLink, etc.).

Deferred deep linking

If the user did not have the app installed when they clicked the link, they are sent to the store. After they install and open the app, you still want to show the same content (e.g. the sale page). This is deferred deep linking.
  1. First launch after install — The DeepLink backend stores the click (and UTM/path) and matches it to the install (e.g. via Track Install or SDK init).
  2. SDK or API — On first launch, the SDK or your call to the Track Install API returns attribution (e.g. path, UTM). Use that to navigate the user to the right screen.
Example flow:
  • User taps https://yourapp.deeplink.com/sale?utm_campaign=summer.
  • User goes to store, installs, opens app.
  • Your app calls InvytoDeeplink.init() (or Track Install API); the backend returns something like { "path": "/sale", "utm_campaign": "summer" }.
  • Your app navigates to the sale screen and can log the campaign.
Implementation details depend on the invyto_deeplink API; use the initial attribution payload to drive the first navigation.

UTM and query parameters

DeepLink links can include UTM and custom query parameters. When you handle a link (or deferred deep link), read uri.queryParameters or the attribution response and pass them to your analytics or routing:
  • utm_source, utm_medium, utm_campaign, utm_term, utm_content
  • Any custom keys you add when creating the link in the dashboard

Next steps

  • Create links in the Dashboard and set paths and UTM.
  • Use the Track Install API to record installs and get attribution if you are not using the SDK for that.