Skip to main content
higgsyd
Inspiring
May 15, 2021
Answered

two web pages almost identical, only one shows up in google analytics

  • May 15, 2021
  • 3 replies
  • 586 views

if you go to my website and click Higgs in the top navigation, you will see there are two links to Higgs Sam. One is a .php version and the other is HTML

 

Why does the PHP version show up in Google/ Analytics at Real-time/Overview (screenshot below) but the HTML version does not?  The Analytics code in the pages is identical and HTML suffix is the only difference between the pages (although the PHP version does have some Include statements)

 

    This topic has been closed for replies.
    Correct answer Ben M

    As stated before, this really isn't a DW specific question, but on the PHP page there are 2 GA accounts in use and on the HTML page there is only one.  What I am suspecting is that the account you are looking at is the account that is the extra one on the PHP page and doesn't exist on the HTML version, thus you don't see those visits.

     

    Personally speaking on your site, your first issue is that you don't have an SSL certificate so I would recommend looking into solving that first otherwise Google will penalize your site and SEO/traffic becomes irrelevant.  Second, I would recommend either setting your scripts as an include or firing them from a Tag Manager (ie: Google Tag Manager) so you don't have analytics code manually inserted on each page. These types of issues can usually be avoided by keeping them in a central location and including as opposed to adding to page because if there are updates as in this case you would have to go through all pages to update.

    3 replies

    Ben MCommunity ExpertCorrect answer
    Community Expert
    May 15, 2021

    As stated before, this really isn't a DW specific question, but on the PHP page there are 2 GA accounts in use and on the HTML page there is only one.  What I am suspecting is that the account you are looking at is the account that is the extra one on the PHP page and doesn't exist on the HTML version, thus you don't see those visits.

     

    Personally speaking on your site, your first issue is that you don't have an SSL certificate so I would recommend looking into solving that first otherwise Google will penalize your site and SEO/traffic becomes irrelevant.  Second, I would recommend either setting your scripts as an include or firing them from a Tag Manager (ie: Google Tag Manager) so you don't have analytics code manually inserted on each page. These types of issues can usually be avoided by keeping them in a central location and including as opposed to adding to page because if there are updates as in this case you would have to go through all pages to update.

    higgsyd
    higgsydAuthor
    Inspiring
    May 15, 2021

    Thanks for your response people, very good of you to assist. 

     

    Birnou: it’s a little unclear what you mean but I suspect you are saying I need to remove all the php tags from the HTML version, which I have now done

     

    Ben P: Thanks for the point re identical pages, I’ll store that nugget away for the future,(these two  pages have different names so am I right in thinking in this case the URL’s are different)?

    Yes I certainly accept what you say about this is nothing to do with DW, but you are all so knowledgeable I thought it worth a try

     

    Ben M:  would you be kind enough to show me where in my code it shows two GA accounts please?  Re https: I have a certificate on my other website but It seems my host IONOS only allows it to be on one site, hence this site still http, does that sound right?

     

    I will go and investigate tag Manager immediately!

    Nancy OShea
    Community Expert
    Community Expert
    May 15, 2021

    DUPLICATE CONTENT:

    Google penalizes sites for duplicate content.  Choose either the HTML page or the PHP on your server, not both.  Google search should resolve to the remaining URL in a month or so after Google re-crawls & re-indexes the site.

     

    HTTPS:

    When you have multiple domains to cover on the same server (www.domain, domain, subdomain...), you need a multi-domain SSL certificate to cover them all.  I get mine from Namecheap.com. 

    https://www.namecheap.com/security/ssl-certificates/multi-domain/

     

    Nancy O'Shea— Product User & Community Expert
    BenPleysier
    Community Expert
    Community Expert
    May 15, 2021

    When 2 pages are identical, even on different URL's. Google will list just one if you are lucky. In a lot of cases, Google will ignore both pages.

     

    Having said that, this has very little to do with Dreamweaver.

     

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    B i r n o u
    Legend
    May 15, 2021

    have you see that your HTML page contains PHP tags...?