Wednesday, October 16, 2024
HomeHow to GuidesHow to Track SGE

How to Track SGE

Search Generative Experience (SGE), introduced by Google, blends AI-driven content into the search engine results pages (SERPs), providing users instant answers, summaries, and related information.

Tracking SGE performance is crucial to understanding how this new search experience affects traffic, rankings, and visibility. Tracking SGE also opens insights into leveraging AI Overviews for ranking keywords.

Using Google Analytics for Tracking SGE

Tracking SGE using GA4 involves tracking URL Fragments. The Fragment path for URLs on SGE results is appended with “#:~:text=“. This is similar to the fragments seen for Featured Snippets & People Also Ask – the scroll-to-text fragments.

The report may include traffic from sources like Featured snippets or People Also Ask as the URL Fragment is the same for all.

I recommend using tools like Semrush to figure out a Pareto on which SERP feature contributes to visibility to vet traffic reported in GA4

Sample GA4 Report for Tracking SGE

Sample landing Page report based on the  SGE tracking event created in GA4
Sample landing page report based on the SGE tracking event created in GA4

Step by Step Instruction on tracking SGE in GA4

1. Set Up Google Tag Manager (GTM)

Ensure you have GTM installed on your website and properly linked to your GA4 property.

2. Create a Custom JavaScript Variable in GTM

You would need a variable that captures the URL fragment.

  1. In GTM, go to Variables.
  2. Click New and choose Variable Configuration.
  3. Select Custom JavaScript.
  4. Enter the following code to create a variable that captures the URL fragment:
function() 
{
  return window.location.hash;
}

5. Name this variable, e.g., URL Fragment.

3. Create a GA4 Event Tag in GTM

Set up a tag that sends the fragment data to GA4.

  1. Go to Tags and click New.
  2. Choose Tag Configuration and select GA4 Event.
  3. Configure your GA4 Event tag:
    • Configuration Tag: Select your GA4 configuration tag.
    • Event Name: Enter an appropriate event name, like fragment_view.
    • Event Parameters: Add a parameter to capture the fragment.
      • Parameter Name: url_fragment
        • Value: Choose the URL Fragment variable you created earlier.
  4. Set up a trigger for this tag:
    • Click Triggering and select Page View.
    • Click the plus icon to create a new trigger.
    • Name the trigger, e.g., All Page Views.
    • Choose Page View as the trigger type.

4. Configure GTM to Capture Fragment Changes

By default, GTM only captures the initial page load. To track fragment changes, you need an additional setup.

  1. Go to Triggers and click New.
  2. Choose Trigger Configuration and select History Change.
  3. Name this trigger, e.g., Fragment Change.
  4. Set up the trigger with the following configuration:
    • Enable this trigger when all of these conditions are true: Select Page URL matches .* (using Regex).
  5. Save the trigger.

5. Link the Fragment Change Trigger to Your GA4 Event Tag

Ensure the event tag also fires on fragment changes.

  1. Go back to the GA4 event tag you created.
  2. Under Triggering, add the Fragment Change trigger.

6. Publish Your GTM Container

After setting up the tags and triggers, publish the changes in GTM.

7. Verify Data in GA4

Check GA4 to ensure the event with the URL fragment parameter is being captured correctly.

  1. Go to your GA4 property.
  2. Navigate to Events and look for the fragment_view event.
  3. Check the event parameters to see if url_fragment is being recorded.

Using Semrush to Track AI Overviews

You can use third-party tools like Semrush to track AI Overviews snippets. The only limitation here is you won’t be able to track traffic accurately. The traffic metric in the report doesn’t match with GA4 numbers.

The Position Tracking tool in Semrush can monitor a website’s visibility within AI Overviews.

1. Go to Projects on the left side of the Semrush console

adding projects in semrush

2. Now Scroll to the left and click on Create Projects to add domain and target keywords

3. Once the Project is setup, click on the overview tab in the Position Tracking tool

4. Filter AI Overviews in the SERP features filter

AI Overview in semrush
AI Overview as SERP feature in Semrush report

5. The keywords report will be filtered for visibility performance for AI Overviews.

A Detailed Guide on Tracking AI Overviews

Subscribe to Our Newsletter!

Sachin Shaji Kalloothara
Sachin Shaji Kalloothara
Sachin Shaji Kalloothara is a Digital marketer with 6 years of experience in SEO and PPC. He currently works in HiveMinds as Senior Account Director.
RELATED ARTICLES

1 COMMENT

  1. The combination of using GA4 and Semrush is a great strategy. I was able to analyse the impact of SGE effectively with your guide. Thank you!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments