Import conversions from Salesforce

If you runway leads and opportunities in Salesforce's Sales Cloud®, you tin can import your offline conversions from Salesforce's Sales Cloud into Google Ads. This will assist you improve measure how your online Google Ads investments are generating offline value.

In this commodity, nosotros'll show y'all how to set up your accounts to import conversions from Salesforce.

This article jumps correct to the instructions. If you want to read an overview start, see About Google Ads Conversion Import for Salesforce.

Before you begin

To utilise this characteristic, you'll need to meet the post-obit requirements:

  • Be able to sign in to a Salesforce Sales Deject account, using a login with appropriate permissions. For the easiest setup, consider using an account with System Administrator permissions, assuming your default access settings haven't been changed. For a detailed list of the required account permissions (that yous can forrad to your administrator of your Salesforce® business relationship), see the minimum permissions requirements below.
  • Have auto-tagging enabled in your Google Ads business relationship(s).
  • Be able to edit your website code. You or your web developer will have to edit your lawmaking to capture the Google click ID (GCLID).
  • Be able to make changes in your Salesforce business relationship, including creating custom fields and enabling field history tracking. (Encounter footstep one below.)
  • Have a click-to-conversion cycle that is less than ninety days. Conversions uploaded more 90 days afterwards the associated final click will non be imported by Google Ads and will therefore not show upwardly in your conversion statistics.
  • Use Salesforce's web-to-pb characteristic, or some other solution to transmit lead information from your website to Salesforce.

Salesforce account minimum permissions requirements

Google Ads Conversion Import for Salesforce requires access to the post-obit fields, organized by object. A user account with Arrangement Administrator access may already have admission to these fields.

Note: Organization fields referenced below are located in the "Company Settings" under "Visitor Information", non under your standard "Object Director".

  • Organization: ID, Name, OrganizationType
  • LeadStatus: ID, MasterLabel, SortOrder
  • OpportunityStage: ID, MasterLabel, SortOrder, IsActive
  • LeadHistory: CreatedDate, OldValue, NewValue, Field
  • Pb: Status, GCLID (a custom field y'all'll create in the steps below)
  • OpportunityFieldHistory: CreatedDate, OldValue, NewValue, Field
  • Opportunity: Amount, Probability, StageName, GCLID (a custom field you'll create in the steps below)

If yous utilise Grouping Edition or Professional person Edition, field access is granted by merely adding the necessary fields to your Pb and Opportunity page layouts. To exercise this, select Setup, and so Customize, then Pb (or Opportunity), then Page Layout. Then simply elevate the required fields onto the page.

If y'all don't want to link your Google Ads and Salesforce business relationship, y'all tin follow the instructions to manually import conversions from Salesforce.

How to ready Google Ads Conversion Import for Salesforce®

Follow the steps below to prepare your Salesforce account, Google Ads account, and website; link your Salesforce and Google Ads accounts; and first importing conversions.

Every business organisation is different: nosotros've included bones instructions hither, simply yous may want to customize your setup based on how you use Salesforce. If someone else manages your Salesforce account, work with them to find the best solution for you.

Step ane: Configure your Salesforce business relationship

Before getting started, you'll want to make sure your Salesforce account is prepare in the post-obit way. If someone else manages the Salesforce account for your business, they can assist you with this footstep.

  1. Update the Opportunity object with the following changes:
    1. Create a custom field with the Field Proper name "GCLID" (in all majuscule messages, without the quotes). The "Field Label" can exist anything you lot desire. Set the field length to 255 characters. Make this field read-simply so your users don't accidentally change it.
    2. Enable field history tracking for the "Phase" field.
  2. Update your Pb object with the following changes:
    1. Create a custom field with the Field Proper name"GCLID" (in all capital messages, without the quotes). The "Field Label" tin can be anything you want. Prepare the field length to 255 characters. Brand this field read-only so your users don't accidentally modify it.
    2. Enable field history tracking for the "Lead status" field.
    3. Map your new Lead.GCLID field to the new Opportunity.GCLID field.

Step 2: Adjust your Salesforce spider web-to-lead class

To store the GCLID with your lead's data, you lot'll need to alter your spider web-to-lead submission grade(s) so all new leads will include the GCLID value. Yous may need help from a web developer and Salesforce admin to complete this step.

The post-obit explains how to add the GCLID field to your existing spider web-to-lead forms.

  1. Generate a standard web-to-lead class and include all fields you desire your prospects to submit. Too include the lead field "GCLID" as a 'hidden' field. Your Salesforce admin or spider web developer volition know how to make this modify.
  2. Your spider web programmer will need to note the new GCLID input field'southward ID, equally this is needed for the adjacent step where they implement the JavaScript on your site.
  3. Your web developer will then take this new form HTML code and update your existing forms. This ways that your forms will now pass the GCLID value forth with the lead's information into Sales Deject.

Salesforce and your web pages are now ready to assemble all the information. In the next step, your web developer will update your site so the GCLID value is automatically passed to the new GCLID grade field

Go on in listen: your web-to-pb form needs to be located in the same domain as the rest of your web pages, and so the JavaScript can properly transfer the GCLID value to the form.

Note: Other lead submission methods

If the lead info from your web class passes through another system before reaching Salesforce, make certain that whatever intermediate pb processing systems pass the GCLID through and so that the GCLID value ultimately reaches your Salesforce account. The arrangement you use should have a way to do this: if you're non sure how, contact support for the 3rd-political party solution y'all use.

Stride 3: Edit your website to collect and salvage the click ID

When a company clicks on your advertising, Google Ads will append a "gclid" URL parameter to the URL that leads to your landing page.

Your site will need to capture and shop this parameter's value so it tin can retrieve it later when a prospective customer enters data into the lead class. If you have a web developer, he or she tin can aid you edit your website code to do this.

We recommend you accomplish this by modifying and embedding the following JavaScript code. Before you lot embed the code, be certain to update the 'var gclidFormFields' line to include the field IDs of the new fields yous added in the previous pace. This is how the JavaScript knows which field(south) should contain the GCLID value. Once this modification is done, you should embed this code immediately before the closing </body> tag of all your pages.

<script>

office getParam(p) {
var friction match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search);
return friction match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}

