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:

User Explorer report with no data
User Explorer report with no data

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:

Search for User Explorer report
Search for User Explorer report

2. Open User Explorer and click on one of the client IDs:

Client IDs list in User Explorer report
Client IDs list in User Explorer report

3. Copy the client ID and put it in a text document:

Copy the Client ID
Copy the Client ID

4. Copy the URL of this page (dedicated to one user) and put it in a text document:

Copy User Explorer URL for a selected user
Copy User Explorer URL for a selected user

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:

Search for client ID in the text document
Search for client ID in the text document

You need to remove it, and split the URL into two strings (all symbols before the client ID, and all symbols after):

Remove client ID from the URL
Remove client ID from the URL

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”:

Search for Leads in Salesforce
Search for Leads in Salesforce

7. Click on “Fields”.

8. Somewhere on the page, locate “Google Analytics Link” field:

Locate Google Analytics Link
Locate Google Analytics Link

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.

Leave a Reply

Your email address will not be published. Required fields are marked *