Is it possible to change URL structure and to continue to gather Analytics data to the existing posts?

I am changing my WordPress permalinks from:

/%category%/%post_id%/

to:

Read More
/%postname%/

Is it possible to make Google Analytics to continue gathering the post’s data correspondingly?

Related posts

Leave a Reply

2 comments

  1. Unfortunately, there is no way to have GA remap previous page name values to new page name values, so you will not be able to compare historical data to current data within GA. To do that, you will have to do a query on your wordpress data to make your own lookup table, etc..

    One thing you can do is have GA continue to populate with the old URL…the _trackPageview call takes an optional argument to specify the page name you want reported. You will have to write some server-side code to expose the old value to GA though. Or maybe it might be exposed in a variable already and you just have to pass it to GA.

    Another thing you can do is kind of a hybrid.. let GA start recording the new URL as the page name, but also populate one of GA’s custom variables with the old URL. You would have to expose it like above, but then it will tie the two values together within GA. There would still be some manual work to do in GA to do things like compare historical data to new data but it might be easier for you to go this route.