How to get full url of referring links - google-analytics

Assume there a page containing a link to my site and the url for this referring page was this:
http://source.com/referral_path/topic.php?t=123
In google analytics it would display as this:
ga:source: source.com
ga:referral_path: /referral_path/topic.php
I recall long ago there was a switch/setting which would control whether the t=123 (i.e. query parameters) would be included as part of the referral_path or not. Is this correct? And if it is how do I control it.

The only setting GA has for query parameters is the search query params. Setting Up Site Search for a Profile
For the full URL you still should apply a filter.
View Full Page URL In Reports
Also see: Full referrer URL in Google Analytics reports

Related

Unwanted URL repeating/appended in Google Analytics

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

Google CSE(Custom Search Engine) how set query to GA(Google Analytics)

I use google cse as my site search.
Google support page: support.google.com/analytics/answer/1012264
Take this example: www.google.com?hl=en&q=xxx. So the Query Parameter is q. And my site is with google cse, the query action will direct to url like this: https://cse.google.com/cse?cx=xxx&q=xxx...#gsc.tab=0&gsc.q=%23C&gsc.page=1
My Google Analytics report cannot get query words from this case.
Google Analytics can get the word only on directly enter the url like this http://site?q=xxx.
But I use google cse instead of myself site's search.
How can I set the correct settings ?
Thanks!
I have been having a similar problem and I think you must be using:
<gcse:searchbox-only> and <gcse:searchresults-only>
If you are then you have to customise the javascript code segment with the resultsURL element.
resultsUrl URL The URL of the results page. (Default is the Google-hosted page.)
From Custom Search Element Control API.
<gcse:searchbox-only resultsUrl="http://www.yourWeb.com"></gcse:searchbox-only>

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

DoubleClick Floodlight Tags: Expected URL match required?

In setting up Floodlight tags for a site that is already running a content experiments through Google Analytics, do I need to establish a separate Floodlight Activity for each variation page URL?
There are a few different pages (landing-a, landing-b), each with 1-3 test URLs (-1, -2) leading to a separate thank-you sub page. My thought is to create a single floodlight activity for each group of pages and apply it to all of the thank you pages via Google Tag Manger.
Example:
/landing-a-1 control URL
/landing-a-2 test URL
/landing-a-1/thanks - conversion page for control URL
/landing-a-2/thanks - conversion page for test URL
/landing-b-1 control URL
/landing-b-2 test URL
/landing-b-1/thanks - conversion page for control URL
/landing-b-2/thanks - conversion page for test URL
My concern is the "Expected URL" field. According to the Implementation guide checklist this field should be the page where the tag will be placed, but it isn't clear what happens when the tag is placed on a page with a similar URL. Example: Expected URL set as /landing-a-1/thanks, but same tag placed on landing-a-2/thanks.
I can't find a definite answer from Google (I have the same question) but did find a marketing company claiming it doesn't matter.
I'm running on that hypothesis – if I discover differently I'll update here.

managing redirection with google analytics

I have a site that contains the file
redirect.php?id=123
It redirects folks to another site using an id it pulls from the database.
I'd like to track the page on Google Analytics, see where users are coming from, and what popular sites they're going to.. etc.
I currently set up the page so that it pulls (with PHP) the link from the database, and outputs the ga.js stuff and a javascript redirect.
The issue is that I'm getting the data on my analytics dashboard as if every id is a different page..
What is a better way to do this?
If you want to check for pages of the type redirect.php?id=x then the page Carlos links to is how you would do it.
You would want to exclude the id parameter from your search. Then Analytics would combine all the redirect.php?id=1 redirect.php?id=2 redirect.php?id=3 pages as just a single page named redirect.php
How do I exclude query parameters from my reports?

Resources