CategorySalesforce

Salesforce and Google Analytics Integration

The purpose of Salesforce and Google Analytics integration

If you spend any significant amount of money on online marketing, you know this little-known fact: not all leads are the same.

Even though they appear the same in Google Analytics reports, some of these leads may be ten times more valuable as the others. The problem is figuring out which are which.

Find out which marketing channels generate high-quality leads

Some of your marketing campaigns may be bringing lots of leads that rarely buy and only waste the valuable time of your sales team. While other channels may bring very few leads, but a good percentage of these lead become long-term customers who end up spending a lot of money with your company.

But do you measure this? It all comes down to a metric called “revenue per lead”:

Revenue per lead: Google Ads vs Facebook

Salesforce and GA integration gives you a 360 view of your marketing campaigns

The goal of marketing basically comes down to bringing a steady stream of lukewarm leads that will end up having high revenue per lead. To achieve that, you need to figure out which exact marketing channels, campaigns, blog posts, keywords etc are more likely to bring those leads.

This is exactly where Salesforce and Google Analytics comes in handy. It gives you a 360 view of your marketing campaigns, and lets you see the ROI of each channel, campaign, and keyword. So you can double down on marketing activities that work, and turn off things that only waste your budget and attention.

The benefits of Salesforce and Google Analytics integration

Salesforce and Google Analytics connection

In the nutshell, Salesforce and GA integration lets you track you the source of each Salesforce Lead and Opportunity. And then use this information to build reports that tell you exactly which marketing activities you should focus on.

Why? Because without this kind of connection you’re basically flying blind. If you’re selling “offline” to people who came from online marketing, it’s the only way to know if you’re spending money on low-quality leads or not.

How to implement Salesforce and Google Analytics integration

There are three options to implement this integration:

  1. Use native Salesforce and Google Analytics integration. Good option, but it only works for Google Analytics 360 which starts at $150,000/year. At the time of writing this article, Google doesn’t have any plans to support the Free edition of Google Analytics.
  2. Implement a custom integration. You can hire an agency or task in-house developers to implement a custom integration. Not a bad option, but it usually takes a lot of time and effort.
  3. Use GA Connector – a tool designed specifically to integrate Salesforce with Google Analytics. It lets you do the same as the previous two options, but without breaking the bank or spending many months working on the implementation.

How Salesforce and Google Analytics integration works

GA Connector imports Google Analytics into Salesforce Sales Cloud. You’ll be able to see analytics data for each Lead and Opportunity:

Google Analytics data imported to a Salesforce Lead

Google Analytics data imported to a Salesforce Lead

GA Connector comes with pre-built reports and dashboards that let you analyze how many opportunities and revenue were generated by each campaign, channel, page, keyword etc:

Google Analytcs dashboard in Salesforce

Google Analytcs dashboard in Salesforce

GA Connector also brings Salesforce data into Google Analytics:

Salesforce data in Google Analytics

Salesforce data in Google Analytics

How to save GCLID (Adwords click ID) to Salesforce

Saving GCLID (Adwords click ID) to Salesforce is an essential part of Salesforce & Adwords integration. In this article, we’ll show you step-by-step how you can do this.

Step 1 – Make sure that Adwords adds GCLID to ad URLs

All you need to do is make sure that auto-tagging is enabled for your Adwords account. In case it’s not, you can do so using these steps:

  1. Sign in to your Google Ads account.
  2. In the left page menu, click Settings.
  3. Click Account settings along the top of the page.
  4. Click the Auto-tagging section.
  5. To enable auto-tagging, check the box next to “Tag the URL that people click through from my ad.”
  6. Click Save.

Step 2 – Create GCLID fields in Salesforce

Create 4 GCLID fields in Salesforce: for Lead, Opportunity, Account and Contact objects. Feel free to skip objects you’re not using.

Make sure to create Text fields with Length=255. They should look something like this:

Create GCLID field in Salesforce

Create GCLID field in Salesforce

Step 3 – Add GCLID hidden field to your forms

Add a hidden field to your forms that looks like this:

<input type=”hidden” id=”gclid”>

Make sure to connect this field with the Salesforce GCLID field you’ve just created.

Step 4 – Add a script that will populate the GCLID hidden field

