Tracking Links

Capture click IDs from ad campaigns, detect the ad network, and route users to the right store experience.

  • 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
Default Tracking Link Format
https://your-domain.com/api/c/{linkId}
Google Ads Landing Page Format
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#

ParameterSourceDescription
fbclidMeta (Facebook)Facebook click identifier
gclidGoogle AdsGoogle click identifier
ttclidTikTokTikTok click identifier
campaign_idAll networksCampaign identifier
campaign_nameAll networksCampaign name (shown in dashboard)
adset_id / adgroup_idAll networksAd set / ad group identifier
adset_name / adgroup_nameMeta / TikTokAd set / ad group name
ad_idMetaIndividual ad identifier
ad_nameMetaIndividual ad name
utm_sourceAnyTraffic source name
utm_mediumAnyTraffic medium (cpc, cpm, etc.)
utm_campaignAnyCampaign name (fallback if campaign_name missing)

Network Detection Priority#

  1. Click ID presence -- fbclid = Meta, gclid = Google, ttclid = TikTok
  2. utm_source -- fallback if no click ID is present
  3. 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_link
Meta — 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/g/your_google_link
Google — paste in Final URL Suffix
campaign_id={campaignid}&campaign_name={campaignname}&adgroup_id={adgroupid}&keyword={keyword}

Google Uses a Landing Page

Google Ads can block uncertified third-party click trackers in the final URL. AppRefer Google links therefore use a real landing page at /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.

Optional landingPage payload
{
  "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"
}
TikTok — paste in Destination URL
https://apprefer.com/api/c/your_tiktok_link
TikTok — 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.

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.