Disclaimer: Salesforce for Google AdWords has been retired and we no longer provide support for cross domain tracking with Google Analytics. We highly recommend using a service like Bizable in order to track analytics for your form.

Salesforce customers frequently ask us if our web form solution can work with Salesforce’s Google Adwords tracking application. It took us a while, but we eventually figured out how to do it.

Salesforce for Google Adwords allows you to track the effectiveness of your advertising campaign and lead generation activity. It is designed to work with Salesforce’s own web-to-lead solution, and requires a fairly simple 3 steps setup, with a short code snippet to copy&paste in your form’s HTML.

The problem is that this setup doesn’t work if you want to use a FormAssembly-powered form.

Fortunately, there’s a way around that. Here it is:

Set up your web-to-lead form.

Your first step is to get a working web-to-lead form in FormAssembly. These two tutorials  should help you get it up and running in just a few minutes:

Enable Adword Tracking

To enable Adword tracking, you’ll need to do a few more things. Open your form in the Form Builder and,

  1. Add a “new question” to your form. Enter sfga as a label and set the field type to “hidden“. In the ‘advanced’ tab, set its default value to your Salesforce Org. ID (you can find your ID in Salesforce, go to  Setup >  Company Profile > Company Information)
     
    "SFGA" Hidden Field in the Form Builder

    “SFGA” Hidden Field in the Form Builder

     

  2. Still in the Form Builder, go to custom code section and copy & paste the following snippet:
    <script src="//tfaforms.com/connector_salesforce/js/fa_sfga.js"></script>
  3. Save your form, leave the Form Builder and go to the connectors tab. You should already have the Salesforce connector set up and enabled. We need to look at a different connector here.
  4. Click ‘configure’ next to the HTTP Post Connector. We’re going to reproduce the behavior expected by  Salesforce’s Google Adword tracking.
  5. Configure the connector with the following parameters:
  • Run Mode: Background
  • Remote script URL: https://lct.salesforce.com/sfga
  • Field Mapping: leave as is, except for the field labeled ‘sfga’. Change the ‘submitted as’ value from tfa_sfga to sfga.
     

    HTTP Post Connector Settings

    HTTP Post Connector Settings

Save and test.

There is a delay between the lead creation and the availability of adword tracking data,  so wait 10 to 20mn before checking if the Adword information is correctly associated to your leads.

 

 
Salesforce Adword Tracking

Salesforce Adword Tracking

 


If you need help setting up your adword tracking on your web forms or surveys, please get in touch with us.

Pin It on Pinterest

Share This