2

We have moved our website from classic ASP to Magento. In the process almost all our URLs have changed. I noticed some old style URL requests are being made with Google campaign tracking in the querystring. I need to pass the querystring through which I was not doing for these particular URLs.

Initially I had setup the redirect as permanent, 301. Below is an example of the old and new category URLs.

/category.asp?id=100 -> /electronics.html

Basically I just looked for the category.asp and the id and mapped it to the Magento equivalent not caring about any other parameters. Like I mentioned earlier I discovered that some instances of these URLs have Google campaign parameters.

My question is if I should still keep the redirect a permanent given that the Google parameters could vary? Below are some examples of what will happen:

/category.asp?id=100&utc_medium=email -> /electronics.html?utc_medium=email

/category.asp?id=100&utc_medium=cpc -> /electronics.html?utc_medium=cpc

My thought is that if I'm going to make the redirect permanent it should redirect to the same URL each time. What I mean by that is that all URLs that contain category.asp?id=100 should go to electronics.html. Maybe that is a misunderstanding.

1 Answer 1

1

Google treats every variation of the query string as a separate URL. When the parameters differ they are technically different URLs. It is appropriate to use 301 permanent redirects because you are redirecting different URLs.

Keeping the utc parameters on the URL after the redirect is important for Google Analytics. It will only be able to use them for tracking if they are on the final landing URL that is visible in the browser's URL bar.

Your solution of using permanent redirects that preserve utc parameters is a perfect way to handle it.

1
  • And don't forget to add a canonical tag to your pages
    – Martijn
    Jul 2, 2015 at 13:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.