Track click events with Google Tag Manager

Learn how to track clicks on your Framer site using Google Tag Manager and send them to Google Analytics 4.

Google Tag Manager can track user interactions without changing your site’s code. This guide explains how to track all clicks, all link clicks, or only specific links, and how to send those events to Google Analytics 4.

Before you begin

Before following this guide, make sure you have:

Track all clicks

To track every click on your site:

  1. In Google Tag Manager, go to Triggers.

  2. Click New.

  3. Select Trigger Configuration.

  4. Choose All Elements under Click.

  5. Name the trigger and save it.

Next, create a GA4 Event tag.

  1. Go to Tags.

  2. Create a new Google Analytics: GA4 Event tag.

  3. Enter an event name, such as all_clicks.

  4. Select your All Elements trigger.

  5. Save the tag.

If you only want to track links:

  1. Create a new trigger.

  2. Select Just Links.

  3. Save the trigger.

  4. Create a new GA4 Event tag.

  5. Assign the Just Links trigger.

  6. Save the tag.

To track only selected links, first enable click variables.

  1. Go to Variables.

  2. Click Configure.

  3. Enable the variables under Clicks.

Use Preview mode to inspect your links and identify a shared value, such as a CSS class, link URL, or link text.

Then:

  1. Edit your link click trigger.

  2. Change the trigger to Some Link Clicks.

  3. Add a condition that matches the links you want to track.

  4. Save the trigger.

Send additional click information to Google Analytics

To include more context with each event, add event parameters to your GA4 Event tag.

Parameter

Value

link_url

Click URL

link_text

Click Text

You can also include other built-in click variables if needed.

Test your events

  1. Click Preview in Google Tag Manager.

  2. Connect to your published website.

  3. Click the elements or links you’re tracking.

  4. Open Google Analytics → Admin → DebugView.

  5. Confirm that your events appear with the expected parameters.

FAQ

  • Should I track all clicks or only specific ones?

    Tracking only meaningful interactions usually produces cleaner reports. Focus on clicks that represent important user actions, such as navigation, downloads, or calls to action.

  • Can I send additional information with an event?

    Yes. GA4 Event tags support event parameters, allowing you to send details such as the clicked URL or link text.

  • Do I need to publish my container before events are tracked?

    Yes. Changes only affect your live site after you publish your Google Tag Manager container.

Updated

Your next idea starts here

GPT 5.6 Terra

Create personal portfolio

Build startup site

Launch landing page

Start company blog

Framer UI showing Pages, Layers and Assets panels titles
Framer UI showing Pages, Layers and Assets panels titles