Setting up Google Analytics for Appointment Scheduler
Notes:
- You MUST complete these steps in a sandbox environment before pushing to production via an Outbound Change Set.
- These instructions cover how to set up Basic Page Tracking with Google Analytics. For more advanced tracking, consult Google Analytics Support.
Before you begin
Obtain a Google Analytics Tracking Code
Step 1: Update your Community Template
- Ensure that your sandbox has been refreshed before continuing.
- Login to your sandbox.
- Navigate to your Community Theme tab.
- Click the Theme Name for the Community you wish to track.
- Make note of the Template Name and store it for later use.
- Navigate to Setup and search for Visualforce Pages.
- Locate the page that was listed as your Template Name.
- Select Edit.
- Scroll to the end of the code and paste your Google Analytics tracking code BEFORE the last </body>:
Note: You must change the beginning of the following line in your Global Site tag from:
<script async src=...
To this:
<script async='async' src=...
-
Save your changes.
Step 2: Test the changes in your Sandbox
- Login to your Community using an existing test user.
- Verify they can create an Appointment, Interview, etc.
- Test any additional processes that are important to your institution.
- Verify that data is displaying in Google Analytics 'Real-Time.'
Step 3: Create and Deploy a Change Set