15
Integrating Google Analytics with CRM Data

As critical as Web analytics data is, it can never provide a complete picture of customer analytics. Through cost-data import and Google AdWords auto-tagging, we can determine cost per lead conversion, but how do we know if those leads were qualified? Google Analytics (GA) Ecommerce tracking can readily reveal the revenue that our email and social campaigns have generated, but how can we assess the long-term value that each of these channels provides? How can we determine the content on our site that is driving our best customer engagements overall?

Integration between Web (or mobile app) analytics and data stored in your organization’s customer relationship management (CRM) system is the key to understanding complete, long-term return on investment (ROI) of our digital properties and our marketing channels.

Long-Term Perspective

As stated above, the main purpose of integrating GA and CRM data is to provide a more complete, long-term perspective on the marketing channels and content interactions that first engage your customers when they visit your website or download and use your mobile app. This integration can be particularly helpful in the following scenarios:

  • Business-to-business (B2B). Long sales cycle in which the customer interaction moves from website or mobile app interactions to direct contact with the sales team.
  • Software-as-a-service (SaaS). Subscription-based model in which customers either cancel or renew.
  • Ecommerce. Customer may transact one time only or multiple additional times online or offline.

In this chapter, we’ll measure cost per acquisition for qualified B2B leads and examine long-term or lifetime customer value.

Calculating Cost per Qualified Lead

As anyone who has ever worked with lead generation knows, all leads are not created equal. Many leads are submitted as just general inquiries and don’t really indicate any serious level of engagement. In the use case below, we’ll switch the focus from leads to qualified leads and obtain a much more realistic calculation of marketing ROI.

B2B Use Case: Qualifying Leads for Memory Chips

As a B2B use case, let’s say that you’re the Demand Generation manager for an enterprise product that your company, Pro Processors, sells: memory chips for servers. You don’t sell to consumers but to companies like Google, Facebook, and Amazon. A lot is at stake, since a typical deal could bring in tens of millions of dollars and take your salespeople three to six months to close.

Keep the CPA under $500

In terms of demand gen, the marketing manager has tasked you with generating qualified leads and to keep the cost per acquisition (CPA) under US$500, and herein lies the problem. You interpret cost per acquisition to mean cost per lead, but it would be much more business-focused to think in terms of cost per qualified lead.

In any case, your memory chips have just been reviewed very favorably in an industry report, so you decide to leverage the report as a multi-channel marketing campaign. The research institute that produced the report does not offer the report directly on its own website, but you have secured the right to post it for download on proprocessors.com.

You work with your design team to create a dedicated landing page as shown in Figure 15.1 that features the report, and you set up the following campaigns to drive traffic:

  • AdWords search ads
  • LinkedIn sponsored ads
  • Twitter promoted tweets
  • Facebook paid ads
Screenshot shows a webpage titled as Chip Choices which contains a video in the bottom section and registration form on the right that includes textfields for name and email as well as a Submit button.

Figure 15.1 To download the report, visitors must submit a lead form.

CPA Based on Total Leads, Qualified and Unqualified

When you’re setting up and initially evaluating your campaigns, you do everything you’re supposed to. For starters, you make sure to add GA campaign parameters in Table 15.1 to the inbound campaign links (and, for AdWords, you’ve enabled auto-tagging). For example, the link from your LinkedIn campaign is formatted as:

Table 15.1 Campaign Parameters for the Lead Generation Channels

Campaign Channel utm_medium utm_source utm_campaign
AdWords cpc google Memory Chip Report
LinkedIn social-paid linkedin 2016q2-chip-li
Twitter social-paid twitter 2016q2-chip-tw
Facebook social-paid facebook 2016q2-chip-fb
http://www.proprocessors.com/chip-report?utm_source=linkedin&utm_medium=social-paid&utm_campaign=2016q2-chip-li

You have also set up a goal for the lead submission. You specify /chip-report-thank-you as the destination of your Chip Report goal and /chip-report as the preceding funnel step.

You launch the campaigns. After they’ve been humming along for a month, you analyze the results first results. Because you have used campaign parameters, the GA Campaigns report shown in Figure 15.2 cleanly displays the lead generation goal completions for each of the campaign channels.

