Published July 3, 2024 by David Hecht
Last Updated October 29, 2024
You may be familiar with advertising click IDs (such as Gclid, Msclkid, and Fbclid) that are generated when users click on your ads on platforms like Google, Microsoft, and Facebook, respectively.
But are you using these ad click ID values to track and optimize your online advertising?
You can even connect a click ID to a specific Lead it generated in Salesforce, to finally understand which specific ads and targeting resulted in later offline conversions and sales.
In this article, we are going to do a deep dive on ad click IDs: what they are, how to enable them in your advertising settings, how to capture them in Salesforce, and ways you can use them to improve your marketing results.
Advertising click IDs are parameters that are automatically added to your ad URLs by online advertising platforms such as Google Ads, Microsoft Adcenter, and Facebook / Instagram. You may also hear them referred to as tags.
For example, you will see Google add a value to the end of your landing page URLs (the links to your website from Google ads), such as:
https://yoursite.com/?gclid=EAIaIQobChNIrqW8rcCYgAMVioKGCh10JA9GEYAYASAAEgI1CfD_BwE
In the link above, the tag or parameter added (gclid=) is the Google click ID or Gclid for short. And the value that Google automatically assigned to it, EAIaIQobChNIrqW8rcCYgAMVioKGCh10JA9GEYAYASAAEgI1CfD_BwE, is the unique code that identifies a user clicking on your ad.
Note that you cannot control or reuse these id values in your links, they are automatically added by the advertising platforms to identify a user’s click on your ad.
What is the value of understanding ad clicks, aside from improving your general knowledge of how one part of online ad tracking works?
Because Ad clicks help identify a particular interaction with your advertising. In the case of Google’s Gclid, it helps attribute a conversion to a specific campaign, ad group, keyword, and individual ad. It is a record of what happened that can be used to improve your advertising campaigns, and prove the return on investment (ROI) of particular marketing efforts.
With advertising IDs you can see which campaigns are driving the most conversions, as well as have a way of tagging the individual conversions themselves, so you can see when they produce sales in Salesforce.
To add Google Click IDs (gclids) to your Google Ad links, simply ensure a feature called auto-tagging is enabled. Log into your Google Ads account, and check the following:
Auto-tagging is simple to enable, but keep in mind that gclids can be up to 100 characters long. So ensure that your website and any redirects can handle a tag value of that length. When in doubt, check with your web developer and run some tests.
A number of years back there were also issues with enabling auto-tagging when you also had manual tags in your URLs (like utm_campaign, or content parameters unique to your website). There were issues with duplicate tracking data from combining both methods, but these have been fixed by Google.
Today many marketers combine both Google auto-tagging and manual UTM tags, since manual UTM parameters are required for systems like CloudAmp to capture data into Salesforce, and provide a way of better structuring your tracking data.
If you have Google Ads connected to Google Analytics, analytics will use the gclids to pull information about the visitor who clicked on your ad. There is even a setting on the Google Analytics side to “Allow manual tagging (UTM values) to override auto-tagging (GCLID values)”
Microsoft Advertising (formerly Bing Ads) uses the Microsoft Click ID (MSCLKID) to track user activity via the UET tag on your website. (Note there is a K in msclkid, unlike the Google gclid and Facebook fbclid tags).
Microsoft Ads are considered a more affordable option compared to Google Ads, so many marketers run similar campaigns on both platforms to maximize traffic and leads.
Universal Event Tracking (UET) is the tag on your website that records what customers do, and relays the data back to Microsoft Advertising for conversion tracking, automated bidding features, and audience targeting.
The msclkid click ID will be included in all subsequent UET events fired whenever the same customer visits your page, thereby allowing you to track the conversion from this customer on your site.
Facebook Click IDs (fbclid) are automatically added to your Facebook and Instagram advertising links, as well as external links in regular, non-sponsored posts.
There is no setting to enable them, and you will not be able to create ads with fbclids in the URLs — the fbclid parameter and string of characters must be added by Facebook and is unique to that click.
The one setup step required is making sure you have the Facebook Pixel installed on your website. This code allows you to track conversions and user behavior on your site, and sends this data back to Facebook.
There are several options for recording the various advertising click IDs in your Salesforce leads, so you can see which advertising created an individual lead.
Most importantly, capturing this data gives you visibility into offline conversions that might happen weeks or months later in Salesforce. By offline conversions, we mean sales that happen at some point in the future, long after the visit to your website from a user clicking on an advertisement.
While Google, Microsoft and Facebook can provide tracking from sales that happen during the initial visit from an ad, such as in some eCommerce, for more considered purchases such as B2B software or higher ticket consumer items, Salesforce can help you attribute sales that happen “offline” to the original advertising campaign and targeting that brought that lead to you originally.
You can also upload that conversion data with ad IDs back into Google and Microsoft advertising, though normally just for conversions within 90 days. So if you have a longer sales cycle, you may need to upload conversions to leads, or from leads to open opportunities, rather than click IDs with closed won opportunities. We’ll get into that in more detail later in this article.
There are three basic ways to capture ad clicks in Salesforce:
Your organization may have already developed custom code to add UTM tags and other source data in your Salesforce web-to-lead forms. If so, you should ask your web developer to begin capturing the 3 ad click parameters (gclid, msclkid, fbclid) as well.
The ad click parameters should be able to be captured similarly to any other URL parameter, though they are a bit longer than your typical parameter value (60 – 100+ characters typically).
If you are an advanced Google Tag Manager (GTM) user, you can use it to create a script that will capture Ad click ID parameters, though you will still need to do some custom work to use the values.
Many marketers should be able to use their marketing attribution software to capture ad click parameters, though not all will have that capability, or expose the values inside Salesforce leads.
Since we provide the CloudAmp Campaign Tracker software for Salesforce, this article will provide instructions on how to implement that software to capture click IDs. CloudAmp captures all three ad click IDs (gclid, msclkid, and fbclid) from both the first and last touch (first and last visits to your website), so you get a complete picture of how a lead interacted with your advertising.
Once the Campaign Tracker is installed and working, you can test to make sure the ad click parameters are successfully showing up in Salesforce. For testing, you do not need to click on one of your ads, but can use our spreadsheet template download to generate test URLs, and add a test gclid, msclkid, or fbclid parameter at the end of any URL in this format:
&gclid=9949435394i5322urwiehr
So a test URL format would be similar to:
https://www.yoursite.com?utm_campaign=CampaignOct23&utm_medium=PPC&utm_source=Google&utm_id=Goog_04&utm_content=Adgroup3&utm_term=Keyword3&gclid=9949435394i5322urwiehr
Once you have submitted a test lead or two, check Salesforce. You will see the gclid value from your URL in either the “First gclid” or “Last gclid” field on the new lead. Similarly, the msclkid and fbclid values will be in the “First msclkid” or “Last msclkid” fields, and the fbclid in the “First fbclid” or “Last fbclid” fields.
When you associate click IDs with individual leads in Salesforce, you can analyze the performance of your campaigns in a much more accurate way. Not only can you understand which campaigns drive the most leads and conversions, but you can attribute offline conversions and revenue to each campaign, and calculate the return on investment (ROI).
Automated tools such as Google’s Smart Bidding and Microsoft Advertising Bid Strategies will use Gclid and Msclkid data respectively to adjust your CPC bids dynamically based on their estimates of a click resulting in a conversion.
But only by connecting ad click ID data with CRM systems like Salesforce will enable you to get a holistic view of your campaigns, tracking the entire funnel from ad click to conversion to sale.
Frustratingly, none of the advertising platforms allow you to look up the ad clicks directly in their reporting interfaces, so you cannot review the ads and keywords from individual conversions. All 3 only make the Ad IDs (gclid, msclkid, and fbclid) available via their API reporting interfaces, which requires custom coding. Google and Microsoft do allow you to import offline conversion data with ad IDs from Salesforce however.
So here are some specific techniques you can use with Ad click IDs in Salesforce. We’ll start with general optimization strategies, and then go into specifics about how you can review Ad IDs stored in Salesforce on each advertising platform.
Inside of Salesforce, you can use conversions associated with Click IDs, as well as other campaign values such as utm_campaign or utm_term (keyword) to optimize advertising campaign performance in the following ways:
Keyword Optimization
Budget Optimization
Cross-Channel Insights
Next we’ll explore how you can feed conversion and ad click ID data from Salesforce back into Google and Microsoft ad platforms, to optimize targeting and bidding automation there.
We’ve previously provided a detailed guide on how to connect Salesforce and Google Ads using gclid data in Salesforce, and the existing data import tool in Google Ads. For complete details, please see our post How to Connect Salesforce and Google Ads.
That guide will help you automatically import conversion data from Salesforce to Google, to optimize your advertising through Conversion Goals. Here is an example of a Conversion Goal importing Closed Won opportunity data from Salesforce with associated Gclids back into Google Ads:
Importing your offline conversions with Gclids from Salesforce or other sources back into Google Ads seems to be the primary way Google allows you to use Gclids.
Unfortunately Google seems to have removed the ability for advertisers to look up individual advertising clicks via gclid in Google Ads. I am not sure when it was last available, but their often confused AI seems to still think it is possible as of June 2024:
It would seem that Google wants advertisers to use their automated bidding and conversion optimization tools, and does not want users able to easily correlate individual clicks with search terms and campaigns to do manual optimization.
This is disappointing, as reviewing this data can help advertisers understand their targeting and keywords much better. In addition, I have found manual optimization of Google Ads to be more effective for advertisers who do not have a high volume of leads coming through paid search, especially if you want to optimize for offline conversions common in B2B sales.
Apparently if you want to analyze GCLID data directly, the gclids are accessible using Google Ads API or Adwords BigQuery Transfer.
So if you have an experienced developer on your team (unlikely) and they have spare cycles (impossible), perhaps you can get them to write a custom reporting interface to pull the Gclid data from the Google Ads API. This is not something we have done, so I cannot give you an overview of how it might work.
In Google Analytics GA4, there is a dimension in the reporting called Landing Page + Query String which contains all of the query parameters on the URL. So you can use that dimension to filter on gclid in both standard and exploration reports.
In addition, if you create a custom dimension for gclid data, you can view Google Ads as a source in your reports. This isn’t a great substitute for being able to see the data in Google Ads directly, but advanced Google Analytics users will likely find it useful.
To create a custom dimension, follow these steps:
Similarly to Gclids and Google Ads, Msclkid is not available as a dimension in the Microsoft Ads reporting interface. You can import data from Salesforce with your msclkids to register offline conversions in the conversion tracking, however. This will enable you to track conversion and revenue performance from your Microsoft ads.
You can create offline conversion goals in Microsoft Ads, and then import leads or sales (opportunities) from Salesforce that have msclkid values, as long as the conversion is uploaded within 90 days of the last ad click.
To set up Microsoft Ads Offline Conversion Tracking Imports:
Once you have created a conversion goal, you can begin uploading the conversions after a 2 hour waiting period. Offline conversion files can be uploaded once, on a schedule, or using APIs.
To Prepare your offline conversion data for import
Import offline conversions from Salesforce to Microsoft Ads once
Once you have prepared your Excel or CSV file:
Because fbclid is not directly available as a dimension in Facebook Ads Manager, you’ll need to correlate it with the captured data in your Salesforce leads.
You should be able to achieve this by creating a custom report in the “Ads Reporting” section of Facebook Ads that shows conversions and related performance metrics. If you have a high volume of conversions in Facebook and leads in Salesforce, it may be difficult to correlate them precisely however.
Facebook does have a Conversions API which software developers can use to import offline conversions via CSV file, but it requires some technical expertise as there does not seem to be a UI to do it.
As you can see from the length of this article, capturing and using ad click IDs can be a complex undertaking. If you need assistance setting up the GCLID or MSCLKID integrations / uploads with Salesforce, and optimizing your Ads with Salesforce lead and opportunity conversion data, CloudAmp can help.
Not yet a CloudAmp customer? The CloudAmp Campaign Tracker is an affordable monthly subscription, and has a 30 day no obligation trial so you can test it out in Salesforce.
To get more data about your Leads in Salesforce, including full source attribution and page view data to prove ROI and improve your marketing, contact us for more information today.
CloudAmp Apps for Salesforce |