This script will find a hidden field with id “gclid” and populate it with the actual value of gclid parameter:

It’s best to put it before the closing </body> tag.

Want to learn more about Salesforce & Adwords integration?

You can read our blog post to learn about our preffered method for connecting Salesforce & Adwords.

Also, feel free to contact us if you’d like us to help set up this integration for you.

Salesforce and Facebook Ads integration

In this article, we’ll show you how to integrate Facebook Ads information into Salesforce. With this integration, you’ll be able to see:

  • which of your Leads and Opportunities came from Facebook Ads;
  • which Facebook Ads campaigns, ad sets and ad creative brought the most revenue, Opportunities and Leads.
Salesforce and Facebook ads integration

Salesforce and Facebook Ads integration

How does the Salesforce & Facebook Ads integration work

  1. People come to your website from Facebook Ads.
  2. When web visitors land on your website, they are tracked by GA Connector — a tool that enables this integration.
  3. After they submit a form on your website, their tracking information is saved to Salesforce Leads and Opportunities created upon the form submission.

Here is how Facebook Ads information will look like in your Salesforce leads:

Facebook ads tracking info in Salesforce

Facebook ads tracking info in Salesforce

You’ll also know if your leads are coming from other sources, such as Google Ads, referrals, SEO etc.

How to implement this

To implement this integration, go to our website and sign up for a free 30-day trial of GA Connector.

If you have any questions about this integration, feel free to contact us directly.

Closed Loop Marketing for Salesforce

https://www.youtube.com/watch?v=wWyYzjXNnYk

What is closed-loop marketing? And what does it have to do with Salesforce?

In this article we’ll show how you can implement closed-loop marketing and closed-loop analytics in Salesforce.

So the idea behind closed-loop marketing is that sales and marketing teams are aligned under a common goal (usually revenue and profits).

In the traditional model, sales and marketing teams are disconnected. Therefore, the marketing team has to measure their performance using KPIs like:

  • impressions
  • clicks
  • form signups

Although it looks harmless, it can lead to two serious problems:

  • focusing on channels that bring traffic but few sales;
  • and overlooking channels with less than impressive traffic stats that nonetheless bring a lot of sales.

Some traffic sources will bring you lots of unqualified leads that will only waste the time of your sales team. Others may bring fewer form submissions, but those will be the ones that actually lead to closed deals.

A better way to measure marketing performance

Thankfully, there is a better way — closed-loop marketing. And it’s achieved through closed-loop analytics.

Closed-loop analytics looks something like this:

Closed loop reporting with Salesforce data in Google Analytics

Closed loop reporting with Salesforce data in Google Analytics

This closed-loop marketing report combines both marketing stats (sessions, users) and Salesforce information (leads, opportunities, the amount from closed won deals).

This allows the marketing department to see which campaigns and activities actually result in sales, and optimize campaigns accordingly.

How to implement closed-loop marketing in Salesforce

Here is how you can close the loop between sales & marketing using our app called GA Connector:

Step 1: Import Google Analytics information into Salesforce (and use it to build reports)

GA Connector automatically tracks last-click, first-click and other information about your Salesforce leads coming from the website:

Web visitor information in Salesforce

Web visitor information in Salesforce

Step 2: Build reports with Google Analytics information in Salesforce

After web visitor information is imported into your Salesforce, you can use it to build reports like this one:

Salesforce report with Adwords campaigns

Salesforce report displaying Opportunities by campaign

Step 3: Import Salesforce information into Google Analytics

GA Connector can also automatically import Salesforce data into Google Analytics, helping you achieve closed-loop marketing in Salesforce.

You’ll be able to see Salesforce data in most standard Google Analytics reports, as well as to build custom reports like this one:

Closed loop reporting in Google Analytics

Closed loop reporting in Google Analytics

 

If you’re interested in implementing closed-loop analytics in Salesforce with GA Connector, you can get a free 30-day trial of the app or contact us if you have any questions.

Retired Salesforce for Google AdWords alternatives (full overview)

Looking for some sort of Adwords and Salesforce integration script or plugin?

Look no more: in this article, you’ll find a comprehensive overview of all Salesforce & Adwords integration methods currently available.

Since Salesforce for Google AdWords retired in 2013,  we created this article with an overview of all the alternative integration methods currently available.