Screenshot shows a table listing goal 2 conversion rate and goal 2 conversions for campaign channels such as 2016q2-chip-li, memory chip report, 2016q2-chip-fb and 2016q2-chip-tw.

Figure 15.2 The Campaigns report displaying goal completions for your four campaign channels.

Remembering that the Campaigns report is based only on last-click attribution, and noting two assists for the Chip Report goal in the Multi-Channel Funnel ˃ Top Conversion Paths report shown in Figure 15.3, you split the credit for two of the last-click LinkedIn conversions with Facebook and Google AdWords.

You also notice that a Google AdWords campaign clickthrough later resulted in a conversion from a Google organic return visit. Since this return visit likely resulted from a branded, navigational search prompted by the initial paid visit, you give Google AdWords full credit for this lead as well.

Screenshot shows the campaign paths from 2016q2-chip-fb to 2016q2-chip-li, memory chip report to 2016q2-chip-li and memory chip report to google/organic have conversion 1 and rate 3.32 percent.

Figure 15.3 The Top Conversion Path report indicates which campaign channels might also deserve credit for conversion assists.

You open a spreadsheet and plug in the cost data and the lead conversions for each, as in Table 15.2. It seems like you’ve achieved your objective: the cost per lead is below $500 for each channel, but don’t celebrate yet. (As a note, all data within this chapter is fictitious and does not reflect on the comparative performance of any marketing channel referenced as part of this use case.)

Table 15.2 Cost per Lead (Qualified and Unqualified) by Campaign Channel

Campaign Channel
Cost (US$)
Leads
Cost (US$) per Lead
AdWords
$1,458
8.5
$172
LinkedIn
$1,678
10
$168
Twitter
$908
6
$151
Facebook
$1,193
6.5
$184
All
$5,237
31
$169

Cost per Qualified Lead

Before you share the CPA with the managers, you run a report in the CRM system. You’re disappointed to see that the sales team has marked only very few of the leads as qualified. When you check the notes fields in the report represented in Table 15.3, you learn that some of the leads were looking for consumer products, some didn’t have the budget, some were vendors trying to pitch their own products, and some were just spam.

Table 15.3 Sample CRM Records Lacking Campaign Channel Data

Name Qualification Notes
Dolores Grant Unqualified Interested in consumer only
Heather Quinn Qualified 2–4-month time frame
Ray Ramirez Unqualified Supply chain incompatibility
Keith Hansen Unqualified Spam
Sonny Carter Unqualified Wanted to sell us life insurance
Bruce Kozar Qualified Hot to trot
Ellen Tedesco Unqualified Dep’t reorg., budget in question
Larry Cahill Unqualified Left company

You realize that if you want to understand real ROI, you need to match the campaign channels with qualified leads, but there’s a big issue: the campaign data resides in GA, while the lead qualification data resides in your CRM.

Correlating Campaign Channels with Qualified Leads

To associate the campaign and lead qualification data, you can take one of two approaches:

  • Record the campaign data directly in the CRM. When you submit a lead from your website to your CRM, you can pass your campaign information to be stored directly with each lead in the CRM.
  • Store a visitor ID in both GA and the CRM. You can store a unique but non–personally identifiable ID in GA and your CRM. This ID can then serve as the key on which your exported GA and CRM data. This approach, discussed in more detail later in the chapter, allows you to integrate other types of GA data (in addition to acquisition) with your CRM data.

The Salesforce example provided by Allaedin Ezzedin takes a hybrid approach: we pass campaign data into the CRM directly, and also pass the visitor ID to enable further integrated analysis of GA and Salesforce data. While the example focuses on leads, we could use the same procedure to record campaigns or other traffic sources for completed Ecommerce transactions.

Let’s say that in the case of the memory chip leads, you’re now directly storing campaign data in your CRM—which is Salesforce in our example. Now that your CRM records contain both marketing and lead qualification fields, you can begin to calculate marketing ROI based on qualified leads instead of all leads.

You let the campaign run for another month, and then you pull a new report from your CRM, as represented in Table 15.4.

Table 15.4 Sample CRM Records Containing Campaign Channel Data

