Set up Google Analytics 4 on a Composer site

In this article


As of July 1, 2023, standard Google Universal Analytics (UA) properties will no longer process data. New data will only flow into Google Analytics 4 properties. You'll be able to see your UA reports for a period of time after July 1, 2023.

This article covers the best practices for the initial setup of GA4 on your Finalsite Composer site. More information about advanced tracking settings can be found in our article titled, "GA4 advanced custom analytics.

Add GA4 Measurement ID to Composer

Composer now natively supports GA4 Measurement IDs ("G-XXXXXXX") through the interface. 

Step 1: Create a GA4 property

Follow the instructions from Google to set up your account and create a Google Analytics 4 property for your site.

Step 2: Copy your GA4 Measurement ID

Then, copy the GA4 Measurement ID to add it to Composer. You can find this in the "Data Streams" tab after you select the property.

Step 3: Paste Your GA4 Measurement ID in Composer

In Composer, click the three-dot menu next to the domain in the Pages menu, then select “Settings.”

Go to the “SEO” tab and paste the Measurement ID into the “Google GA4 ID" field. This will be in a "G-XXXXXXX" format, and the entire string should be pasted.

Note: Repeat Step 3 for each of your subdomains as the GA4 Measurement ID will need to be added in each domain's settings.

Domain Settings SEO tab with GA4 field (second field) highlighted

Click “Apply” to save the changes.

Create custom dimensions with event tracking

To allow for more comprehensive reporting and attribution in Google Analytics, we’ve set up automatic event tracking for several features on your Composer site.

  1. Select "Admin" in the left navigation of Google Analytics.
  2. Within "Property" settings, select "Custom Definitions."
  3. Click the “Custom dimensions” tab and enter the following:
Dimension Name Description Scope
Event Parameter
button_text Button Text Event button_text
click_text Click Text Event click_text
click_classes Class of link clicked Event click_classes
element_text Element Text Event element_text
element_url Element URL Event element_url
form_text Form Text Event form_text
media_title Media Title Event media_title
resource_title Resource Title Event resource_title
resource_url Resource URL Event resource_url
url_path URL Path Event url_path
video_name Video Name Event video_name
video_state Video State Event video_state
video_title Video Title Event video_title

In June of 2023, the event tracking item "click_classes" was added to the above list.

For more in-depth information on custom dimensions, see the following Google Support article: Custom dimensions and metrics.

Acknowledge user data collection policies

Google has specific policy requirements for its advertising features, so you’ll need to ensure your privacy policy is up to date to leverage Google’s cross-device tracking.

Once you have updated your privacy policy to meet Google’s requirements, click “I acknowledge” in the “User Data Collection Acknowledgment” in your Google Analytics Admin Settings.

unnamed.png

Control user and event data retention

The default setting is for 2 months, but you can change it to 14 months to track user engagement. These controls don’t affect most standard reporting, which is based on aggregated data. Changes to these settings take effect after 24 hours. Learn more about data retention settings.

Enable enhanced measurement settings

By enabling this feature in GA4, Google will automatically measure interactions and content on your sites in addition to standard page view measurement.

Data from on-page elements such as links and embedded videos may be collected with relevant events. You must ensure that no personally identifiable information will be sent to Google. 

If you enable this feature, do not enable “Outbound clicks” and “File downloads.” If you do, it will artificially inflate the custom events we have set up for Composer that provide additional information and were created specifically for Composer websites.

To enable this feature go to Admin > Data Streams > click on your data stream > toggle enhanced measurement on:

unnamed__7_.png

Click the gear icon to adjust settings here:

unnamed__6_.png

Next, click “Show advanced settings” under “Site search” and add these parameters:

Search Term Query Parameter: utf8

Additional Query Parameters: const_search_keyword,const_search_first_name,const_search_last_name

After updating, it should look like this before you can click "Save." 

unnamed__5_.png

 

 

Was this article helpful?
11 out of 11 found this helpful

Comments

0 comments

Please Sign in to leave a comment if you don't see the comment box below.