Method 1: Native Google Ads Conversion Import for Salesforce®

Pros: free; allows importing most important Salesforce conversions directly to Adwords.

Cons: limited number of data points to import; doesn’t let you see Adwords information in Salesforce.

About this method:

As mentioned in this Google Ads help doc, “you can configure your Google Ads account to record a conversion for any or every lead status and opportunity stage you track in your Salesforce account”. And because it’s a native integration made by Google, you can rest assured that it is stable.

However, this method doesn’t let you import any custom Salesforce data points to Adwords. For example, you may have custom fields configured to store important information about Leads/Opportunities, that you also want to send to Adwords. Unfortunately, Google Ads Conversion Import for Salesforce® won’t allow you to do that.

Method 2: Manual import of Salesforce data into Adwords using spreadsheets

Pros: free; full flexibility (you can import any Salesforce data into Adwords).

Cons: complex to set up; requires a lot of time on a regular basis.

Here is how you can implement this method:

  1. Set up offline conversion tracking in Adwords and save GCLID to Salesforce.
  2. Export Salesforce report with GCLID and your conversions to Google Ads.
  3. Import these Salesforce conversions into Google Ads.

Method 3: Use GA Connector to combine Salesforce & Adwords data in Google Analytics

Pros: easy to set up; full flexibility (you can import any Salesforce data into Adwords); support from our team.

Cons: requires a small monthly fee.

GA Connector takes a different approach to Salesforce & Google Adwords integration. Instead of connecting Salesforce and Adwords directly, it connects them through a proxy of Google Analytics.

It offers the following advantages:

  • You can track other channels too, not just Adwords (such as SEO, Facebook Ads and any other channel that Google Analytics can track).
  • Google Analytics reports are more powerful than the Adwords ones. Having both Salesforce and Adwords data in Google Analytics lets you build powerful reports that utilize powerful Google Analytics capabilities, such as segments, multi-channel attribution etc.

You can read more about this Salesforce & Adwords integration method here.

Or, you can go directly to the GA Connector website and sign up for a free 30-day trial.

Salesforce and Google Adwords Connector

https://www.youtube.com/watch?v=FN2PZ4qhi3A

Do you actually need this Salesforce & Google Adwords integration?

If you’re spending any significant amount of money with Adwords, then the answer is a resounding yes! A Salesforce and Google Adwords integration will help you skyrocket sales driven by your Adwords and other online marketing campaigns.

Why? Because it’s crucial to know the ROI of each of your campaigns, ad groups, and keywords. Otherwise, you’re just flying blind, not knowing whether you should increase your ad spend or stop your campaigns.

That’s where a Salesforce and Google Adwords integration comes into play.

Salesforce and Adwords integration

Without this connection, it’s pretty much impossible to tell whether your Adwords campaigns have any real impact on sales.

And when your Salesforce CRM is integrated with Adwords, you can build amazing reports that help you answer questions like:

  • Does Adwords bring positive ROI?
  • Which of your campaigns is the most profitable one?
  • Which keywords and ad group should you turn off or improve, and which should you should invest more in?

What reports can you build after integrating Google Adwords with Salesforce?

In a nutshell, Google Adwords connection with Salesforce allows you to build two types of reports:

1. Salesforce reports and dashboards with Google Analytics data in them. For example, this dashboard allows you to see how many closed won Salesforce opportunities were originated from each Adwords campaign:

Salesforce report with Adwords campaigns

2. Google Adwords reports in Google Analytics with Salesforce information in them. For example, this report shows how much revenue was generated from each Adwords campaign:

Google Analytics with Adwords and Salesforce information combined

Google Analytics with Adwords and Salesforce information combined

You can also utilize powerful Google Analytics multi-channel attribution reports to look at the impact of online marketing on sales from different angles:

Model Comparison Tool with Salesforce conversions

Assisted Conversions (imported from Salesforce)

Best way to connect Google Adwords with Salesforce

There are a few methods to implement this connection, but we consider GA Connector the best one, because:

  • With GA Connector, the connection is happening seamlessly. You don’t have to manually import anything.
  • It allows you to see Adwords data in Salesforce, as well as to combine Salesforce & Adwords data in a powerful Google Analytics report. Hell, you can even plug in your favorite BI tool to see all your data there.

