Any idea on how can I track users bookmarking event? I want to find out how many users are saving a specific page into their bookmarks, and every time this happens I want to call a callback function (i.e. AJAX) to store this data.
For what I know of JS this is not possible: I can initiate a bookmark creation, but this is not what I'm trying to do...
Even a jQuery plugin is ok. Thanks!
It's not possible. Bookmark creation is outside a web page's control.
I wonder, How CodeProject articles are showing the Bookmark Count then?
(See the 'About Article' panel # right side for the Bookmark count)
for example see this one
Related
As I know, Application Insights uses page title as View page name. But my application has simillar page title for all pages. And that is why I always get only one pageview and can`t create propper userflow graph, because AI displays, that user visit only one page all the time.
User flow graph with one pageview
That is why I added this TelemetryInitializer on client side to track pageview by href but I am not shure if it is a right approach.
const telemetryInitializer = envelope => {
envelope.baseData.name = window.location.href;
};
appInsights.addTelemetryInitializer(telemetryInitializer);
Maybe Azure Team has any other way to do it without changing page title?
There are a variety of ways to approach this. Application Insights User Flows starts from a page view, custom event, or exception that you specify. In my example below, I've used custom events. A custom event in JavaScript might look like this:
appInsights.trackEvent({name:"SuccessfulUserLogin"});
(For detailed instructions on how to log custom events, see the documentation on TrackEvent.)
Here I've used the custom event "SuccessfulUserLogin" as the Initial Event in Application Insights to create a User Flows graph:
That in turn allowed me to track the user flow using the custom events that I specified on other pages (tracking the custom event "VisitedUserForum" on the user forum page and "VisitedFeedbackForum" on the feedback forum page even if both pages were named "forums"):
I'm using introjs.
But when a user ends the intro, then refreshes the page, introjs starts up again.
Is there a way to only show a walkthrough once per user?
For example I have it where when a user first signs into my website - introjs will popup. I only want it to pop up for that initial welcome.
Potential Solutions
Maybe there is a way to trigger introjs via the create action like one would with a flash message?
I could replicate all my header, sidebar, and challenges section code into pages/tutorial.html.erb and make a route www.websitename.com/tutorial, but then that would be a lot of code to duplicate and then whenever I change something in the site I would have to change it in tutorial too.
Is there a way to adjust this javascript method in application.js to trigger only once per user $(function () {
introJs().start() })?
I just use data-intro="" for each step of the walkthrough.
You want your application/webpage to remember that the user has already gone through your tutorial.
There are a few ways you can do that. For a start, you can use cookies or localStorage
The gist is that after the user finishes, or otherwise exits your tutorial, you can store a descriptive value to the user's client, by using one of the above methods, and on page load you should first check if this value exists and act accordingly.
EDIT: As mentioned in comments, you will need a server side approach as well.
I have HTML and JavaScript in place that allows a user to move Django database entries (displayed in a table) up and down. However, is there a way that I can store this new order that the user has customized so that it will show up any time the user navigates back to that specific page view? I think get_queryset is what is causing the page (after refreshing) to switch back to the basic filtering. But, I have no good ideas on how to override it or avoid it to accomplish this task. Any help would be much appreciated!
I would suggest using ready solutions: django-admin-sortable or django-admin-sortable2. As for me, I have successfully used second solution and it works. One important note about it is to run ./manage.py reorder my_app.models.MyModel after adding new order field as mentioned here.
To go back to the appropriate tumblr page, we're using:
Back
However, we're getting a lot of traffic directly from the twitter app, and this stops the function working. Is there a way so that if the history.go doesn't work (or takes you outside the site), it will just take you to index.html?
This is one of the pages the history button is on: http://lexican.info/post/49265445109/sesquipedalophobia
Thanks for any help at all.
Sadly I don't think this is possible as there is no relationship between a post and what page of the index the post is displayed on.
Try to check how many page in the history list with history.length:
http://www.w3schools.com/jsref/prop_his_length.asp
Does anyone have any idea about how to get the number of time a user visit a particular site? For instance, if you do a search on google and there's a link that you clicked already, google will tell you how many times you have visited that particular link. Any ideas on how to code something like that using javascript?
Thanks.
In Google's case they can track that you have clicked on a link. Its a specific action that they can attach a javascript listener to. If you want to do the same thing on your own site, you can add some javascript that does something similar, and anytime a link is clicked an AJAX call can be made that will allow you to track that it was clicked.
However, if you are just looking to get some basic stats about pages on your site you can add Google Analytics to it, and it will gather a large amount of useful data for you.
http://www.google.com/analytics/
If you want to know how many people are visiting your page, you probably want to check out something like Google Analytics rather than making it yourself. It will give you a lot of data that you'd have to make a lot of effort to gather yourself.