Skip to main content

Hi community,


Beginning August 18, all of my Unbounce landing pages started appearing in Google Analytics with /a appended to them. For example, /landing-page becomes /landing-page/a. I changed nothing in my GA configuration nor anything in Unbounce, either globally or to individual pages, during this time. This is specific to my Unbounce pages - it’s not happening on my corporate site.


All of my landing pages appear to be functioning properly. I’ve tested and confirmed that users are on /landing-page and I’m seeing the visit as /landing-page/a - i.e. I don’t actually have any visitors to /landing-page/a.


Has anyone encountered a similar issue?

Tried to edit the post and failed – is this related to page variants? I can’t find any documentation on it.


Hi Rob, yes, this is related to page variants. /a is the “A” variant. If you create a “B” variant, it would be appended with /b in analytics. The user won’t see this in the URL when visiting the page. It’s only for tracking purposes on the backend.


Also, as a somewhat related useful little tip… if you ever want to see a variant of a live page, you can just append “/a.html” onto the end of the URL, replacing “a” with whatever the variant is that you want to view.


Thanks Nicholas. Was this separate reporting something you released on 8/18? It caught me completely by surprise.


On a separate note, I had someone go to a test page with multiple variants and saw three pageviews in GA. This doesn’t bode well for my general reporting on traffic:



This person was on the B variant. From what I can tell this doesn’t happen on my pages with only one variant.


Can you please guide me how to remove this /a from the Google analytics.

We are not running any a/b testing even though our pages appearing with and without “/a” . Please find the screenshot for same. We are unable to find the which is the correct traffic report because of this issue.


Same here. I don’t know which numbers are correct. I also have 2 URLS, with one having an /a.

I have no variants running, just a champion page.


Please suggest me also how to remove the /a from the Google Analytics


Hi


Are there any updates to this thread from the Unbounce support team?


Thanks


I still have not found a solution. Unbounce team?


Just now hunting down some rouge google analytic traffic sending people to pages/media files that start with /a


It’s been unsolved for 4 years? That’s not cool. 😑


Let me post a solution if you guys are still looking for one. Incidentally, I do not see variant IDs for my AB tests:


There are 2 ways to accomplish this:



  1. Changing page path at the source: (I wouldnt recommend it though because you lose the variant ID). In this method, you will have to modify your GA script to overwrite the page path. You’ll have to do that before you send a pageview to your tracker. This script works well for me:


    var pagePath = window.location.pathname; 
var pagepathLength = pagePath.length;
var result = pagePath.match(/\/\^\/]+(?=\/$|$)/g);

//checks for only the last char
var matchreg1 = /\/\a-z]$/g;

//check for last char with .html in the end
var matchreg2 = /\/\a-z]\.html$/g;

if (matchreg1.test(result)) {
finalUrl = pagePath.substring(0, pagepathLength-1);
} else if (matchreg2.test(result)) {
finalUrl = pagePath.substring(0, pagepathLength-6);
} else {
finalUrl = pagePath;
}

ga('set', 'page', finalUrl);

After this you can send your pagview hit as normal



  1. Modifying your URLs in GA View. I would recommend this solution because you’ll have your raw URLs as well as the overwritte URLs. I’d suggest that you start with duplicating the view you use. Create a new GA view. We are going to add the Search and Replace filter.

    Filter > Add New Filter > Name the filter > Choose “Custom” in Filter Type. Choose “Search and Replace” > Choose “Request URI” in Filter Field.

    Add this code in the Search String

    (\/ra-z]$)|(\/oa-z]\.html$)

    If you want the URL to end with a trailing slash, add / in the “Replace String”. If not, leave it blank.

    Go ahead and “save”.

    Go to your AB test URL and check in Real Time > Content report if thats the URL you want.




Important



  1. Make sure that you add the filter to your Test View first and test before adding this to your actual reporting view.

  2. It only takes care of any URLs that you see end with /a or /b or /c OR /a.html or /b.html or /c.html

    If you have consciously built such URLs for your website in the past and they are live, be careful of using this solution because this will strip that part from any URL match that it finds.


Hope this helps everybody! 🙂


Reply