Salesforce Marketing Analytics App Documentation

Installation

Follow the link provided to you and select the option to “Install for All Users”.

Configure remote site settings

  1. Navigate to Setup > Settings > Security > Remote Site Settings and create a new setting

  2. Add the following Remote Site URL: https://www.google-analytics.com

Configure Lead Mappings

  1. Select Setup under the gear icon on the top right of your screen.
  2. In the navigation pane to the left go to Platform Tools > Objects and Fields > Object Manager.
  3. Select Lead.
  4. Select Fields & Relationships and on the top right corner, select Map Lead Fields.
  5. Map GA Client ID, GA Revenue ID, GA Tracking ID, and GA User ID to their respective fields from Leads to Accounts and Opportunities.

Configure Web-To-Lead Form

  1. Navigate to Platform Tools > Feature Settings > Marketing > Web-to-Lead.

  2. Create new form.

  3. Add GA Client ID, GA Revenue ID, GA Tracking ID, and GA User ID to our new form and create.

  4. Modify the input fields for GA Client ID, GA Revenue ID, GA Tracking ID, and GA User ID by removing the the label, maxlength, and size fields and convert the input type field to hidden and add those fields to your form.

    • Before
    • After
  5. You will need to use some javascript to retreive the client id from Google Analytics and add it to your hidden field. You can find detailed instructions here.

  6. You can manually set the values of GA Revenue ID & GA Tracking ID in the form.

In order to view your Lead’s activity on your website via Google Analytics, you’ll need to add a custom setting and add the custom link object provided by this app into your desired layout in Leads, Accounts, and Opportunities.

  1. Find the unique path for visitor activity in Google Analytics

    • Log into Google Analytics
    • Navigate to Audience > User Explorer and select a random CLient ID
    • Note the ID in the url path after “visitors-user-activity”
  2. Now in Salesforce, navigate to Platform Tools > Custom Code > Custom Settings

  3. Select Manage for Attributio Settings

  4. Select New and add the ID extracted from Google Analytics to GA Activity Link ID field in Salesforce Custom Settings

  5. Finally, add the GA Activity Link to a Page Layout under Platform Tools > Objects and Fields > Object Manager > {The object you want to add the link}> Page Layout

  6. Drag and drop the GA Activity Link into the Custom Links section

  7. Finally, navigate to the view of your page layout and if you added the GA Activity Link ID under custom settings and your Object has an id for the GA Client ID field present, you should have a valid link to view the activity of that user in Google Analytics.

Workflow

If the Marketing Analytics App has been properly configured, your website should be collecting the client id provided by Google Analytics and storing it as a custom field under Leads. During the Lead Conversion and Opportunity Qualification Proccess, you should be able to view all of the details regarding your Lead and Opportunity’s activity on your website, from how they got there (what ads, keywords, campaigns, or referrals), to what pieces of content they visited before converting on your website form.

In addition, when an Opportunity is Won and the amount and client id fields are present, that revenue data will be available in custom reports in Google Analytics for further anaysis on determining ROI on Ads and Marketing campaigns.

Versions

  • v 1.0 First Release
  • v 1.1 Removed Remote SIte Settings for manual installation by user.