Google Analytics by Yoast
[Plugin: Google Analytics for WordPress] Google analytics breaks tabs (named anchors) (4 posts)

  1. intrinicity
    Posted 4 years ago #

    Before installation, this works

    <ul class="alt-tabs">

  2. Houses
  3. Units
  4. Land
  5. Townhouses
  6. Supplying the #Units after the URL, takes you to that tab.

    After installation, GA changes the href to

    <ul class="alt-tabs">

  7. Houses
  8. Units
  9. Land
  10. Townhouses
  11. Search
  12. And the named anchor (tab) no longer is selected.

    I can understand the need for the plugin to do this to unqualified hrefs - I am just wondering whether there is a way to selectively avoid it



  • intrinicity
    Posted 4 years ago #

    Sorry, that was ...

    <ul class="alt-tabs">
    <li><a href="#Houses">Houses</a></li>
    <li><a href="#Units">Units</a></li>
    <li><a href="#Land">Land</a></li><li>
    <a href="#Townhouses">Townhouses</a></li>
    <li><a href="#Search">Search</a></li>


    <ul class="alt-tabs">
    <li><a href="http://mydomain.com.au/for-sale#Houses" >Houses</a></li>
    <li><a href="http://mydomain.com.au/for-sale#Units" >Units</a></li>
    <li><a href="http://mydomain.com.au/for-sale#Land" >Land</a></li>
    <li><a href="http://mydomain.com.au/for-sale#Townhouses" >Townhouses</a></li>
    <li><a href="http://mydomain.com.au/for-sale#Search" >Search</a></li>
  • BullElephant
    Posted 3 years ago #

    Hey Dave,
    Did you ever find a solution?

    I am having the same issue with Google Analytics adding the site url to #links.

  • intrinicity
    Posted 3 years ago #

    Yeah ... I ditched Google Analytics (I got no feed back from anyone and I put it out there in a number of places ...) and just used one of the actions (wp_init, I think), to put my own in the header. Works the same and a lot less code (and one less plugin).


  • Topic Closed

    This topic has been closed to new replies.

    About this Plugin

    About this Topic