How to fix blog post collecting in Google Analytics - google-analytics

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.

Related

Google Analytics - Some weird URLs are being registered in behavior reports

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.

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

Google Analytics Real-time overview shows a page that doesn't exist

I don't understand this. How can this happen?
I have an educational site and when I looked at Google Analytics I saw a porn page in active page which doesn't exist on my site.
What is this and how can I stop this from happening?
I checked for that page on my website and there is no such page.
This is not actually a hit for a Page on your website, it is rather a Referral (i.e. the source from which a user was supposedly coming from before landing on your site): https://support.google.com/analytics/answer/2795830?hl=en
It is actually spam generated by bots and crawlers, and you can follow the steps listed in this article to mitigate this issue: http://moz.com/blog/how-to-stop-spam-bots-from-ruining-your-analytics-referral-data
For the most common sources of Referral Spam, you might want to add an Exclude Filter to simply ignore those hits:
To filter out a referring source from your reports, create the following filter:
Filter Type: Custom Filter > Exclude
Filter Field: Campaign Source
Filter Pattern: Enter the domain of the referring source that you would like to exclude, for example, google.com. You can use regular expressions if you would like to exclude several referring sources.
If you are wondering about the "Active Page" view listing a spammy-looking URL, it is because that page most likely is a 404 page your website serves in response to the request.
Note that the URL also begins with a slash delimiter ("/"), as in yourwebsite.com/www.spammy-site.com -- this will show up in Analytics as /www.spammy-site.com, as in the examples above.
This is Ghost Referrer Spam, and it shows as both pages and/or referrals(you can see it in the screenshot bellow). This "visits" never reach your website actually. The only thing you should worry about is your data since it affects your statistics by adding useless data to your Google Analytics.
The only way to stop them for now is by filtering them in Google Analytics as #Philippe mention you can add a single filter or you can use a more general approach with a filter based on Valid Hostnames that will stop this and most of the Referrer Spam.
Basically, this works by excluding all hits that don't have any of your valid hostnames since the spammers don't know who are they targeting they use a fake or empty hostname as you can see in the screenshots
Here is more information about this solution and others https://stackoverflow.com/a/28354319/3197362
1 In Google Analytics, go to the Admin tab.
2 Go to View Column and select Filters.
3 Click on New Filter.
4 Put Spam Porn Referrals as a name for the Filter.
5 Filter Type select Custom. Filter Field, find and select Campaign
Source. In the Filter Pattern text box, copy and paste this Regular
Expression.
depositfiles-porn.ga|youporn-forum.ga|pornhub-forum.ga|generalporn.org|rapidgator-porn.ga|meendo-free-traffic.ga|amanda-porn.ga|torture.ml|pornhub-forum.uni.me
6 Click Save.
You can check this link also. I have seen the same problem and now i am done with this.
Stop Spam or adult site referrals in google analytics

Duplicate domain tracking on Google Analytics issue

We've accidentally placed the same Google Analytics tracking code on two different domains.
www.y.com
www.x.com
We've rectified the issue now but retrospectively, is there any way to filter that data going to the specific domain name www.x.com for example?
Note: this is not a duplicate of Google Analytics: Track two domains as one
You could add a filter to the view (profile) in question. That will remove the data that you don't want. Another option if you don't want to loose the data in the view would be to create a custom segment that you could use when ever you want to split the data out.
Update from Google+
You can search with regex
^/app/
in the small search bar (custom segment) in your page reports (e.g. Behavior -> Site Content -> All Pages), after which you can look at the aggregate metrics for all pages which start with /app/ (i.e. all the pages with different parameters).
If all the /app/.* have the same page title, you can look at the Behavior > Overview report, but choose Page Title as the dimension.

Multiple links pointing to the same location. Track which one was clicked using Google Analytics

I'm trying to get Google Analytics to track the specific link in the page that was used by the users to get to a specific location.
Say I have links poing to the contact page from the main menu, the page's contents and the footer.
Looking at what other websites are doing, I've added references inside GET parameters for each of the links like so: http://www.example.com/contact?ref=menu , http://www.example.com/contact?ref=content and http://www.example.com/contact?ref=footer . I've also added the ref parameter to the ignore list inside Google Analytics so the three URLs are not tracked as separate pages.
My question now is: How sould I go about tracking which one was used to get to the contact page?
Although the post is a bit old, for others like me finding this via search, here is the solution. Enhanced Link Attribution in Google Analytics.
http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867
Sounds like you are already tracking them with the URL param.
If Google Analytics is successfully tracking them as separate pageviews with the ref= URL param, then you could create a custom report in GA that shows the number of pageviews. The custom report can be added to your dashboard for quick reference.
The custom report can be set up like this:
Metric groups: pageviews
Dimension drilldowns: page
Filters: include -> Page -> regex -> /contact\?ref=(content|menu|footer)
Or, for each click, add the following to each link:
Contact
Contact
Repeat for each link. This is no more work than adding a ref= to each link.

Resources