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.
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 |
Top Sharers
Below the stats, a row of clickable chips shows your top 10 sharers ranked by link count. Each chip displays the user's external ID, number of links created, and total clicks received. Click a chip to filter the table to that user.
Links Table
The table shows all SDK-created links with the following columns:
| Column | Description |
|---|---|
| User | The externalUserId passed when creating the link |
| Content | Deep link parameters (shown as key-value badges) |
| Short Link | The generated short code with a copy button |
| Clicks | Total click count for this link |
| Created | When the link was created |
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