How to implement this integration

  1. Connect your Google Adwords and Google Analytics if you haven’t yet.
  2. Go to GA Connector website and sign up for a free 30-day trial.
  3. Select Salesforce as your CRM and follow the instructions.

As a result, all three systems will be connected: Adwords <–> Analytics <–> Salesforce. And you’ll be able to see Adwords data in Salesforce (as well as combined Adwords & Salesforce report in Analytics).

Any questions about this integration and the implementation? Feel free to contact us.

Salesforce and Contact Form 7 Integration (the easiest method)

Our customers often asked us what is the best & easiest way to integrate Contact Form 7 with Salesforce.

To answer this question, we have researched the currently available methods to automatically save CF7 submissions to Salesforce. And in this article, we’re sharing the simplest method we could find.

This method:

  • Is free (doesn’t require installing a paid plugin).
  • Doesn’t require coding skills (most solutions we found require knowing a little PHP).
  • Can be implemented in just 5-10 minutes.

Here is how you can integrate Contact Form 7 submissions with Salesforce CRM:

  1. Download this free Contact Form 7 Salesforce plugin.
  2. Install the plugin and activate it.
  3. Open your WordPress dashboard and click on “Salesforce” on the left menu. Then, click on “Salesforce Accounts” and log in with Salesforce as shown on the screenshot below:
    Salesforce Connection
  4. After connecting your Salesforce account, go to the “Salesforce Feeds” tab and create a new feed. You’ll need to select your Salesforce account and the Contact Form 7 form you want to connect.
    Salesforce Feed
  5. Map the CF7 fields with the corresponding Salesforce fields
    Field Mapping

 

Viola! Now your Contact Form 7 submissions will automatically appear in your Salesforce account!

One more step to really make this integration shine…

There’s still one problem with this Salesforce & CF7 integration:

When Contact Form 7 submissions appear in your Salesforce account as leads, you won’t know where they came from: Google, Facebook or some blog post somewhere on the internet.

To solve this problem, we built GA Connector. It’s a tool that allows you to see from which page, traffic source, keyword, country, city etc your leads are coming from:

Google Analytics metrics in CRM

You can sign up for a free trial of GA Connector to track your Salesforce leads here.

How to eliminate “webto.salesforce.com” as a referral in Google Analytics

If you’re using Salesforce Web-to-Lead forms, you may encounter a problem with your Google Analytics reporting. When you look at your GA reports, you may notice that some goal conversions are attributed to the referral source of “webto.salesforce.com” (or similar).

This is a problem, because it prevents you from seeing the source that actually drove those conversions.

Why does this happen?

When the user submits a form on your website, the forms submission is sent to Salesforce. Then, Salesforce redirects the user back to the website.

Google Analytics sees that the user came to the website from a new source (“webto.salesforce.com”) and starts a new session with this source.

All future goal conversions from this user will be attributed to that Salesforce source. Which is a big problem for attribution.

How to fix this?

Google Analytics has a setting that allows to exclude certain referrals. You can use it to ignore “webto.salesforce.com”. Here is the full method:

  1. Sign in to your Analytics account.
  2. Click Admin.
  3. In the ACCOUNT column, use the dropdown to select the Analytics account that contains the property you want to work with.
  4. In the PROPERTY column, use the dropdown to select a property.
  5. Click Tracking Info.
  6. Click Referral Exclusion List.
  7. To add a domain, click +ADD REFERRAL EXCLUSION.
  8. Enter “webto.salesforce.com”.
  9. Click Create to save.

As a result, you will exclude “webto.salesforce.com” and reveal the true source of your traffic.

 

Are you struggling to attribute offline conversions from Salesforce to your offline marketing campaigns? Check out our app GA Connector – it allows to integrate your Salesforce CRM with Google Analytics and track your website visitors all the way to a physical sale:

How to Integrate Salesforce Data into Google Analytics

This detailed step-by-step guide will show you how to integrate Salesforce.com with Google Analytics.

What Will Salesforce and Google Analytics Integration Do For You?

The goal of marketing is to drive revenue.

But Google Analytics is only good at measuring sales that happened right on the website (e.g. an e-commerce store).

Yet most businesses don’t work this way.

Often times, a sale is closed by a sales rep, and it’s only tracked in Salesforce or some other CRM software.