Name Qualification Notes Campaign
Nicholas Prince Unqualified Wants too much customization 2016q2-chip-li
Laura Kwon Unqualified Assigned to another project 2016q2-chip-fa
Jason Peralta Unqualified Spam 2016q2-chip-tw
Amy Burnett Qualified Needs to be expedited Memory Chip Report
Deepa Kumar Unqualified Unaffiliated industry 2016q2-chip-tw
Greg Hodges Qualified Multiple shipments 2016q2-chip-fa
Reid Porter Unqualified Just wanted to read the report Memory Chip Report
Brian Apfel Unqualified Was looking for our competitor 2016q2-chip-li

You now tabulate your qualified leads and calculate a much more meaningful cost per acquisition for each marketing channel, as shown in Table 15.5.

Table 15.5 Cost per Qualified Lead by Campaign Channel

Campaign Channel Cost (US$) Qualified Leads Cost (US$) per Qualified Lead
AdWords
$1,458
4 $364
LinkedIn
$1,678
3 $559
Twitter
$908
2 $454
Facebook
$1,193
2 $596
All
$5,237
11 $476

You can now report to the marketing manager that the overall CPA, based on qualified leads, is below $500, and you can consider steering more of your ongoing budget toward the campaigns that are showing better ROI.

One element, however, is missing from our previous analysis. Because the campaign values that we stored in Salesforce are based only on last-click attribution, no credit is given for earlier visits that eventually led to a lead submission on a return visit from a different campaign channel, but we’ll address this gap below.

Joining Google Analytics and CRM Data with Visitor ID

In the Salesforce example, we were able to match marketing channels to qualified leads by directly recording campaign data within Salesforce for each lead submission. As stated previously, however, there is another approach that you can use for integrating GA and CRM data:

  1. Store the same anonymous but unique visitor ID in both GA (as a custom dimension) and your CRM (possibly as a custom field).
  2. Using the visitor ID for the join, merge the GA and CRM data in one of the three following environments:
    • CRM: Import from GA into CRM.
    • GA: Import (anonymous data only) from CRM into GA.
    • Separate environment: Import from both GA and CRM into a third environment such as a spreadsheet, a relational database, or BigQuery.

Exporting Google Analytics Data

You can export as many as 5,000 rows (as comma-separated values [CSVs] and other data formats) directly from any GA table report. If you need to export more than 5,000 rows, you can export in batches, starting at row 1, and then row 5001, and then row 10001, and so on.

If you use the Google Analytics Spreadsheet Add-on, you can export up to 10,000 rows at one time into a Google sheet document, from which you can easily export as CSV. The add-on also allows scheduled automation.

As two additional options for more automated export from GA, you can use ShufflePoint or Analytics Canvas, both discussed in Chapter 16, “Advanced Reporting and Visualization with Third-Party Tools.”

Importing Google Analytics Data into CRM

Once you have imported GA data into your CRM, you can join any GA dimensions with any CRM columns. In the previous lead qualification example, instead of writing the Google campaign data directly to Salesforce with each lead submission, we could have instead just written the visitor ID to the CRM (and also stored it in GA as a custom dimension) and then joined the GA campaign data and the Salesforce lead qualification data, as shown in Table 15.6.

Table 15.6 Google Analytics Campaign Name Imported into CRM and Joined on Visitor ID

Name Qualification Visitor ID Campaign
Nicholas Prince Unqualified 1355402211.1434649167 2016q2-chip-li
Laura Kwon Unqualified 1584125471.5412645325 2016q2-chip-fa
Jason Peralta Unqualified 6521425124.8541252145 2016q2-chip-tw
Amy Burnett Qualified 9852541414.5412548589 Memory Chip Report

If we have been storing client ID as the Visitor ID custom dimension even for unauthenticated sessions, as outlined later in the chapter and in the implementation checklist at www.e-nor.com/book, we could run a report to display previous sessions, from the same campaign or different campaigns, that preceded the returning sessions in which the lead submission occurred. Table 15.7 indicates that one of our qualified leads first clicked through on our LinkedIn campaign before returning the next day from the AdWords campaign and converting. We’re thus getting a more nuanced understanding of our campaign performance, and we’re in fact emulating the multisession scope that the GA Multi-Channel Funnel reports provide, but in this case we’re also benefitting from the additional perspective that the CRM qualification field offers.

Table 15.7 Google Analytics Campaign Data for Converting Click and Previous Sessions, Joined to CRM Lead Qualification Data

