Unwanted URL repeating/appended in Google Analytics - wordpress

I seem to have a problem with my Google Analytics.
My pages are being shown as 404 errors as the full URL address is being repeated after the foldername.
Example:
My page for cars is:
/cars/
But Google Analytics is showing this page as
/cars/www.domain.com
There are no filters set that I can see but I don't know how to resolve it.
Is this common? It is a Wordpress site.

You have a link somewhere that starts with www.example.com, but should start with http://www.example.com (or https://www.example.com).
URLs that don't start with a protocol (http://, https:// or just :// to mean "the same protocol this document was requested with") or a / are interpreted to be relative to the current document, e.g. if you are on http://www.example.org/cars/ and you link to "mercedes/", it yields http://www.example.org/cars/mercedes/. This is what happens for you, because you have an incomplete URL somewhere. Look at your document source in your browser and search for www.example.com. You will most likely find something like href="www.example.com". Find the link in your post / template that is responsible, and change it to href="http://www.example.com" or href="https://www.example.com", depending on what that host supports.

In some cases, you might find that Google Analytics is adding your domain name after every URL slug captured and it can make for some messy reporting.
For example, our homepage would return
/nichemarket.co.za
and the blog page would return
/blog/nichemarket.co.za
If your site analytics account returns a similar issue, this is not standard practice and is generally due to a misconfiguration of the view filter.
To fix this issue head over to your Google Analytics account and click the Admin tab in the right-hand menu.
Navigate to view
Select view settings
Scroll down to default page
Remove your domain name from the text box and leave it blank
Click save

Related

How search engine modify the page's url in browser's location bar to the real address

I'm writing a simple reverse proxy program with flask. After a suitable setting, when someone visit a site such as aa.com, he gets the content of bb.com in fact without awareness. But when I want to proxy for search engine like google, I have little trouble.
I use anonymous.com as a agent of google.com, when someone visit anonymous.com, he get response from google actually. When I search some keywords such as 'demo', anonymous.com shows visitor just the result looks like real google's search result, except the links contains google.com are converted to anonymous.com. That's say all the result page's url such as
http://google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjpgP2Q3JrOAhWCjJQKHSMwAgEQFgghMAE&url=http%3A%2F%2Fwww.demo.com%2F&usg=AFQjCNEhAvTJreNJk_ukM_GYaLJwgHKHDw&sig2=Cll-LhXvW58WfthywPoH7A
will turns to a new link:
http://anonymous.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjpgP2Q3JrOAhWCjJQKHSMwAgEQFgghMAE&url=http%3A%2F%2Fwww.demo.com%2F&usg=AFQjCNEhAvTJreNJk_ukM_GYaLJwgHKHDw&sig2=Cll-LhXvW58WfthywPoH7A
Then when I click the new link, it open a new tab as well but the url address in the page's bar does not change to http://www.demo.com/ehome/index.php?eventid=29414& as the real google link do. Why not?
Futher more:
What makes the url address changed when I visit a link such as google's search's result.
I notice the real page's address appear in the result link in google.com, but in baidu.com, the link looks like https://www.baidu.com/link?url=YvUsjKkfDWJgNAdKyIiWWwdYN1f7HKId8Jzw1LYtTTVpSjOVDzLcVcZ48nMjEqwpvvMtCZfXwmHRJoqZLOCFNq&wd=&eqid=c9a2689600068b8f00000006579c6198, why does not this search engine just use the real url?
The JavaScript code along with the page received checks the url's domain name and redirects the site to the original google.com.

Google Page Analytics Showing "/" instead of correct link

Our Google Page Analytics is showing "/" as the destination URL for many links when in fact those links do not link to "/" Why is that? We want to see the correct stats but these links are all registering as a link to the home page and not the page that it actually links to. Any thoughts?
Google Analytics will break your address 'mysite.com/thispage' into two elements; the hostname 'www.mysite.com' and the page identifier '/thispage'. If you're seeing '/' as a page identifier, the page was actually 'hostname/'. You can see this if you add 'hostname' as a secondary dimension to any report.
You should also check the implementation of analytics on your website; when you click on links, do they actually change the URL? Do they trigger a Page Load?

Google Analytics page url displayed wrong

In one of my client's sites in Google Analytics, under Site Content > All Pages, all the page urls are showing incorrectly, with the domain name placed after the page url.
Normally the homepage is displayed as /
in this case the homepage is displayed as:
/www.domain.com
and all other pages are the same, such as:
/shopping-cart/www.domain.com
does anyone know how to fix this?
Thanks
It sounds like a Filter was created to show the full domain name, but the variables for Hostname, $A1, and Request URI, $B1, got switched around.
Here is a screenshot of the filter I use with the variables underlined.
I also ran into this issue and saw that I had the Default URL setting set to our domain:
screencapture of default url field
This field is under View Settings. We had entered the domain in this field and it was appending it to pages because this field is intended for "index.html" paths.

