Tracking Links
Capture click IDs from ad campaigns, detect the ad network, and route users to the right store experience.
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
- Route to app store -- send Meta and TikTok traffic directly to the store, while Google Ads uses a compliant landing page with store buttons
Link URL Format#
https://your-domain.com/api/c/{linkId}https://your-domain.com/g/{linkId}Create tracking links in the AppRefer dashboard under the Links page for your app. Google links are displayed with the /g/ path automatically; all other networks continue using /api/c/.
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.
https://apprefer.com/api/c/your_meta_linkfbclid={{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}}https://apprefer.com/g/your_google_linkcampaign_id={campaignid}&campaign_name={campaignname}&adgroup_id={adgroupid}&keyword={keyword}Google Uses a Landing Page
/g/{linkId} with App Store and Google Play buttons. Meta and TikTok links are unchanged and continue using the direct /api/c/{linkId} flow.Google Landing Page Content#
Google links automatically pull public App Store and Google Play metadata from your app's configured store URLs. The page can populate with app name, description, screenshots, rating/proof, and store buttons with no extra setup. Add a headline, short description, screenshots, feature bullets, rating/proof, and an optional review quote only when you want to override the store content.
{
"headline": "Track better workouts on your phone",
"subheadline": "Plan sessions, compare progress, and stay consistent.",
"features": [
"Build workouts around your goals",
"See progress after every session",
"Install from the official app stores"
],
"imageUrls": [
"https://example.com/screenshot-1.png",
"https://example.com/screenshot-2.png"
],
"rating": "4.8 stars",
"proof": "Trusted by 10k+ lifters",
"testimonial": "Makes tracking my gym routine simple.",
"testimonialAuthor": "App Store review"
}https://apprefer.com/api/c/your_tiktok_linkcampaign_id=__CAMPAIGN_ID__&campaign_name=__CAMPAIGN_NAME__&adgroup_id=__AID__&adgroup_name=__AID_NAME__Macro Syntax Varies by Network
{{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.