Shared Links
Track and analyze links created by your app users through the mobile SDK.
Overview
When your app has a "Share" button that creates short links via the SDK, those links appear on the Shared Links page in your dashboard. This gives you visibility into:
- Which users share the most
- What content gets shared
- How many clicks shared links receive
- Sharing trends over time
Shared Links are separate from marketing links you create in the dashboard or via the API. They have their own dedicated page with sharing-specific analytics.
Before your app can create shared links:
- Integrate a mobile SDK -- see React Native, Expo, iOS, or Android
- Configure an API key in your SDK initialization
- Create at least one link template -- the SDK uses your default template, or you can pass a specific
templateId
How It Works
- A user taps "Share" in your app
- Your app calls
createLink()with anexternalUserIdidentifying the user anddeepLinkParametersdescribing the content - The server creates a short link (or returns an existing one if this user already shared this content)
- Your app shares the returned URL
- The link and its analytics appear on the Shared Links dashboard
Per-User Deduplication
When both externalUserId and deepLinkParameters are provided, the SDK endpoint automatically deduplicates links:
- Same user + same content = returns the existing link (no duplicate created)
- Different user + same content = creates a new link (enables per-user attribution)
- Same user + different content = creates a new link
When an existing link is returned, the response includes deduplicated: true. This lets your app know no new link was created.
Without deduplication, a user tapping "Share" 10 times on the same product creates 10 identical links. With deduplication, they always get the same link -- keeping your dashboard clean and enabling accurate per-user share analytics.
Deduplication is only active when both externalUserId AND deepLinkParameters are provided. If either is missing, a new link is always created.
What counts as "the same link" is exactly four things: the workspace, the template, the externalUserId, and the deepLinkParameters (compared by value, so key order doesn't matter). Nothing else is part of it.
On a match, the existing link comes back unchanged. A new title, description, ogTitle / ogDescription / ogImageUrl, utmParameters, webFallbackUrl or launchpadMode in the repeat call is not applied. To change those for content a user has already shared, delete the link from the dashboard (see Deleting a shared link) and create it again, or change the deepLinkParameters.
Creating Shared Links from Your App
Set the User ID
Call setExternalUserId() once after the user logs in. The SDK automatically attaches it to all createLink() calls:
// React Native / Expo
LinkForty.setExternalUserId(currentUser.id);
// On logout
LinkForty.setExternalUserId(null);
// iOS
LinkForty.shared.setExternalUserId(currentUser.id)
// On logout
LinkForty.shared.setExternalUserId(nil)
// Android
LinkForty.shared.setExternalUserId(currentUser.id)
// On logout
LinkForty.shared.setExternalUserId(null)
Create a Shared Link
Once the user ID is set, createLink() includes it automatically:
React Native / Expo
import LinkForty from '@linkforty/mobile-sdk-react-native';
// or: import { LinkForty } from '@linkforty/mobile-sdk-expo';
const result = await LinkForty.createLink({
deepLinkParameters: { route: 'PRODUCT', id: '456' },
title: 'Check out this product',
});
if (result.deduplicated) {
console.log('Returning existing link for this user + content');
}
// Share result.url with the user
await Share.share({ url: result.url });
You can also pass externalUserId per-call to override the SDK-level value:
const result = await LinkForty.createLink({
externalUserId: specificUser.id, // overrides SDK-level value
deepLinkParameters: { route: 'PRODUCT', id: '456' },
});
iOS (Swift)
let result = try await LinkForty.shared.createLink(options: CreateLinkOptions(
deepLinkParameters: ["route": "PRODUCT", "id": "456"],
title: "Check out this product"
))
if result.deduplicated == true {
print("Returning existing link for this user + content")
}
// Share result.url
Android (Kotlin)
val result = LinkForty.shared.createLink(
CreateLinkOptions(
deepLinkParameters = mapOf("route" to "PRODUCT", "id" to "456"),
title = "Check out this product"
)
)
if (result.deduplicated == true) {
println("Returning existing link for this user + content")
}
// Share result.url
Dashboard
Navigate to Shared Links in the left sidebar to view your sharing analytics.
Summary Stats
Four cards at the top of the page show:
| Stat | Description |
|---|---|
| Total shared links | Total number of links created via the SDK |
| Unique sharers | Number of distinct externalUserId values |
| Total clicks | Combined click count across all shared links |
| Shares today | Links created via the SDK today |
Links Table
Each row shows the link's user (its externalUserId, or the short code when there is none), its short link, its clicks and when it was created. Newest first.
Click a row to expand it. The panel shows everything your app sent when it created the link:
| Field | Description |
|---|---|
| Link ID | The link's id, with a copy button — the same linkId the create call returned |
| User, Short Link, Clicks, Created | As in the row; the short link has a copy button |
| Title, Description | title, description |
| OG Title, OG Description, OG Image | ogTitle, ogDescription, ogImageUrl — what the link unfurls with when shared |
| Web Fallback URL, store URLs | Where the link sends a visitor without the app |
| utm_* | Each UTM parameter |
| Launchpad | launchpadMode, when it isn't the workspace default |
| Template, Dedup Hash | The template the link was created under, and its deduplication key |
| deepLinkParameters.key | Each deep link parameter, under the name your app sent it with |
Fields your app didn't send are left out.
Deleting a shared link
Members who can delete links see Delete link at the bottom of the expanded panel. Deleting is permanent:
- The link stops working immediately for anyone who already has it, and its click history is removed.
- Installs and in-app events already attributed to it stay in your analytics, no longer tied to a link.
- If your app later creates a link for the same user and the same
deepLinkParameters, it gets a new short code — the old one is not restored.
Filtering
Use the User filter pill to search by external user ID. The search matches partial user IDs.
Best Practices
Use Stable User IDs
Pass a persistent, unique identifier as externalUserId -- such as a database user ID or Firebase UID. Avoid transient values like session IDs or anonymous tokens, as these break deduplication and make the top sharers list meaningless.
Always Include Deep Link Parameters
Deep link parameters serve two purposes: they route users to the right content after install, and they're part of the deduplication key. Without them, deduplication won't activate.
// Good -- deduplication works, content is identifiable
await LinkForty.createLink({
externalUserId: user.id,
deepLinkParameters: { productId: '123', category: 'shoes' },
});
// Less useful -- no deduplication, content unknown in dashboard
await LinkForty.createLink({
externalUserId: user.id,
});
Use Descriptive Parameter Keys
The deep link parameters appear in the Shared Links table as badges. Use human-readable keys so your team can identify what content was shared at a glance.
Related Guides
- Creating Links -- create links via the dashboard and API
- Link Templates -- required for SDK link creation
- SDK Integration -- set up mobile attribution
- React Native SDK | Expo SDK | iOS SDK | Android SDK