Escape a Shebang /#!/ in URL for Google URL Builder

Does anyone know if/how I can escape the shebang or encode the uri to make a link work properly in google analytics url builder? I want to add campaign parameters to product page urls to track ads success. The url for each individual product page looks like this:
http://www.oursite.com/classic-movies/#!/Title-of-Movie/p/12345678
When I put the product page url into the url builder, it says the url is invalid. I think it is because of the #!. I have tried escaping out the special characters, replacing the shebang with %23%21 or %21!
It appears valid in the url builder, and the builder generates a link with utm tags, BUT when you paste the tagged link into the browser, it does not take you to our product page. It takes you to our website, but gives a "sorry does not exist" message.
I also tried this:
http://www.oursite.com/classic-movies/?_escaped_fragment_=/Title-of-Movie/p/12345678
It generates a link in the builder and does link to the product page of our website (yay!), but the url adds this after the campaign name: #!/Title-of-Movie/p/1234567
The shebang is back! Will that be a problem?
For reference, we're using the Ecwid storefront plugin for a wordpress site.
Thanks in advance.
Short answer
You should use the URL without fragment (hash part) as a base for building URLs with queries (the part starting with '?') and then append the hash part to the end of URL.
Example:
1) Take http://www.example.com/classic-movies/#!/Title-of-Movie/p/12345678
2) Remove hash part: http://www.example.com/classic-movies/
3) Use this hash-free URL as a base and add query parameters yourself or use any automatic builder. Example: http://www.example.com/classic-movies/?utm_source=myblog&utm_campaign=xyz&abc=def
4) Append the hash part to the end of the URL: http://www.example.com/classic-movies/?utm_source=myblog&utm_campaign=xyz&abc=def#!/Title-of-Movie/p/12345678
You're done – the final URL is valid URL which will work fine for browser/customer, your site server and tracking tools like Google Analytics
Long answer
1) URLs could be very different, but their structure is actually quite the same and that's a part of the web standards.
URL is built this way:
protocol://site/path?query#fragment
(I simplified it and take in consideration only the parts we're talking about, the actual scheme is a bit more complicated)
Taking your product page URL, that will be:
protocol: http
site: www.example.com
path: classic-movies/
query: (empty)
fragment: !/Title-of-Movie/p/12345678
Now, if you want to add query parameters, you know where to insert them. As to the fragment part, it should be always in the end, regardless of whether it contains !
2) Google Analytics doesn't track the fragment parts of the URLs.
Urls like http://www.example.com/coolpage and http://www.example.com/coolpage#!anyparameter=anyvalue are the same for Goolgle Analytics. That's likely the reason why their URL builder tool doesn't accept that.
By the way, Ecwid uses fragment part of the URL all the time to address the product and category pages, but that's not an issue if you want to track your product pages in Google Analytics. Ecwid solved that problem by sending special 'virtual' page views to Google Analytics every time a customer browses your store. So in your GA reports you will see your store pages.
3) If you use Google Adwords for your ad campaigns, I'd suggest linking your Google Analytics and Google Adwords profiles to have better picture of customer behavior and the campaign performance. Check out this thread on Ecwid forums for the details:
http://www.ecwid.com/forums/showthread.php?t=10835

After deleting a web page it still shows in the search engines, why?

I am new to this but I was asked to help out at work with modifications of our web site, one of the first things I was asked to do was remove the page for a product we no longer stock. I removed the page and links so when you are on the site you do not have the option to even see the product.
So before changes where made you would navigate to "http://example.com" when pressing on lighting you would navigate to "http://example.com/lightbulb" showing the inventory.
Now with the changes in place there is no way to navigate to the product because it was removed when I type "http://example.com/lightbulb" in my url I get 404 page can not be found which is the desired behavior.
But when performing a Google search on "light bulb", Google is listing http://example.com/lightbulb as a an available domain with the same summary as before. Obviously when navigating to it, you get the 404 error, page can not be found,
What did I forget to do, so that search engines no longer list http://example.com/lightbulb with the summary?
Google robots does not crawl the website everyday but after a certain interval.
I would suggest you to create an account on Google Webmaster tools and check your website's indexing status.
Moreover using the tool, you can also make a request to Google to re-index your website.
Hope it helps you some extent.
It takes time for the search engines to update. In the meantime, you can add a "HTTP-301 Permanently Moved" redirect-script in the /lightbulb directory, by creating an 'index.php'-file and adding this code:
header('Location: http://example.com/', true, 301);
exit;
It will tell browsers and search engines that the new URL for your page is http://example.com/

Resources