Merging Uservoice and Google Analytics CSS into application.js - ruby-on-rails-3.1

Both user voice and google analytics give some small javascript code which internally loads another BIGGER js file from their server during page load. I am looking to reduce the HTTP requests. Can I download these files and let RAils assets precompile merge them into one? Or you think this will cause issues?

You can't do it. Both Uservoice and Analytics need to do AJAX requests to the corresponding site.
According to the AJAX cross-domain request policy, they have to be on the same domain as the page they're calling. If you'd pack them into your javascript they would break.

Related

Using Google Analytics with a Third-Party Checkout (Magento)

We currently have a Drupal site that is content-focused and are using Google Analytics for metrics. We are partnered with a company that has a Magento site and cart and will be using them for eCommerce. How do I successfully add our GA tracking code to their domain and cart pages to ensure I am tracking conversions from acquisition to checkout success (or dropout)?
Is it just the simple cross-domain code outlined in the Google knowledgebase?
Thanks in advance
Yep, should be as simple as cross-domain tracking. Your best bet would be to setup a staging/dev environment to test things out and then push to production.
You can use tools to monitor the http requests getting sent to the server to make sure your tracking is working.
For Firefox, I use HTTPFox and for Chrome it's Google's homegrown Google Analytics Debugger.
Best of luck!

Google Not Indexing AJAX URLs

I have submitted a sitemap for my AJAX web application to Google via their Webmaster Tools. The submitted URLs are of the form:
http://www.mysite.com/#!myscreen;id=object-id
http://www.mysite.com/#!myotherscreen;id=another-id
However, even though more than a week has passed since sitemap submission, Google has not indexed the URLs. Google states that the sitemap has been processed, states that 60 URLs have been detected, states that no errors occurred, but does not index any of the URLs.
I have already implemented the AJAX crawlability contract on the server side, where requests containing an _escaped_fragment_ are responded to with a snapshot.
Any help/info regarding why Google is not indexing the URLs would be greatly appreciated.
See GWT SE friendly application
Suggestions include following the guide at http://code.google.com/web/ajaxcrawling/.
Nowadays, you don't need to do something specific for Google anymore, and AJAX crawling scheme has been deprecated been Google.
Just make sure that your website is easy to use for your users, and Google will be able to properly crawl it.
If you want to go the extra mile, however, you can check that article:
* https://moz.com/blog/optimizing-angularjs-single-page-applications-googlebot-crawlers

Do redirects prevent page tracking in Google Analytics?

I have an mvc3 app that uses a lot of redirects so the URL path is not displayed to the user. When they go through the app they don't see any changes in the url.
Will google analytics still track the separate pages?
Google Analytics tracking is javascript and it needs to run on the page in the browser in the traditional set up provided by GA documentation.
If the redirect does not include the GA js or leaves the page so fast that the GA js can not run, then no, it will not track the separate pages. Assuming, of course, this is a traditional redirect.
Redirects usually display in the browser unless there is URL rewriting going on.
You can install the GA debugger and Chrome and run the page to see if a tracking beacon is sent.

Content-based advertising for a fully ajax application

I've built a php/js application that relies completely on AJAX so none of the content is static.
I'm trying to find a way to ad content-based advertising that uses the AJAX delivered content as keywords.
Google's Adsense doesn't really support AJAX and
I'm having a really difficult time finding another provider.
Thanks.
making some assumptions here. 1.) you're using JSON.
send to the adwords a link to a "statically" rendered slim page of your to-be-updated content, let Google match that content with the ad, capute the ad, and return both the content and the ad via JSON to your page and insert them in the DOM accordingly?

Does a website link (href) validation service exist?

I am looking for a web service kind of like Google Analytics.
Paste some javascript into your web page and if any of the links there become invalid, hey presto, an email is sent to someone telling them which link, which page etc etc has the incorrect link.
Anyone heard of such a service?
This would slow the page loading down a lot if it had to check for broken links every time someone visited it (basically a http request for every link). Not that it isn't possible, but the implementation would have to be very very good.
Javascript cannot send emails, you would have to use ajax to post the details to another page that would then email the admin. As this is all client side, it is very open to abuse.
I would suggest using a program to do it every now and again. There are even Firefox extensions to do it rather than a program. Google will also list a whole host of websites offering the service.

Resources