Google Analytics + 301 Redirect

This question was asked before here:

But case 1 was not answered, and that’s the case I’m having trouble with.

I want to go from mysite.com/username to amazon.com
I’m using a 301 redirect, but I want to track that someone landed on mysite.com/username with Google Analytics. How can I do this? It seems like I need to somehow delay the redirect for a couple of seconds to ensure that Google Analytics loads, but how can I do this?

1 Like

I want to do the same thing. From what I’ve found, it’s not possible through the 301 redirect settings page because there’s no real page on which the analytics can load. You’d have to either:

  1. Create an actual page in webflow (maybe it just says “loading…” or something) and add an event trigger to the page that will cause it to redirect to Amazon after the page (including GA) fully loads.
  2. Pull the information from server logs if you have access to them, which I don’t think we do in webflow

Hi,

For your suggestion 1 I’ve used this code: meta http-equiv="refresh" content="5;url=yoursiteadress.html"> coming from this discussion:Creating a re-direct page

It is totally fine. But how long does the timing setting need to be, so Google Analytics can measure the redirect and track correctly? Currently it is set to 5 seconds, but I would like to set it to something like 0.8s. Is this possible and will Google Analytics still track accordingly?