Because of this, you can only measure what are your customers doing on your website.
But you don’t know how many of your website visitors actually became paying customers.

The Method

In this article, we will show a step-by-step method for bringing the information about your buyers from Salesforce into Google Analytics.

We’ll utilize a really cool Google Analytics feature called Data Import to pass customers’ lead information from Salesforce into Google Analytics.

As a result, you’ll be able to build cool Google Analytics reports with Salesforce data like this one:

Salesforce Google Analytics integration result example

Salesforce & Google Analytics integration report example

Overview of the Implementation of Salesforce & Google Analytics Integration

To import Salesforce data into Google Analytics, we need a key that will unite CRM and Analytics data. As such key, we’re going to use Google Analytics Client ID – cookie generated by Google Analytics for each browser viewing your website.

This key will be stored in Google Analytics as a custom dimension, and in Salesforce – as a custom field.

This integration only takes seven simple steps.

During steps 1-3, we’re going to save client ID to both Salesforce (as a custom field) and Google Analytics (as a custom dimension).

Then, during steps 4-6 we will use GA Data Import to automatically merge this data inside Google Analytics.

Finally, during step 7 you’ll find Salesforce data inside your Google Analytics and learn how to use it.

Results After This Integration

When you get Lead Statuses from Salesforce into Google Analytics, you’ll be able to build all kinds of reports with this data to answer questions like:

  • Which campaigns, ads, blog posts and keywords drive the most qualified leads?
  • Which traffic sources only drive junk traffic that only ends up taking your sales reps’ time away from working with valuable customers that your company can actually help?
  • How is the behaviour of your qualified leads on your website different from the behaviour of your unqualified leads? (this questions can be answered by building two segments and comparing them)
  • What pages are most frequently visited by your qualified leads? (you may want to focus more of your attention on those)

Step One: Create Custom Dimensions

1. Go to your Google Analytics property, and open Admin – Custom Definitions – Custom Dimensions.

2. You should be able to see something like this:

Google Analytics custom dimensions menu

Google Analytics custom dimensions menu

3. Click “New Custom Dimension” and create a new User-level custom dimension like it’s shown on the screenshot:

Create Google Analytics Client ID dimension

Create Google Analytics Client ID dimension

4. Remember the index of this new custom dimension(from the second column). We’ll need it in step #2.

The index should be “1” unless you have created a custom dimension before.

5. After that, repeat steps 1-3 for another User-level custom dimension “Lead Status”.

Step Two: Save Google Analytics Client ID as a custom dimension

To start saving GA Client ID as a custom dimension in Analytics, add this code somewhere below your Google Analytics tracking code:

In this case we’re sending the client ID to the dimension with index “1” (“dimension1: clientId”).

If the client ID is not the first dimension in your Google Analytics property, replace “dimension1: clientId” with “dimensionX: clientId”, where X stands for the index of the client ID dimension.

Step Three: Save Google Analytics Client ID to Salesforce

Now we need to save Google Analytics Client ID to Salesforce, so we can use it as a key while merging data.

To to this:

1. Add a new custom field to your Salesforce Lead object.

2. Then, create a new hidden form field and connect it to the new custom field.

So that the value of that hidden field is saved to Salesforce during the form submission.

The hidden field should look something like this:

3. Finally, place a code like this to your website:

This code will automatically retrieve the value of GA Client ID and put it inside that new hidden field we just created.

Step Four: Create a Data Set in Google Analytics

  1. Go to Google Analytics – Admin – Data Import – New.
  2. Select “User Data”.
  3. Name it, select a view and click “Next”.
  4. Add “Client ID” as a key.
  5. Add “Lead Status” as imported data.
  6. Under “Overwrite hit data”, select “Yes”.
  7. Click “Save” and then “Done”.
  8. Select the data set you have just defined in the table that appears.
  9. Click “Get Schema” – “Download schema template”.

If you open the schema template template file you just downloaded in a text editor, it will look like this:

Step Five: Create a Data Set File with Salesforce Data

Now we just need to fill this file with actual data from Salesforce.

To do this, go Salesforce – Reports and create a new Lead report. Then, export this report as a CSV file:

Salesforce export menu (to generate a file for Google Analytics import)

Salesforce export menu (to generate a file for Google Analytics import)

