Set up Google Analytics 4 on a Composer site

Setting up Google Analytics 4 on a Composer site involves pasting your GA4 Measurement ID into Domain Settings and configuring five areas: custom dimensions, user data collection policies, data retention, enhanced measurement, and site search parameters. Repeat the Measurement ID step for each subdomain.

💡Quick answers

  • Where do you enter the GA4 Measurement ID in Composer? In Domain Settings (three-dot menu next to the domain) > SEO tab > Google GA4 ID field. Repeat for each subdomain.
  • What format is the GA4 Measurement ID? The G-XXXXXXX format; paste the full string exactly as it appears in Google Analytics > Data Streams.
  • Which enhanced measurement events should NOT be enabled in GA4? Outbound clicks and File downloads; enabling them artificially inflates the custom events Finalsite has already set up specifically for Composer sites.
  • Setting up custom dimensions for Finalsite event tracking? In Google Analytics > Admin > Data Display > Custom Definitions > Custom dimensions tab, add the event parameters listed in the article (button_text, click_classes, url_path, video_title, etc.).
  • What data retention setting is recommended for tracking user engagement? Change the default from 2 months to 14 months in GA4 Admin settings; changes take effect after 24 hours.

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.

Important 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 Data Display settings, select Custom Definitions.
  3. Click the Custom dimensions tab and enter the following:
Dimension Name Description Scope Event Parameter
Button text Text displayed on the button clicked. Event button_text
Click classes The HTML class attribute of the link or element clicked. Event click_classes
Click text The visible text of the link or element clicked. Event click_text
Data file name The name of the file being interacted with or downloaded. Event data_file_name
Element text Text within the specific HTML element interacted with. Event element_text
Element URL The destination URL of the element clicked. Event element_url
Form text Text associated with a form submission or interaction. Event form_text
Media title The title of the media file (e.g., audio or video). Event media_title
Page location The complete URL of the webpage that someone visited on your website. Event page_location
Page referrer The referring URL (previous URL), which can be your domain or external. Event page_referrer
Resource title The title of the resource being accessed. Event resource_title
Resource URL The URL of the resource being accessed. Event resource_url
URL path The path portion of the URL (e.g., /blog/article-name). Event url_path
Video name The internal name assigned to the video. Event video_name
Video state The current status of the video (start, progress, complete). Event video_state
Video title The public-facing title of the video. Event video_title

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. 

Important Note

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.

Once you are ready 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: Specify up to 10 parameters in order of precedence, separated by commas. Only the first matching parameter will be used. 
    • For example: q,s,search,query,keyword
  • Additional Query Parameters: Specify up to 10 parameters separated by commas. (Case insensitive). 
    • For example: const_search_keyword,const_search_first_name,const_search_last_name

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

site search google analytics parameters.png

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

Comments

0 comments

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