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
Related
We have a blog..
Earlier the article URLs were as follows:
sitename.com/blog/article-name.aspx
and were automatically grouped by Google Analytics (Behavior - Site content- Content drilldown). Each URL had a /blog/ part, so the grouping was perfect.
Now all the blog article URLs are sitename.com/article-name
So they are not grouped in "Content drilldown (/blog/ was removed from the URL structure). We can't put it back.
Also URL parameters (fbclid and some other) make doubles of blog pages.
In Nov-Dec we updated the CMS, now we don't have any .aspx in URLs
But some of the articles were published earlier, so we changed the URLs from "/article.aspx” to “/article”
What we need:
Well-done report (similar to Content drilldown) containing all the blog articles. Not just URLs, but page names (from page title).
All new articles should be automatically added to this report.
URL parameters should be ignored.
Make it like Article stats = older article stats (/article.aspx) + new article stats (/article)
How can we make this?
Are you able to identify an article as opposed to a none article from a dev point of view?
Pass a custom dimension with the hit for articles, then use that custom dimension to create the report.
Ask the developers to add in a dataLayer variable on the pageview, or a local js variable you can use to identify a pageview type as "blog" or "whatever" and send that with the analytics hit.
Content group i guess will be the easiest and best option in your case: https://support.google.com/analytics/answer/2853546?hl=en Check: "Create a Content Group via the tracking code" section on this page (developer help will be needed).
Of course as ASomN said: sending additional custom dimension (with pageview hit) will be nice addon.
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
We made a google analytics account for one of our clients as part of the requirements.
Under Reporting tab, we have sections like Behavior -> Site Content -> All pages. In All Pages section we are able to see a table which contains all the urls which are viewed with respective pageviews , unique pageviews and other dimensions.
A normal page view looks like:"/pwsportal/faces/homePageNav/mktplan_adf.Ctrl_9_afrLoop_1234423".
Some how there are some weird page urls like :
I tried using Exclude Filters and couldn't eliminate these kind of urls.
From one on the blog i got to know that if any url contains any script tags it is a part of hacking technique called cross site scripting.
Finally i am here to find a solution to eliminate the these kind of existing urls and to prevent them from getting registered in future into google analytics.
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.
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