Tracking “Click to Chat” with Google Analytics

When a user clicks on the WhatsApp icon or button, an event is triggered in Google Analytics.The plugin will not install Google Analytics (GA) itself. Instead, it will send events based on your existing configuration and the plugin’s settings. You can customize these events through the plugin’s settings to ensure they track user interactions as desired.

For users with Google Analytics , custom event parameters can be utilized. The previously used parameters such as Category, Label, and Action are no longer necessary.

Event Configuration:

  • Event Name: click_to_chat
    This name is used to identify the “Click to Chat” event in Google Analytics reports.

Event Parameters:

  • Number: This parameter captures a unique identifier related to the chat session or counts the number of times the chat button has been clicked.
  • Title: This represents the title of the page where the event occurred, helping to identify the specific page the user was on.
  • URL: This captures the full URL of the page where the event took place, allowing for precise tracking of where the interaction happened.

Advanced Configuration:

To enhance tracking, additional information from URL parameters or cookies can be included in the event. For instance:

  • URL Parameters: To capture details like campaign parameters, you can extract values directly from the URL using square brackets around the parameter name (e.g., [gclid], [utm_source]).
  • Cookies: Values from cookies can also be retrieved using double square brackets around the cookie name (e.g., [[_ga]]).

Example Setup:

In this example:

  • {title} is replaced by the page title.
  • {url} is the current page URL.
  • {number} is your unique chat identifier.
  • [gclid] extracts the value from the URL.
  • [[_ga]] fetches the Google Analytics cookie value.

By implementing this setup, all relevant data related to the “Click to Chat” event will be captured, providing valuable insights into user interactions.

How to View Real-Time Events

To see real-time user interactions as they happen:

  1. Log in to Google Analytics.
  2. Navigate to Real-Time -> Events.

This section shows events being triggered as users click on the WhatsApp button in real-time.

How to View Recorded Events

To analyze past event data, follow these steps:

  1. Go to BEHAVIOR -> Events -> Overview in the Google Analytics dashboard.
  2. Here, all recorded events will be listed, showing insights like the number of interactions, event actions, and event labels.

Create Event from Google Tag Manager using dataLayer – send to Google analytics – Click to Chat (holithemes.com)

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.