Tracking Links
Capture click IDs from ad campaigns, detect the ad network, and redirect users to the app store.
What Tracking Links Do#
- Capture click IDs -- extract fbclid, gclid, or ttclid from the URL query string
- Detect the ad network -- identify the source based on click ID presence, utm_source, or link defaults
- Record the click -- store the click for later attribution matching
- Redirect to app store -- send the user to the App Store or Play Store listing
Link URL Format#
Tracking Link Format
https://your-domain.com/api/c/{linkId}Create tracking links in the AppRefer dashboard under the Links page for your app.
Query Parameters#
| Parameter | Source | Description |
|---|---|---|
| fbclid | Meta (Facebook) | Facebook click identifier |
| gclid | Google Ads | Google click identifier |
| ttclid | TikTok | TikTok click identifier |
| campaign_id | All networks | Campaign identifier |
| campaign_name | All networks | Campaign name (shown in dashboard) |
| adset_id / adgroup_id | All networks | Ad set / ad group identifier |
| adset_name / adgroup_name | Meta / TikTok | Ad set / ad group name |
| ad_id | Meta | Individual ad identifier |
| ad_name | Meta | Individual ad name |
| utm_source | Any | Traffic source name |
| utm_medium | Any | Traffic medium (cpc, cpm, etc.) |
| utm_campaign | Any | Campaign name (fallback if campaign_name missing) |
Network Detection Priority#
- Click ID presence -- fbclid = Meta, gclid = Google, ttclid = TikTok
- utm_source -- fallback if no click ID is present
- Link default -- the network configured on the link itself
Ad Campaign Setup#
All ad platforms require the base URL and tracking parameters in separate fields. Copy each from the Links page in your dashboard.
Meta — paste in Website URL
https://apprefer.com/api/c/your_meta_linkMeta — paste in URL Parameters
fbclid={{fbclid}}&campaign_id={{campaign.id}}&campaign_name={{campaign.name}}&adset_id={{adset.id}}&adset_name={{adset.name}}&ad_id={{ad.id}}&ad_name={{ad.name}}Google — paste in Final URL
https://apprefer.com/api/c/your_google_linkGoogle — paste in Final URL Suffix
campaign_id={campaignid}&campaign_name={campaignname}&adgroup_id={adgroupid}&keyword={keyword}TikTok — paste in Destination URL
https://apprefer.com/api/c/your_tiktok_linkTikTok — add as Custom Parameters
campaign_id=__CAMPAIGN_ID__&campaign_name=__CAMPAIGN_NAME__&adgroup_id=__AID__&adgroup_name=__AID_NAME__Macro Syntax Varies by Network
Each ad network uses a different syntax for dynamic macros. Meta uses
{{fbclid}}, Google uses {gclid}, and TikTok uses __CLICKID__. These are replaced with actual values by the ad platform at serve time.Default Links#
AppRefer can auto-create default tracking links for Meta, Google, and TikTok with your configured App Store and Play Store URLs. Enable this in the Links page to get started quickly without manual link creation.