role getExpiryRecord(value) {
var expiryPeriod = 90 * 24 * sixty * 60 * yard; // ninety day expiry in milliseconds

var expiryDate = new Date().getTime() + expiryPeriod;
return {
value: value,
expiryDate: expiryDate
};
}

function addGclid() {
var gclidParam = getParam('gclid');
var gclidFormFields = ['gclid_field', 'foobar']; // all possible gclid form field ids here
var gclidRecord = zero;
var currGclidFormField;

var gclsrcParam = getParam('gclsrc');
var isGclsrcValid = !gclsrcParam || gclsrcParam.indexOf('aw') !== -1;

  gclidFormFields.forEach(function (field) {
if (certificate.getElementById(field)) {
currGclidFormField = document.getElementById(field);
}
});

if (gclidParam && isGclsrcValid) {
gclidRecord = getExpiryRecord(gclidParam);
localStorage.setItem('gclid', JSON.stringify(gclidRecord));
}

var gclid = gclidRecord || JSON.parse(localStorage.getItem('gclid'));
var isGclidValid = gclid && new Appointment().getTime() < gclid.expiryDate;

if (currGclidFormField && isGclidValid) {
currGclidFormField.value = gclid.value;
}
}

window.addEventListener('load', addGclid);

 </script>

We strongly recommend that you insert this code on every web page on your site. This way, you won't need to add information technology every time you create new ads with new landing pages. You also won't accept to worry nearly losing GCLIDs if you start driving ads traffic to unlike landing pages. So, consider adding this code to your web folio template—or a shared page element like the footer—so that all your new pages will automatically include the lawmaking.

Pace 4: Examination that your system is working

  1. Visit your website, adding the parameter ?gclid="exam" to your URL.
    • Example: http://world wide web.example.com?gclid="examination"
  2. Navigate to your lead grade and submit a test pb.
  3. Sign in to Salesforce, find this new test lead, and run into if your custom GCLID field shows the value "test."
  4. Convert the exam lead to an opportunity. The new opportunity'southward custom GCLID field should as well show "exam."
  5. Repeat steps 2 through 4 for all your pb forms to make certain that each is configured properly. If test appears in the GCLID field for leads and opportunities that originated from all of your atomic number 82 forms, and so y'all're prepare to link your accounts.

Step vi: Ready up your conversion deportment

One time your Google Ads and Salesforce accounts are linked, yous need to choose which Salesforce milestones––lead statuses and opportunity stages––to monitor for conversions. This means that every time a atomic number 82 or opportunity progresses to one of these points, a conversion volition be recorded in Google Ads. Keep in mind that if a atomic number 82 or opportunity moves back to a prior stage or status, Google Ads won't tape it every bit a conversion. In Salesforce, make certain that the order of your milestones matches your sales funnel.

  1. Click the tools icon Google Ads | tools [Icon] in the upper correct corner of your Google Ads account.
  2. Nether "Measurement," click Conversions.
  3. Click Salesforce in the left menu. You'll see a list of all Salesforce accounts that are linked to your Google Ads business relationship.
  4. Click the Salesforce account that you just linked. This takes you to a page that has a list of Salesforce milestones for that business relationship.
  5. For each milestone you'd like to associate with a conversion action, follow these steps:
    1. Click the Conversion action drop-down.
    2. Click Create a new conversion action, then complete the conversion action settings. Keep in mind that:
      • The conversion name you enter will help you recognize the conversion action afterwards when information technology shows upwards in conversion reports. An example might be "Atomic number 82 sales qualified" or "New opportunity."
      • To capture every bit many conversions equally possible, select the maximum conversion window of 90 days.
    3. Click Create and continue.
    4. When you see the confirmation folio that your milestone has been mapped to your conversion activeness, click Done.
  6. Schedule your conversion imports:
    1. Click the Import schedule section.
    2. Utilise the driblet-down menus to select how oft y'all want Google Ads to import your conversions and at what fourth dimension. If you use a Google Ads automatic bidding strategy to bid for conversions, your bidding strategy will work all-time if you upload conversions frequently, ideally in one case a day.
    3. Click Save.
  7. Click Back to return to your "Salesforce accounts" page.