Name Qualification Visitor ID Campaign Session Timestamp
Nicholas Prince Unqualified 2514258565.2511425474 2016q2-chip-tw 2016-06-02
Nicholas Prince Unqualified 2514258565.2511425474 2016q2-chip-li 2016-06-07
Laura Kwon Unqualified 2548169369.2478968569 2016q2-chip-fa 2016-05-31
Laura Kwon Unqualified 2548169369.2478968569 2016q2-chip-fa 2016-06-01
Jason Peralta Unqualified 6521425124.8541252145 2016q2-chip-tw 2016-06-01
Nicholas Prince Unqualified 2514258565.2511425474 2016q2-chip-li 2016-06-07
Amy Burnett Qualified 9652312125.5747425369 2016q2-chip-li 2016-06-05
Amy Burnett Qualified 9652312125.5747425369 Memory Chip Report 2016-06-06

Merging Google Analytics Behavior and Audience Data with CRM Data

Medium, source, and campaign are certainly not the only types of GA data that you can merge with CRM data. As other examples, you could merge pageview, event, or custom dimension data with CRM data to measure its impact on lead quality or order value. You could also merge GA audience characteristics such as device category.

What if we wanted to correlate CRM lead quality with video interactions on the memory chip landing page shown previously in Figure 15.1? As long as you have captured the video interactions as GA events, you could merge the event data with the lead qualification data as in Table 15.8 to measure potential impact.

Table 15.8 Event Data for Video Interactions Joined with CRM Lead Qualification Field

Name Qualification Visitor ID Event Category Event Action Event Label
Glen Garcia Qualified 3652154012.3256201845 video 25% chip-choices-video
Glen Garcia Qualified 3652154012.3256201845 video 50% chip-choices-video
Glen Garcia Qualified 3652154012.3256201845 video completed chip-choices-video
Dan Khan Unqualified 3251012458.2215425489 (not set) (not set) (not set)
Teresa Baron Unqualified 2545814247.3625212045 (not set) (not set) (not set)
Brett Jordan Unqualified 2548756523.8563220212 video 25% chip-choices-video
Kim Clarke Unqualified 3621875456.8541024579 (not set) (not set) (not set)
Natalie Pham Qualified 2145841233.8569874124 video 25% chip-choices-video
Natalie Pham Qualified 2145841233.8569874124 video 50% chip-choices-video
Keith Halstrom Qualified 9865851201.8412026958 video 25% chip-choices-video
Keith Halstrom Qualified 9865851201.8412026958 video 50% chip-choices-video
Keith Halstrom Qualified 9865851201.8412026958 video completed chip-choices-video

The video interaction seems to correlate strongly with lead qualification. Of course, the visitors who were most qualified may also have been the most likely to view at least 50% of the video, but it still seems that it would be logical for you, as an analyst and optimizer, to recommend that your designers make the video more prominent on the memory chip landing page pictured in Figure 15.1.

The example in Table 15.9 shows order value by device category—desktop, tablet, or mobile (smartphone)—for leads who later finalized a transaction through the sales team. Tablet is showing the highest average order value, so it would make sense to target more of your AdWords and Facebook ad budgets to tablet. (You could, of course, also add source, medium, and campaign columns for further analysis.)

Table 15.9 Order Value by Device Category

Name Order Value (US$) Visitor ID Device Category
Todd Melchior
$390
5154945989.6545125541 Mobile
Pamela Fischer
$1,230
8575125426.7414512124 Tablet
Brenda DiMaio
$209
8636954159.2541259632 Desktop
Tom Krantz
$890
1478524569.5264585856 Tablet
Oliver Despres
$750
2356265365.5965636415 Desktop
Helen Matsui
$768
2548698585.5874514868 Tablet
Cedric Nejame
$439
2321245236.9856541472 Desktop
Alice Danielson
$387
2541256985.6985681245 Mobile

Using CRM ID as Visitor ID in Google Analytics

In the preceding examples, we generated the visitor ID on the client end and populated it into GA as a custom dimension and into the CRM as a custom field. For the visitor ID value, we actually didn’t create anything new; we just read in the client ID that GA stores in the _ga cookie.

As another option, we could retrieve the lead or customer ID from the CRM an pass it back to the page—probably as a GTM data layer variable or a plain JavaScript variable—for you to record into as a GA custom dimension with the next pageview or event. This option is also illustrated in Figure 15.5.

