So you have installed GA Connector package on Salesforce and brought all fields from the website into Salesforce.
There is one more thing you need to do in order to make “Google Analytics Link” field work properly. Because right now when you click on it, you probably see something like this:
In order to fix this, here is what you need to do:
1. Go to your Google Analytics and type “User Explorer” in the search field:
2. Open User Explorer and click on one of the client IDs:
3. Copy the client ID and put it in a text document:
4. Copy the URL of this page (dedicated to one user) and put it in a text document:
5. If you do a search in this new text document for a client ID, you’ll notice that the client ID is in the middle of the URL:
You need to remove it, and split the URL into two strings (all symbols before the client ID, and all symbols after):
Later we’ll refer to these strings as the first half of the URL and the second half of the URL.
6. After that, go to Salesforce – Setup, and search for “Leads”:
7. Click on “Fields”.
8. Somewhere on the page, locate “Google Analytics Link” field:
9. Click on “Edit” to the left of this field.
10. Replace the contents of this field with the following:
HYPERLINK( (“https://analytics.google.com/analytics/web/#report/visitors-user-activity/a72840801w110617423p115383936/%3F_r.userId%3D” & zuevsoftware__CID__c & “%26_r.userListReportStates%3D%26_r.userListReportId%3Dvisitors-legacy-user-id/“), “Open in Google Analytics”)
However, make sure to:
- replace the text in blue with first half of the User Explorer URL;
- replace the text in brown – with the second half of the User Explorer URL.
Make sure to keep the quotes and everything else in the text area.
11. Click on “Save”.
Viola! Now when you click on Google Analytics Link in you Leads, it will take you to the User Explorer report for the selected lead.