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, ttclid, or oppref 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 and ChatGPT Ads use crawlable landing pages with store buttons
Link URL Format#
https://your-domain.com/api/c/{linkId}https://your-domain.com/g/{linkId}https://your-domain.com/o/{linkId}Create tracking links in the AppRefer dashboard under the Links page for your app. Google and ChatGPT Ads links are displayed with /g/ and /o/ paths respectively; direct-redirect networks continue using /api/c/.
Custom Store Product Pages#
A tracking link can override the default store destination for each platform. Use an App Store Custom Product Page URL for iOS and a Google Play Custom Store Listing URL for Android. If a per-link destination is blank, AppRefer falls back to the app's default store URL from Settings.
{
"storeVariantKey": "creator_a",
"iosStoreUrl": "https://apps.apple.com/us/app/example/id1234567890?ppid=abc123",
"androidStoreUrl": "https://play.google.com/store/apps/details?id=com.example.app&listing=creator_a"
}Android Install Referrer Is Preserved
listing parameter so Google Play can show the custom store listing.Query Parameters#
| Parameter | Source | Description |
|---|---|---|
| fbclid | Meta (Facebook) | Facebook click identifier |
| gclid | Google Ads | Google click identifier |
| ttclid | TikTok | TikTok click identifier |
| oppref | ChatGPT Ads | Opaque OpenAI click reference |
| 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, oppref = ChatGPT Ads
- 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}https://apprefer.com/o/your_openai_linkChatGPT Ads appends oppref
oppref yourself. OpenAI adds it to a real ad click. Because ChatGPT Ads does not currently offer dynamic campaign URL macros, configure the external campaign/ad group/ad IDs on the AppRefer link itself.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.