× Exclamation Point Icon Important: As we continue to evolve and improve our offerings, we have decided to retire the SharpSpring Ads (formerly Perfect Audience) platform on August 15, 2024. Click here to learn more.
Home > Ads > Ad & URL Click Tracking > Using Click URL Macros in Your Ads

Using Click URL Macros in Your Ads

Ad macros allow you to use extra data in your ad click URLs. Data is automatically filled into the click URL when your ad is served, allowing you to track specific information about your site visitors.

To use the ad macros, either edit or create a new ad. Look for the Click URL field.

These are the macros currently available for use:

  • {idfa} - Identifier for Advertisers (iOS, More info here.)
  • {gps_adid} - Google Play Store ID (More info here.)
  • {android_id} - Identifier for Advertisers (Android, More info here.)
  • {domain} - The domain the user was visiting when served your ad.
  • {appId} - iTunes AppId of the app the user was running when served your ad. 

To use a macro, add a ? to the end of your click URL, then a keyword to use for the macro, followed by the macro displayed above.

For example, if I wanted to track the domain the user was on when they clicked my ad, my click URL would look something like this:


If the user saw the ad on www.huffingtonpost.com, when they click the ad, the URL would become:


You can track multiple macros in the URL by using an & between the macro keywords. For example, this URL would track both the domain and the IDFA of the user:


Continue creating your ad like you normally would and save when you're done.

That's it! Let us know if you have any questions by emailing ads@sharpspring.com.