Installation
Follow the link provided to you and select the option to “Install for All Users”.
Configure remote site settings
-
Navigate to Setup > Settings > Security > Remote Site Settings and create a new setting
-
Add the following Remote Site URL: https://www.google-analytics.com
Configure Lead Mappings
- Select Setup under the gear icon on the top right of your screen.
- In the navigation pane to the left go to Platform Tools > Objects and Fields > Object Manager.
- Select Lead.
- Select Fields & Relationships and on the top right corner, select Map Lead Fields.
- 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
-
Navigate to Platform Tools > Feature Settings > Marketing > Web-to-Lead.
-
Create new form.
-
Add GA Client ID, GA Revenue ID, GA Tracking ID, and GA User ID to our new form and create.
-
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
-
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.
-
You can manually set the values of GA Revenue ID & GA Tracking ID in the form.
Configure GA Activity Link
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.
-
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”
-
Now in Salesforce, navigate to Platform Tools > Custom Code > Custom Settings
-
Select Manage for Attributio Settings
-
Select New and add the ID extracted from Google Analytics to GA Activity Link ID field in Salesforce Custom Settings
-
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
-
Drag and drop the GA Activity Link into the Custom Links section
-
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.