Now update the exported CSV file to follow the GA Data Set schema (Client ID in the first column, Lead status in the second column).

The end result should look something like this:

Step Six: Upload the Salesforce dataset into Google Analytics

Go back to Google Analytics – Data Import, and click “Manage Uploads” under your new data set.

Then upload the file you created during step three.

Step Seven: Find the Salesforce Data in Your Google Analytics Reports

Now go to one of your GA reports (Source/medium is a good one) and add a custom dimension to the report by clicking Secondary Dimension – Custom Dimensions – Lead Status:

Source/medium Google Analytics report with Salesforce data

Source/medium Google Analytics report with Salesforce data

You can even create a segment for qualified leads and for disqualified leads.

So that you can compare how many of those you’re getting from each traffic source:

Segmented Google Analytics report with Salesforce data

Segmented Google Analytics report with Salesforce data

Note that the uploaded data needs to be processed before it can show up in reports. Once processing is complete, it may take up to 24 hours before the imported data will begin to be applied to incoming hit data.

Congratulations! Now you can see which campaigns, keywords, ads, pages, blog posts etc produce the most qualified leads.

Next Steps

Bringing lead statuses is a great first step towards revenue-driven marketing.

But there are many more things you can import to Google Analytics from Salesforce.

For example, revenue, profit, number of successfully closed won deals and other data.

Right now GA Data Import only allows to import custom dimensions.

It doesn’t allow to bring in metrics (e.g. revenue), track goals and do other stuff.

To do this, you can use a tool such as GA Connector which allows to bring any kind of data from Salesforce into Google Analytics automatically, without having to upload any spreadsheets.

https://www.youtube.com/watch?v=IpGjEUKUnNE

As a result, you’ll be able to build even more powerful Google Analytics reports with offline data such as this one:

Custom Google Analytics report with Salesforce data

Custom Google Analytics report with Salesforce data

Happy analyzing!

Tracking UTM parameters in Salesforce Web-to-Lead Forms

This guide shows you how to track UTM parameters in Salesforce Web-to-Lead forms.

Salesforce Web-to-Lead forms are great at creating leads in Salesforce upon each submission. But they don’t tell you where your leads come from.

  • What websites referred them?
  • Which Adwords keyword brought them to your site?
  • Which Facebook ad campaign converted them?

Overview of tracking UTM parameters in Salesforce Web-to-Lead forms

In this article we’re going to explain how you can achieve this and have a section like this for each of your Leads:

Example of tracking UTM parameters in Salesforce Web-to-Lead forms

Example of tracking UTM parameters in Salesforce Web-to-Lead forms

You’ll also be able to build Salesforce dashboards with UTM information.
As a result, you’ll see which campaigns generated the most sales:

Salesforce report breaking out the number of qualified leads by Adwords campaign

Salesforce report breaking out the number of qualified leads by Adwords campaign

Let’s say this is your Web-to-Lead form:

This is just an example – yours will look differently.

To bring UTM fields to Salesforce, you need to do three things:

  1. Add new fields to Salesforce that will store these UTM fields.
  2. Add these fields to your Web-to-Lead forms (and make them hidden).
  3. Add some JavaScript code to your page. This code will grab the UTM parameters and put them inside the hidden fields.

Step 1 – Add new fields to Salesforce

First, you need to add five new custom fields to Salesforce: UTM Source, UTM Medium, UTM Term, UTM Campaign, UTM Content.

JavaScript code from step 3 will fill in these fields with appropriate values.

To create these fields, go to Salesforce – Setup. Then search for “Lead” and select “Fields” from the menu:

Salesforce Lead fields search screenshot

Salesforce Lead fields search screenshot

Then scroll down to “Lead Custom Fields & Relationships” and click “New”:

Custom Lead fields in Salesforce

Custom Lead fields in Salesforce

Choose field type “Text”:

Salesforce - Choose new custom field type

Salesforce – Choose new custom field type

Set “Field label” to “UTM Source”, and Length to 255 (Salesforce fills in Field Name for you):

Set UTM source fields parameters in Salesforce

Set UTM source fields parameters in Salesforce

Click “Next”, and then “Save & New”.

Repeat the process and create another four fields:

  • UTM Medium
  • UTM Term
  • UTM Campaign
  • UTM Content

