Track button clicks with GTM
Roles
These roles reflect the default DreamApply setup.
You can define custom roles based on your
institution's needs. Learn more →:
You can define custom roles based on your
institution's needs. Learn more →
Each programme description page in DreamApply has the Share button that allows applicants to share the page link. Assume you want to track how many users click this button and on which programme pages these clicks occur.
To do this, we will integrate DreamApply with Google Tag Manager, set up a tag to capture this data and send it to Google Analytics for reporting.

Before you begin
- Make sure your Administrator account in DreamApply has the
Superuserrole. - Make sure you have an account and container in Google Tag Manager. For details, see Create an account and container in the Google documentation.
- Make sure you have an account and a data stream in Google Analytics. For details, see Add a data stream in the Google documentation.
Step 1. Integrate with Google Tag Manager
First, we need to connect DreamApply to Google Tag Manager.
In Google Tag Manager, open your container.
At the top of the page, copy the container ID.

In DreamApply, in the main menu, under System, select Settings.
In the Analytics settings section, under Google Tag Manager, specify the ID for your container.
At the top of the form, click Save changes.

Step 2. Enable built-in variables
Next, we need to enable built-in variables in Google Tag Manager. These variables are required to pass information about the click event and page path from the programme description page.
In Google Tag Manager, go to Variables.
Under Built-In Variables, click Configure and enable the following options:
- Click Text
- Page Path

Step 3. Create a click trigger
We need to create a click trigger in Google Tag Manager. The trigger tells Google Tag Manager to fire a tag when a user clicks the Share button on the programme description page.
In Google Tag Manager, go to Triggers.
Click New and create a trigger with the following settings:
- Trigger name: Share programmes
- Trigger type: Click - All Elements
- Trigger fires on: Some Clicks
- Condition:
{{Click Text}}containsShare
In the top right corner, click Save.

Step 4. Set up the GA4 configuration tag
We need to connect Google Tag Manager to a GA4 property. This step is required to establish a connection between Google Tag Manager and Google Analytics and send the reporting data to it.
In Google Analytics, locate and copy the Measurement ID for your data stream. For details, see Measurement ID in the Google documentation.

In Google Tag Manager, go to Tags.
Click New and create a tag with the following settings:
- Tag name: GA4 - Configuration
- Tag type: Google Analytics > Google Tag (Load the Google tag associated with your Google Analytics stream)
- Tag ID: The Measurement ID of your data stream in Google Analytics
- Triggering: Initialization - All Pages
In the top right corner, click Save.

Step 5. Create a GA4 event tag
Finally, we need to create a GA4 tag that will fire when a user clicks the Share button and send information about the click event to Google Analytics.
In Google Tag Manager, go to Tags.
Click New and create a tag with the following settings:
- Tag name: Share programmes
- Tag type: Google Analytics > GA4 Event
- Measurement ID: The Measurement ID of your data stream in Google Analytics
- Event name:
share_programmes - Triggering:
Share programmestrigger created in step 3
In the top right corner, click Save.

Step 6. Publish the GTM container
Once the tags are set up, we can publish the GTM container. In Google Tag Manager, click Submit, provide a version name and description and click Publish.
Step 7. Test and analyze the Share button clicks
Now, we can test the setup and verify the data is collected correctly.
- Open the DreamApply portal in a new browser window using Incognito mode.
- Open different programme description pages and click the Share button.
- In Google Analytics, open Realtime overview and check the Event count widget.
- Look for the event name
share_programmes. Click it to drill down into the event parameters.

Step 8. Create a custom report
To analyze long-term data, we can set up a custom report in Google Analytics. The report will show a list of programme description pages where the Share button was clicked and the number of times the click occurred.
Realtime reports in Google Analytics are available immediately. Standard reports may take up to 24-48 hours to begin displaying data after initial setup. For details, see Data freshness in the Google documentation.
In Google Analytics, go to Explore and select Blank.
In the left pane, under Variables > Dimensions, add:
- Event name
- Page title
Under Metrics, add Event count.
In the Settings tab (middle section), add:
- Rows: Page title
- Filters: Event name exactly matches
shared_programmes - Values: Event count