You as well have the option of setting upwardly your Salesforce conversion deportment from the "Conversion actions" page.

  1. Click the tools icon Google Ads | tools [Icon] in the upper right corner of your Google Ads account.
  2. Under "Measurement," click Conversions. This takes yous to a folio that lists your conversion actions.
  3. Click the plus push button , then click Import.
  4. Select Salesforce, then click Go along.
  5. In the "Accounts & Milestones" department, click on the Salesforce account that yous'd like to rails for conversions, then select a milestone that Google Ads should report as a conversion. If you want to utilize the aforementioned conversion action settings for your milestones, y'all can select more than one milestone.
  6. Complete the conversion action settings.
  7. Click Create and proceed.
  8. When you lot see the confirmation folio that your milestone has been mapped to your conversion action, click Done. To map another milestone to a conversion activity, click Ready another Salesforce conversion action. Annotation that this only creates a conversion action to map to your Salesforce milestone. To schedule how frequently your Salesforce milestones are imported as conversions, click Salesforce in the carte du jour on the left and refer to the previous prepare of steps for scheduling imports.

How conversion value is imported

If yous've asked us to import conversion value from your Sales Cloud account, Google Ads calculates the value past multiplying the opportunity stage's "Probability" value (as configured in your Sales Deject business relationship) past the most contempo value in the opportunity's "Amount" field.

Case

Imagine yous told Google Ads to import your conversions weekly, and the last import was vii days ago. Two days ago, you lot marker an opportunity's phase as "Negotiating". The opportunity's "Amount" value is $1,000 and the probability for the negotiating phase is 75%. Yesterday you change the opportunity'southward "Amount" value to $1,600. Google Ads and so imports your conversion today and calculates the conversion value as $1,200 (75% ten $1,600).

If you experience strongly that the conversion value should be calculated based on the amount value that was set at the time that the opportunity stage changed, then nosotros recommend that y'all prepare your imports to happen daily.

How to edit your Salesforce conversion actions

To modify which Salesforce milestones yous want to track as conversions, follow the instructions below:

  1. Click the tools icon Google Ads | tools [Icon] in the upper right corner of your Google Ads account.
  2. Nether "Measurement," click Conversions.
  3. Click Salesforce in the left card.
  4. Click the Salesforce business relationship with milestones mapped to conversion deportment that you'd like to edit.
  5. Cull from the following options:
    • To change the conversion action mapped to a Salesforce milestone, click the driblet-down and select a different conversion activeness or create a new conversion action.
    • If a conversion activity should no longer exist mapped to a Salesforce milestone, click Unselect conversion action.
  6. Click Back.

Footstep 7: Import your conversions

Your account volition at present automatically import conversions from Salesforce on the schedule you lot've set up.

To make certain everything is working correctly, manually import conversions. In your Google Ads account, go to the page that lists your Salesforce milestones, and click Import at present. Stay on this page until the import is complete, and you lot'll see a message letting you know if the import was successful or non.

The first time you request an import, Google Ads volition recall all conversions that occurred within the final 14 days. For every subsequent import, nosotros'll include all conversions since the terminal import (up to xiv days previous), so it'due south important to import your conversions at least in one case a week.

The import can accept a few minutes depending on how many conversions volition be uploaded. The "Import now" link volition exist disabled when an import is taking place, when yous haven't mapped any Salesforce leads and opportunities to Google Ads conversion actions, or when there are unsaved changes to your conversion deportment.

If there'south a problem with ane of your scheduled imports, yous'll receive a notification in your Google Ads account.

How to review your import history

  1. Sign in to your Google Ads account.
  2. Click the tools icon Google Ads | tools [Icon] in the upper correct corner of your Google Ads account.
  3. Under "Measurement," click Conversions.
  4. Click Salesforce in the left menu.
  5. Click Import history along the top of the page. Browse the columns on the "Import history" page to learn more about the status of your upload:
    • The "Status" cavalcade lets y'all quickly see whether your Salesforce conversions were imported successfully.
    • The "Results" column provides links to view the conversions that were imported and which ones weren't due to file errors.
    • The "Actions" column provides the following links:
      • Download results: Download a copy of your uploaded file. This link appears when all the conversions in your file were imported successfully.
      • Download all: Download a copy of your uploaded file, including conversions that failed to import.
      • Download errors: Download a spreadsheet that lists the conversions from your file that failed to import, forth with error messages.
      When you select whatsoever of the three links above, the downloaded file includes a "Results" cavalcade that confirms that a conversion was imported successfully or explains why it failed to import. These links are removed 30-lx days later your initial upload.

How to ready errors

If you lot run into an error while uploading Salesforce conversions, please run into this commodity.

Was this helpful?

How can nosotros improve it?