If you also want to know the source/medium/term/etc of each opportunity or account, do the following:

  1. Create the same fields for the Opportunity and/or Account object. You can do it in Setup – Opportunities – Fields, and Setup – Accounts – Fields.
  2. Go to Setup – Lead – Fields again, and click the button “Map Lead Fields”:
Salesforce - Map UTM fields from Lead to other objects

Salesforce – Map UTM fields from Lead to other objects

On that page, you will be able to map Lead fields to the corresponding Account/Opportunity fields. As a result, Account/Opportunity will receive UTM fields during lead conversion.

Step 2 – Add new fields to the forms

During step 1, you’ve created the custom fields to store UTM parameters in Salesforce. Now we’re going to add the same fields to your Web-to-Lead forms.

Generate the code for new fields in Salesforce

To do this, go to Salesforce – Setup – Web-to-Lead, and click “Create Web-to-Lead Form”:

Salesforce Web-to-lead form create button

Salesforce Web-to-lead form create button

Find the UTM fields you have just created in the “Available fields” section. Then, move them to “Selected Fields” using the arrow buttons between these sections.

Click “Generate”, and Salesforce will create a new Web-to-Lead form for you:

Sample Salesforce Web-to-Lead form

Sample Salesforce Web-to-Lead form

Don’t worry, you don’t need to replace your existing forms with this new form.

You just need to:
a) extract UTM fields from this new form, and
b) put them inside the existing Web-to-lead forms on your website.

Inside this newly generated form, you should be able to see block of code like this one:

Put the new fields’ code in your form(s)

Take the input name (e.g. 00N5800000Bew3F) and put it inside this template::

In this example, the input name is 00N5800000Bew3F, but in your form it will be different.

 

Repeat the process for all five fields, and as a result, you will have a block of code like this:

In this example, the input name is 00N5800000Bew3F, but in your form, it will be different.

 

Then put it inside your Web-to-Lead form, just above the closing </form> tag:

 

Congratulations! You have completed the most time-consuming steps, 1 & 2. Only one more step to go!
By now, you already have UTM fields both in Salesforce and your forms.
Plus, these fields get automatically synchronized. So you don’t need to worry about that.
There’s just one missing piece left. You need to insert the code that will populate these fields with actual UTM values.

Step 3 – Populate hidden fields with values (using JavaScript)

As a final step, put this JavaScript code somewhere on your page:

 

You can put it inside a Google Tag Manager tag if you like.

Congratulations! You have completed the most time-consuming steps, 1 & 2. Only one more step to go!
By now, you already have UTM fields both in Salesforce and your forms.
Plus, these fields get automatically synchronized. So you don’t need to worry about that.
There’s just one missing piece left. You need to insert the code that will populate these fields with actual UTM values.

Bonus step 4

If you’ve implemented this guide, you’re already ahead of most marketers out there.

If you want to get one step further, you can implement GA Connector – a tool that allows you to know even more about your clients.

You see, tracking just the UTM parameters has its limitations:

  • It doesn’t work if the user left the page, and then came back from bookmarks or by simply typing your domain. For such leads, the UTM information would be lost (unless you use a tool like GA Connector).
  • Same with multi-page websites: if your user landed on one page, but the actual form submission happen on another page, the UTM information would be lost.
  • This approach only tells you which channel converted the lead. But sometimes it takes more than one visit to seal the deal. You user could have found you through Google but came back through Facebook remarketing. Does it make sense to attribute the conversion only to remarketing?
  • This approach doesn’t allow to track organic Google search. You can’t put UTM parameters there. Same with referrals that you don’t control (not everyone wants to put UTM parameters in their links).
  • This method doesn’t give you other important information about your customers: which device and browser they were using, their referrer,  where are they located etc. These are all important clues that can be valuable during the sales process and for analytics.

GA Connector solves all those issues and allows to track the whole user path, no matter which page they landed on, and at which point the submitted the form.

GA Connector remembers the initial channel, as long as the last channel, plus other useful information about this visitor.

Here is a section you will see for each of your Salesforce leads after implementing GA Connector:

GA Connector: Tracking website visitor information inside Google Analytics

GA Connector: Tracking website visitor information inside Salesforce

Sign up for GA Connector here.