Google Analytics & vanity urls? - url

Is there a way to use Google Analytics to track vanity urls that redirect to other site locations?
Like this:
http://www.focusonenergy.com/utilities
Resolves to:
http://www.focusonenergy.com/about/participating-utilities
I'd like to know how many visitors used the vanity link. Filtering the Site Content doesn't give an accurate report.

I believe you can, but you need to decorate your vanity link href with additional meta details if you have control of it, or you'd need to track the URL hit server side before you redirect the user. I believe the Analytics has an API you can call from your server side code.

Related

Hiding parameters (sensitive information) from URL of an MVC 5 application

I am working on Asp.Net MVC 5. When i click a link (placed in another website) I navigate to UserDetails.cshtml page. Basically that 3rd party site is passing the UserName & Password to my site & using that I authorize & display further user info.
It's fine but the Url is looking like this
localhost:8080//Admin/UserDetails/UserName/PWD.
I don't want to show the UserName & Password in URL i.e URL should look something like :
localhost:8080//Admin/UserDetails/
One possible solution could be rewrite the URL in IIS (http://www.hanselman.com/blog/ASPNETMVCAndTheNewIIS7RewriteModule.aspx)
But I believe there is an easier way to handle this by using the routing mechanism of MVC.
Please help me to figure out the same.
EDIT :
As many of you are confused why I am not doing a Form Post here, let me re-frame my question. I have no control over the third party application, so I cant request them to do a form Post to my MVC application. Again the 3rd party application is a Oracle Reporting application (OBI), so doing a POST from that application might not be feasible too...
Let me reverse engineer your requirements from your question:
I want to have an URI that when invoked will give access to a secured section of my website. This URI must be clicked by visitors of a third-party site, whom I give that URI to. I want to hide the credentials from the URI.
You cannot do this, the requirements are conflicting. You cannot hand out URIs that will authenticate anyone who fires a request to that URI.
You could do something with a token (like http://your-site/auth/$token), but then still, anyone with access to that URI can use it to authenticate themselves, or simply put it up on their own website.
If you have data you want to expose to a third-party site, let that site perform an HTTP request (with tokens, usernames, headers or whatever you want to use to authenticate) in the background to your site, and display the response in their site. Then the visitor won't see that traffic, can't share the URI and all will be secure.
No. No. NO. Like seriously, NO. Any sensitive information should be sent via a post body over a secure connection (HTTPS). You can't "hide" information in a GET request, because it's all part of the URI, or the location of a particular resource. If you remove a portion, it's an entirely different location.
UPDATE
I find it extremely hard to believe that any third-party application that needs to authenticate via HTTP and isn't designed by a chimp with a typewriter, wouldn't support a secure method to do so, especially if it's an Oracle application. I'm not familiar with this particular app, but, and no offense meant here, but I would more easily believe that you've missed something in the documentation or simply haven't found the right way to do it yet before I'd believe you have to send clear-text credentials over GET.
Regardless, as I said previously, there's no way to hide information in a GET request. All data in a GET is part of the URL, and therefore is plainly visible in the browser location bar or whatever. Unfortunately, I have no advice for you other than to look closer at the documentation, even reach out to Oracle if you have to. Whether by post or something like OAuth, there almost has to be another way.

CakePHP Routes and Google Webmaster Tools verification

I am working on cakephp project I have URL like :
http://www.example.com/
As CakePHP takes an url like
http://www.exaple.com/controll/function_name
I was going through the web-master tools site verification where I was verifying my site,
Google provides verification file(HTML) which I need to store in root directory.
The problem is that CakePHP does not allow to put .HTML in the URL, so how can verify my site then ?
They also offer a meta tag that you can use for verification. Use that instead.
There is another option that isn't mentioned yet to my surprise, but you can put files you would like to serve "as is" under the app/webroot folder. So if you create app/webroot/google-site-verification-a12bc345.html, you (and more importantly, Google) can access that page through
http://cakeapp.com/google-site-verification-a12bc345.html
In addition to what John said, Google Webmaster tools can be verified via Google Analytics's if you use one.
However for Google Analytic's verification, Google Analytics JavaScript tracking code must be in the <head> (not the <body>) section of your page. Sometimes GA code exist in other JS files or at the bottom of the page, which is problematic.
If you do not have Google Analytic's implemented (and you are not planning to) the simplest solution is what John has said - using meta tag verification.

How to Determine Where Your Visitors Come From Except Referer

I just stumble this adwords click:
http://www.google.com/aclk?sa=L&ai=XXX&sig=XXX&ved=XXX&adurl=http://example.com
It is supposed to redirect to example.com.
However, If you click on that link, it will redirect you to another site which is not http://example.com.
I think there is something fishy on that example.com.
That site can tell where its visitors come from and display different content for different visitors.
I thought it was the Referer, then I disable the referer in my browser but that site still works.
Anyone know why how to Determine Where Your Visitors Come From Except Referer?
Keep in mind that those clicks "bounce" (ie. redirect) through Google before heading to example.com.
Depending on the circumstance, Google can add additional query string values to the landing page URL during the redirect. Meaning that clickthroughs won't actually land on "http://example.com", but instead something like "http://example.com?gclid=1234567".
In particular, the gclid value is appended to the landing page URL as a way for Google to pass data between Google AdWords and Google Analytics.
So example.com could be looking for a gclid value in order to identify traffic arriving from AdWords. This is independent of the referrer.
The Referrer is the only thing that will do this, unless by "That site can tell where its visitors come from" you are talking about Geo-location....
Note: Referrers are not the most reliable thing in the world. They can be spoofed

How to access data from Facebook Insights for domains?

I've read that it is possible to access Facebook Insights programmatically:
The Graph API provides programmatic access to all of this data so you
can integrate Platform data into your own, custom analytics systems.
I have two questions, though:
Is it possible to access data from a domain, using Facebook Insights
for domains?
How to get data from a public URL? I've wrote this small script that returns the number of shares for a given URL without using data from Facebook Insights for domains, but how do I get all possible information from a given URL (e.g. who shared it, who liked it, who commented, etc)? Is this even possible?
To get insights for a domain, get the read_insights permission, then GET
https://graph.facebook.com/insights?domain=example.com&access_token=TOKEN
To get insights for a particular URL on your domain, GET
https://graph.facebook.com/?id=YOUR_URL&access_token=TOKEN
Not all of the data you want is available - for example, you can't get the UIDs of the users who shared and liked your URL, but you can get the count.
If you have the comments plugin embedded on your URL, you can get the UIDs of the users who have commented on your URL as comments in the plugin are always public.

How to Force Bots/Apps to use your URL Shortener

I've used several Twitter apps and they all seem to shorten URLs using the website's own URL shortener instead of bit.ly or tinyurl.com or something. For instance, Amazon's is amzn.to. Is it that these apps are really keeping up with the most popular sites (Amazon, Dell, ESPN, Microsoft, Google, Apple, etc) or is there a metatag, javascript, or something else that I can add to my web application to have it use a custom URL shortener? We have one that we've used forever as our domain name is over 20 characters in length.
Basically, apps that are supporting bit.ly and other URL shorteners can tell who you are and thus shorten the URL appropriately using a custom domain.

Resources