For instance, in the memory chip example, instead of passing a client-generated visitor ID to the CRM as a hidden field in the lead form, you could have instead read the CRM lead ID as soon as the lead was created, saved it to the page as a variable, and populated this value into GA as the visitor ID custom dimension.

If the lead submission redirected to a separate thank-you page, you could populate the visitor ID as a custom dimension in the new pageview hit—just make sure to set the variable value higher up on the page than the GTM container.

If, however, the lead submission did not redirect to a new page but instead just displayed a confirmation message on the same page without a page reload, you could still pass the visitor ID as a custom dimension in a GA Event tag in Google Tag Manager (GTM) as follows:

  1. When the lead is created in the CRM, retrieve the lead ID value from the new CRM record as outlined in Listing 15.1, and set that as a GTM data layer variable while also writing the other data layer variables that our catch-all event tag, first discussed in Chapter 6, depends on.

  2. Set up Visitor ID as a custom dimension, as described in Chapter 12.
  3. Reconfigure the catch-all event tag to check for visitor ID as a data layer variable (Figure 15.9) to populate into the custom dimension (Figure 15.8). (If the visitor ID is not present in the data layer the other times we use the catch-all event tag, the custom dimension will just not be populated.)
Screenshot shows Event is chosen as as the track type and {{visitor ID}} is chosen as the dimension value with index 1. Event tracking parameters such as category, action and label are also shown.

Figure 15.8 This Google Analytics Event tag in GTM will set the visitor ID custom dimension.

With the CRM lead or customer ID now recorded in GA as a custom dimension, we’ll be able to perform all of the same joins demonstrated earlier in the chapter when we instead generated the visitor ID generated from the client side and passed it into the CRM. Starting from either the website or the CRM, the objective is to store a common visitor identifier in both data sets.

Screenshot shows Visitor ID field in which Data Layer Variable is chosen as the type. Configure Variable section includes options such as data layer variable name and version along with Create Variable button.

Figure 15.9 You can configure this GTM variable to read the visitorID value that we retrieved from the CRM so we can populate the visitor ID custom dimension into our catch-all event tag in Figure 15.8.

Note, however, that if we want to associate previous unauthenticated sessions with our CRM records, and we’re using a back-end value for our Visitor ID custom dimension, we’ll also need to store client ID as a separate custom dimension for authenticated and unauthenticated sessions, as outlined later in the chapter and in the implementation checklist at www.e-nor.com/gabook.

Associating Unauthenticated Sessions with CRM

As mentioned at several points in the chapter and illustrated in Figure 15.5, one of the options for associating GA with CRM is to read a CRM ID into GA as a custom dimension once a user has submitted a form or otherwise authenticated. While this approach is perfectly valid and frequently implemented, it does have one subtle but significant drawback.

GA uses the same Client ID to recognize a return user across multiple sessions, independent of whether or not the user authenticated during any of the sessions. Since Client ID is not, however, exposed as an exportable dimension through the API, we would not be able to associate a back-end Visitor ID custom dimension for authenticated sessions with any Client ID dimension for authenticated and unauthenticated sessions, and we would therefore not be able to associate original unauthenticated sessions (and the channels that generated these sessions) with CRM metrics such as long-term value. The back-end Visitor ID, stored in GA as a custom dimension, would allow us only to associate authenticated (or post-authentication) sessions with our CRM data.

To solve this issue, we can take two approaches:

  • Begin storing Client ID as a custom dimension (named Client ID or Visitor ID) in GA even for unauthenticated sessions, and pass that same value into your CRM once form submission or authentication occurs.
  • Begin storing Client ID as a custom dimension (named Client ID) in GA even for unauthenticated sessions, and store a back-end ID in GA as a separate custom dimension (named Visitor ID) once form submission or authentication occurs. Table 15.10 illustrates an analysis based on these two custom dimensions, which were both included in the join.

Either way, you’ll be able to tie CRM long-term value or lead qualification all the way back to first click attribution, whether or not the user authenticated during that session.

Table 15.10 First-Click Campaign for an Authenticated or Unauthenticated Session Associated with 12-Month Custom Value

