The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Web Design
    4. Analytics year to year comparisons when Url extensions change?

    Analytics year to year comparisons when Url extensions change?

    Web Design
    2 2 206
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Teamzig
      Teamzig last edited by

      We manage a website which we recently changed from Drupal to Word Press. In the change, we dropped a small part of the previous URLs - the end extension - .php For example /attractions-rates.php is now
      /attractions-rates with no .php. We eliminated the .php to make the URL simpler.

      How is it possible (and easiest) to do a year to year comparison as Google sees the pages as different? They didn't for the first 8 days (we could see both) but now the pages with the .php extension shows zeros.

      The content of the page is exactly the same only the .php is different. We know we can manually go back to last year's reports and do side by side but that is time consuming. Hoping there is a filter or process we can use to gen a report? Thanks, Jim

      1 Reply Last reply Reply Quote 0
      • TrentonGreener
        TrentonGreener last edited by

        Hello Jim,

        I understand that comparing these two data sets can be rather frustrating, especially when you're trying to do quick comparisons across multiple data sets.

        Unfortunately, there is no way to retroactively filter this data within the Google Analytics reports. But you can create a filter to handle this issue moving forward. 
        To do this, go to the specific view that you wish to change this data in, select the 'Filters' option and then select 'Create new Filter'. Then after naming it as you please, choose 'Custom' as your Filter Type and then select the 'Search and Replace' radial option. Under the Filter Field drop-down, select 'Request URI' and in your Search String enter '.php$' and leave the Replace String section empty. (This is a regular expression; therefore, the beginning \ escapes the '.' variable & the '$' defines that this should only happen when the string ends in '.php')
        Then at the bottom of the page you should see an option to verify this filter. Do so and ensure the change being made makes your desired effect. Be sure to check that no anomalies are created through this process.

        Now that you have created a filter to handle this issue moving forward, the best way to handle this is to manually export the data and sort the URLs by alphabetical order, unless you are fluent in using the Google Analytics API. Then you could use the API to pull this data into Google Sheets & have it automatically clean up the data, but I would not recommend this solution if you haven't previously used the Analytics API.

        While I know this is not an ideal solution, this should handle the issue moving forward.

        Let me know if you have any further questions!

        Regards,
        Trenton

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        • Does redirecting the existing URLs in the website without reducing our current rankings? The new website runs on the bubble, so it seems there is no provisions to redirect the existing URLs to this platform?
          0
          1
          51

        • Infinite Scroll and URL Changing
          mattdinbrooklyn
          mattdinbrooklyn
          0
          6
          7.3k

        • 301 Redirect ! Joomla Pages, Already ranking. ( just wanted to change the url
          Highland
          Highland
          0
          4
          700

        • Will changing our URL's to MVC friendly URL's have a positive or negative affect on our rankings and link juice?
          SanketPatel
          SanketPatel
          0
          2
          308

        • Changing URL's for a website redesign
          igor.pinchevskiy
          igor.pinchevskiy
          0
          3
          288

        • Site Change / CMS Change
          Aran_Smithson
          Aran_Smithson
          0
          2
          711

        • How do you get rid of the .html and .php extensions at the end of urls?
          RyanKent
          RyanKent
          0
          5
          4.1k

        • Javascript changing URL - Thoughts?
          poolguy
          poolguy
          0
          3
          741

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy