[UA] Redirects

Place the tag on redirecting pages.

If your site uses redirects, the redirecting page becomes the landing page's referrer. For example, if you've changed your site so that index.html now redirects to home.html, then index.html becomes the referrer for home.html. If someone reached your site via a Google search that sent them first to index.html, you won't have any data regarding the Google search.

For this reason, you should place the Analytics tag on the redirecting page as well as on the landing page. This way, the redirecting page will capture the actual referrer information for your reports.

Note that you may not be able to successfully implement the tag on all redirect pages as some redirecting pages may not have any code. Additionally, some browsers may actually redirect before the JavaScript call from the code can be made.

Related resources

google-developers-svg

Refer to Introduction to analytics.js to learn more about Analytics tag.

 

gtm-logo-sm-svg

Refer to the Analytics (Universal Analytics) tag if you use Google Tag Manager to manage your Analytics tag.

 

Was this helpful?

How can we improve it?
true
Choose your own learning path

Check out google.com/analytics/learn, a new resource to help you get the most out of Google Analytics 4. The new website includes videos, articles, and guided flows, and provides links to the Google Analytics Discord, Blog, YouTube channel, and GitHub repository.

Start learning today!

Search
Clear search
Close search
Main menu
12898642600136909062
true
Search Help Center
true
true
true
true
true
69256
false
false