Name 12-Month Sales (US$) Visitor ID (back-end) Client ID First-Click Campaign Channel
Glen Garcia $430,000 gg094329843 3652154012.3256201845 2016q2-chip-fa
Natalie Pham $445,000 pn432094328 2145841233.8569874124 2016q2-chip-tw
Keith Halstrom $930,000 hk439029384 9865851201.8412026958 2016q2-chip-li
Amy Burnett $200,000 ba394302489 9652312125.5747425369 Memory Chip Report
Greg Hodges $390,000 hg832742938 2514585101.2584575632 2016q2-chip-fa

Joining GA and CRM Data in Third-Party Tools and within GA

Earlier in this chapter, we noted that you can perform the GA/CRM data joins in the CRM, in a storage environment, or within GA. In Chapter 16, we merge GA and CRM data within BigQuery storage, and in Chapter 17, we merge some non–personally identifiable data from the CRM back into GA.

inline Key Takeaways

Lead qualification. When calculating ROI/CPA on your lead generation campaigns, consider lead qualification status that your sales team updates in your CRM. This may be especially applicable in for B2B and other typically long sales cycles.

Lifetime value. By merging GA and CRM data, you can begin to calculate longer-term value for repeat Ecommerce transactions or for SaaS/subscription renewals.

Recording campaign information directly to CRM. Using the process outlined in the Salesforce example, you can write GA acquisition data directly to your CRM with lead submissions or Ecommerce transactions. Although a common visitor ID by itself would allow you to merge any GA data with your CRM data, recording your GA acquisition data directly to your CRM would make this data immediately visible in your CRM lead or customer records. It’s important to remember, however, that the acquisition data in this case would be based only on last-click attribution: the channels that drove a session prior to the converting return session would not receive any credit for the conversion.

Recording a visitor ID in GA and CRM. You can record a common visitor ID in GA and your CRM that will allow you to join GA and CRM data in within the CRM, within GA, or in a separate environment. Even if you do not have immediate plans to merge your GA and CRM data, you can begin recording the same visitor ID in both environments so you can retroactively join the data at a later date.

Visitor ID not available in GA data by default. There is no visitor/user ID stored by default in the GA data to which you have access. For this reason, you must store a visitor ID as a custom dimension in GA to enable merges with CRM data. You can populate the visitor ID custom dimension with the client ID that you read in from the _ga cookie, a random/unique value that you generate from your own algorithm, or the customer/lead ID from your CRM. The last case is the most common for logged-in users, and can be most efficient since it takes advantage unique customer key already resides in the CRM record, but it would require you to store a separate ID for unauthenticated sessions in a separate custom dimension if you also wanted to associate unauthenticated sessions with CRM data.

No PII data in GA. The GA terms of service prevent us from storing personally identifiable data within GA, so we could not record PII such as name, email or government-issued ID number as any part of the visitor ID custom dimension.

Same user ID for cross-device tracking and GA/CRM merges. In many cases, the logged-in user ID that you pass to GA for cross-device tracking can also serve as the common visitor ID that you store as a GA custom dimension for join with CRM data.

inline Actions and Exercises

  1. Get access to your CRM. If you don’t already have access to your organization’s CRM, obtain read/reporting access so you can view customer and lead records.
  2. Speak with your sales and customer relations team. Speak to managers and other colleagues who are familiar with the sales cycle, repeat business, and so on.
  3. Store a common visitor ID in GA and your CRM. Using the examples in this chapter, plan your steps for storing a common visitor key in GA and your CRM. In many cases, the visitor ID that you record to GA will be the customer or lead ID in your CRM.
  4. Decide how to associate unauthenticated sessions with CRM data. To associate unauthenticated sessions (and thereby first-click traffic sources) with CRM data, decide which of the two approaches outlined previously is the most suitable for your organization: storing the GA client ID (or an ID that you generate) as a GA custom dimension and, when the user authenticates, as a field in your CRM, or maintaining two custom dimensions in GA—one for the client ID (populated in GA during all sessions) and the other for the CRM ID (populated in GA during and after authenticated sessions.)
  5. Write GA campaign data directly to your CRM. Using the gasaleforce.js code reference in the Salesforce example, you can also make a plan to write GA campaign/acquisition data directly to your CRM so it’s immediately accessible (without a merge based on visitor ID).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset