OK, so I've set up a website where the content is split into modals that are hidden. There are links on the page that when clicked on, the relevant modal appears. I want to be able to track the links being clicked on so I can see what content is being viewed by users. Ideally I want the data to appear as fake pageviews. I know this used to be possible but not sure how to do it nowadays.
I can't seem to find any decent up to date documentation online for how to do this. Can anyone shed some light?
Once you have the Analytics initialized for asynchrounous, just call
_gaq.push(['_trackPageview', 'FAKE_URL']);
This should work and will not slow down your page load. You might want to consider using "events" rather than fake page views; it's also quite simple
_gaq.push(['_trackEvent', "EVENT NAME", "PARAMETER"]);
See Google's Documentation for more info.
Related
I'm new to Ruby on Rails so please bear with me.
I'm creating a web app for users to trade cards and would like to include in the user's home page a notification section that shows relevant alerts for the user based on possible trade matches and other things like new messages. The functionality would require alerts to be generated based on certain triggers (userB accepts trade, trade is proposed to userA, userB messages userA, and possibly even incorporate sponsored posts). This will basically function like the "notification center" on iOS.
I've made a quick mockup: http://i.imgur.com/hQ3Fc.jpg (or if that's too big --> http://imgur.com/hQ3Fc) -- wouldn't let me embed image because I'm new :(
So the idea is the view will probably have 5-15 alerts at any given time (give or take) and can scroll through them using those left/right arrows. The alerts will be a basic message with a link to the relevant page, or for something like a trade rating have the message "open" to fill the viewer and show the necessary functionality.
Hopefully I explained this okay. Anyone know anything out there that might make building this easier? Please let me know if there is any info I missed in asking this?
Not sure I get exactly what your wanting to do but if I understand correctly this may help. I have used swipe.js it is easy to use, should get you started on a swipeable/scrollable interface.
I would like to monitor users' page visits and clicks in my Rails app to make recommendations. My questions are:
Is there a Rails gem for this, or Google Analytics is the standard? If latter is true, then how should I link a page visit to a particular user profile?
It is typical in Rails to have a section in application.html.erb, which is shared for all pages. If I add Google Analytics pageview tracking code to in application.html.erb, will it be able to track all individual pages?
There are other ways, but the vast majority probably use Google Analytics. Several gems exist that help you integrate with GA to get at the data. See here: https://www.ruby-toolbox.com/categories/Web_Analytics.
Based on your first question, it seems you may want more insight than GA can provide. I've used ClickTale (http://www.clicktale.com) and Woopra (http://www.woopra.com) before, to good effect. This article lists several other alternatives, too - notice the high marks for Clicky: http://imimpact.com/web-stats-alternatives-to-google-analytics/.
Google Analytics (and almost all of these others) will take care of your second question automatically whenever the user loads a new page, since it keyed by URL. That means that, although you put the GA script code in a single place, each unique page is tracked individually.
If you have AJAX requests that change that page without changing the URL, you'll need to dig in to the GA script API. Essentially you'll need to push a new url (possibly with a # in it) whenever you want to track an AJAX-driven link/button click. See here: http://davidwalsh.name/ajax-analytics
I am biased, but I would recommend checking out impressionist, if you need to integrate the page views into the app in real-time. With analytics you will always have some lag time and you are also relying on an external dependency. Impressionist is good if you need this kind of control, but if you are just looking for simple metrics and don't need to pull them into the app, then analytics is probably the way to go.
Check out Ahoy, at https://github.com/ankane/ahoy. With just a few lines of code in your app, you can track page views and tie them to user accounts.
You can further customize Ahoy to track custom events, both the client (with JavaScript) and server.
Ahoy does not depend on any third-party services.
Some time in the last year, a tool that I use no longer displays Google search results in one of its frames. I suspect that Google started using JavaScript code to hide itself, if it is being displayed in a frame, which is understandable for most uses.
However, this is a tool that only I use, so I'm not misrepresenting to anyone. I use this tool to research data. One frame has a form where I enter data that I find online. The other frame has the Google results and the pages they link to. I can see both the data form that I'm working on and the changing search/results side-by-side in one window.
I tried going to an older browser version, but I think they are using JavaScript.
Now I have to right-mouse click "open in a new tab" and then click to the new tab, and then close it, a lot of extra overhead when I'm trying to process this repetitive research over and over.
Any ideas? Confirmations as to what has changed? I suppose I could retrieve the page in PHP, strip out the part that hides the page and then put the page source in the other frame. A bit of a challenge for me.
If you search for "richfaces" in google.com, the first result will be about www.jboss.org/richfaces. You may watch there that links (menus) like "Downloads", "Demos", "Documentations" are also displayed. How to have these links displayed in the search results?
(The "description" meta tag not enough I hope)
You are not able to make Google show links to your site (they will do this if they deem your site is relevant enough to warrant providing this feature). However, you can remove these links if they are present, if they are inappropriate.
See http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=47334 for more details.
These are called Google Site Links. Google is pretty tight-lipped about how this feature is automated, but there are a handful of HTML5 tags which are supposed to help make search engines smarter. You can read more about them at O'Reilly's Dive Into HTML5 website. Especially interesting are the "Google Rich Snippets", though they're not exactly what you're looking for.
It might help to put those links in the HTML5 nav tags, like
<nav>Home About FAQ</nav>
and I've heard it tossed around that the site navigation should be an unordered list, but I don't know how true that is. Still, it couldn't hurt to do it that way and style the list with CSS.
does anybody know, where I can find the Google Calendars Event-GUI?
I'm building an social networking site, which relies on google calendar.
For adding and changing events, I want to use googles GUI (i dont want to code this myself if there is a partial/control already existing).
Does anybody know where I can find this?
Checkout http://code.google.com/apis/calendar/ it's the full API documentation from Google. If what you want to do is supported, it's almost certainly written about here somewhere.
If you take a look at the docs page, there is a "Calendar Tools" section on the left hand side bar that has the tools available, including gadgets and an embeddable calendar.
If you want to code something yourself you'll probably want to look at retrieving events, updating events and creating events.
This article may also be helpful to you. http://www.google.com/googlecalendar/event_publisher_guide.html#site
Although that is to embed just your calendar.