How to use FormAssembly with Salesforce for Google AdWords
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:
- Tutorial: Quickly create a form to populate any Salesforce object (quick set-up)
- Tutorial: How to Create a Salesforce Web-to-Lead Form (more in-depth)
Enable Adword Tracking
To enable Adword tracking, you’ll need to do a few more things. Open your form in the Form Builder and,
- 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)
- Still in the Form Builder, go to custom code section and copy & paste the following snippet:
- 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.
- Click ‘configure’ next to the HTTP Post Connector. We’re going to reproduce the behavior expected by Salesforce’s Google Adword tracking.
- 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.
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.
If you need help setting up your adword tracking on your web forms or surveys, please get in touch with us.