Are you using both Google Ads and Salesforce? Then this is a no-brainer!
Syncing Google Ads with Salesforce enables you to track and optimize your Google Ads campaigns by importing Salesforce data into Google Ads. This process helps in assessing the quality of the leads generated through Google Ads, ensuring that your marketing efforts are yielding high-quality sales opportunities.
Here’s a quick rundown on the process, ensuring that web forms capture the Google Ads Click ID (GCLID) and that Salesforce is configured to store this data, allowing you to send quality sales opportunity data back to Google Ads to optimize off of.
Step 1: Link Google Ads to Salesforce
Prerequisites:
- You need administrative access to both your Google Ads and Salesforce accounts.
- Salesforce’s Web-to-Lead feature should be enabled in your Salesforce instance.
Steps to Link Google Ads to Salesforce:
Google Ads First:
- Log in to your Google Ads account
- Navigate to the “Tools and Settings” menu, then select “Linked Accounts.”
- Find Salesforce and click “Details.”
- Click the “Link” button to start the linking process
- Follow the on-screen instructions to authorize the connection between Google Ads and Salesforce
Then in Salesforce:
- Ensure that the Salesforce account is prepared to receive data from Google Ads. No special configurations are typically required for this step, but it’s essential to verify that your user profile has the necessary permissions to interact with external systems
Step 2: Set Up Web Forms to Capture Google Ads Click ID (GCLID)
The Google Click ID
The GCLID is a parameter added to the URL when someone clicks on your Google Ads. Capturing this ID in your web forms is crucial because it allows you to track the specific ad and keyword that led to the conversion.
Capturing the GCLID
To capture these IDs, you’ll need to make sure your forms are set up to grab them upon submission.
Here’s a high level example.
First, add, or make sure there’s a hidden field in your form for the GCLID like this:
<input type="hidden" name="gclid_field" id="gclid_field" />
And then you can use javascript to grab the gclid from the URL and add it to this hidden field when the form is submitted. Something like this:
<script type="text/javascript">
// Function to get the GCLID from the URL parameters
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
// Function to capture the GCLID before the form is submitted
function captureGCLID() {
// Get the GCLID from the URL
var gclid = getParameterByName('gclid');
// Set the value of the hidden field to the GCLID
document.getElementById('gclid_field').value = gclid;
// Allow the form to be submitted
return true;
}
// Optionally, auto-fill GCLID when the page loads (useful for debugging)
window.onload = function() {
captureGCLID();
};
</script>
Step 3: Configure Salesforce to Store the GCLID
If you don’t already have a gclid field created in Saleforce for this, you’ll need to create it by following these steps:
- Log in to Salesforce and navigate to “Setup.”
- Go to “Object Manager” and select “Leads” (or the object where you want to store the GCLID).
- Click “Fields & Relationships” and then “New Field.”
- Select “Text” as the data type and click “Next.”
- Name the field “Google Click ID” (or similar) and set the field length to 100 characters to accommodate the GCLID.
- Add the field to your page layouts as needed.
- Save the new field.
Then map it:
- Ensure that the GCLID captured in your web forms is mapped correctly to the new custom field in Salesforce:
- Navigate to the Web-to-Lead setup in Salesforce.
- Ensure that the web form data is correctly mapped, including the GCLID to the newly created field.
Step 4: Sync Data Between Salesforce and Google Ads
- In Google Ads, go to “Tools and Settings” > “Measurement” > “Conversions.”
- Click the plus button (+) to create a new conversion action
- Select “Import” and then choose “Salesforce” from the list of platforms
- Follow the prompts to select the Salesforce fields that correspond to your conversion data (e.g., Opportunity stages)
- Define the actions in Salesforce that should trigger a conversion in Google Ads
Automatic Sync:
- Use the Salesforce Connector (if available):
- Salesforce provides various connectors and apps (like the Salesforce Connector for Google Ads) to automate the syncing of data between Salesforce and Google Ads
- Install the connector from Salesforce AppExchange if needed, and follow the setup instructions to sync data automatically
Step 5: Testing and Verification
- Test the GCLID Capture:
- Submit a test lead through your web form and verify in Salesforce that the GCLID is captured and stored correctly in the custom field.
- Verify the Data Sync:
- Check that the data is syncing correctly between Salesforce and Google Ads by viewing conversion data in Google Ads and ensuring it matches Salesforce records.