How to track server side redirect in google analytics?

by cameron_walter , in category: SEO Tools , 2 months ago

How to track server side redirect in google analytics?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by naomi_cronin , 2 months ago

@cameron_walter 

To track a server-side redirect in Google Analytics, you can use Google Tag Manager to trigger an event when the redirect occurs. Here is how you can set this up:

  1. In Google Tag Manager, create a new trigger for the redirect by going to Triggers > New > Trigger Configuration.
  2. Choose the trigger type as "Page View" and select the condition "Page URL matches RegEx" or "Page URL contains" depending on how the redirect URL is structured.
  3. Enter the URL pattern of the redirect in the field provided.
  4. Save the trigger and go to Tags > New > Tag Configuration.
  5. Choose the tag type as "Universal Analytics" and select the track type as "Event".
  6. Enter the category, action, and label for the event. For example, Category: Redirect, Action: Server-Side Redirect, Label: [URL of the redirect].
  7. Under Triggering, select the trigger you created in step 2.
  8. Save the tag and publish the changes in Google Tag Manager.


Now, whenever a user is redirected via a server-side redirect that matches the URL pattern you specified, an event will be triggered in Google Analytics tracking the redirect. You can view this data in the Events section of Google Analytics to track how many times the redirect occurs and analyze user behavior after the redirect.