Table of Contents

Veb-saytda hansı CTA butonlarını ölçmək qaydası

How to set up a cta_click event with Google Tag Manager

cta_click is an event created to record when a user clicks any Call-To-Action button on a website. CTA buttons are usually used for the following actions:

  • Sign up

  • Buy now

  • Try for free

  • Request a demo

  • Contact us

These buttons push the user towards the next step in their journey and are one of the key KPIs for measuring the effectiveness of ad campaigns.

Why does the cta_click event matter?

  1. Conversion tracking: You can see which CTA button gets the most clicks.

  2. A/B test analysis: Compare the performance of different CTA texts.

  3. UI/UX insight: Do the placement, colour and size of CTAs affect user behaviour?

  4. Marketing channel effectiveness: Do users arriving from campaigns respond to the CTAs?

Detailed event structure example

				
					window.dataLayer = window.dataLayer || [];
dataLayer.push({
  event: 'cta_click',
  button_text: 'Qeydiyyatdan Keç',
  button_id: 'register_btn_hero',
  page: 'homepage',
  position: 'hero_section',
  campaign: 'yay2025',
  variation: 'A'
});
				
			

Code explanation

ParameterDescription
eventEvent name: cta_click
button_textText on the button (e.g. “Sign Up”)
button_idUnique ID of the HTML button
pagePage where the event occurred
positionPosition of the button on the page (e.g. footer, sidebar)
campaignWhich ad campaign it is linked to
variationA/B test version (e.g. A, B)

How do you set it up in GTM?

Step 1: Create a Click Trigger

  1. Log in to GTM

  2. Triggers > New

  3. Type: Click – All Elements

  4. Filter:

    • Click ID equals register_btn_hero or

    • Click Text contains "Sign Up"

Step 2: Create a Tag

  1. Tags > New

  2. Type: Google Analytics: GA4 Event (or Custom HTML)

  3. Event Name: cta_click

  4. Event Parameters:

    • Enter the parameter names and values as shown above.

Step 3: Place it in the Data Layer

If you manage tracking in code, add the dataLayer.push() code above to your site at the moment of the click. This is essential for the tag to recognise the event in the dataLayer.

For more accurate measurement

  • Assign CTA IDs and classes in a planned way so GTM triggers are easy to set up

  • Create a custom report for the “cta_click” event in your GA4 dashboard

  • On pages with several CTA buttons, use the position parameter to add labels such as hero, footer or popup


What will this event give you?
  • Which CTA gets the most clicks?

  • Which page’s button is most effective?

  • Which A/B test version delivers the higher conversion rate?

  • What impact does the campaign have on CTA clicks?

The answers to these questions will help you create more effective design, messaging and advertising strategies.

Facebook
Twitter
LinkedIn