I want a page view counter for my blog. Page view counter must show Post View count of particular Post, not for overall blog.
Example:
Post1: View count 10
Post2: View count 6
Post3: View count 18
and so on.
I thought a logic that counter will start from 1 and will increase using onload function by 1. But I am unable to implement it.
Because same value I need to pick and onloading the page that value will be increased by 1 and will display in same place.
How can I implement this logic for my blog?
Note: I used many third party hit-counters but either they are un-supportive for HTTPS or counting overall blog count.
If you want specific functions for your counter, you should try to design one with 000webost or other free PHP/MYSQL hosting sites.
Related
Basically I have two screens (on different monitors), one works as a controller of the other which simply displays to the audience. I am planning to use HTML for displaying the contents in both the screens.
Currently I am stuck up on how to control the second screen using the actions on the first in realtime, say if I click a button on the first, an image should popup on the second. Can someone help me out on how to control the second page using the first? TIA
if you're talking about two pages, then you need a backend to do so.
you will have to retrieve the action committed on screen 1 (page 1) into your back code, and then transmit the information you want to all connections on the second screen (page 2).
Alternatively you could also submit the action into a database and have screen 2 read this information and behave accordingly every 2 seconds or so.
I wouldn't recommend going with option 2 since it costs too much resources which will lead your program to slow down and potentially behave abnormally.
If this is not the answer you're looking for please edit your question to clarify your objectives.
I am trying to merge multiple bills into a single pdf. Every bill has multiple pages and every bill has unique header and footer. To print out page count I use JavaScript code from documentation example. When I build pdf from a single bill, page count is correct, but when I pass in all bills, page count is total sum of every bill page. Headers are printed ok, they are unique for every bill, only the page count is summed together. Is there a way to fix the page count?
No, because each page is processed separately. So for the first webpages you could never get the total page count correct anyways, because the other webpages are not processed yet and the footer is already on the PDFs.
I am new to Google Analytics but can not find a solution to this issue on the Google Forums. I am setting up a basic Goal. My website has pages for case studies, what my company does, how we deliver. The goal for is users to end up at the contacts page to email the company. We want to see how users would go through
1) what we do NOT REQUIRED
2) how we work
3) case studies
Goal - contact
When I verify the Goal, I am given a 19.97 conversion rate. However when I go to the funnel visualisation page, it shows 0% at each funnel but it has a number at the end Goal.
I know that user are visiting these parts of the website. I am not sure what is causing this.
1) The first step is not required
2) I am using the specific webpage url for the step e.g. /what/
I have some questions:
What could be causing this? I have just made this goal however I intend to make more and display the reports on different dashboards and would like to set them up correctly.
Does it take time for the results to render if a new goal is saved? I have read 24 hours in forums but can not confirm this.
The landing page of my company's website has is just e.g. company.com. Am I supposed to use the specific URL in a Funnel step, how should the landing page be stated in the Funnels?
Thanks
I managed to fix this by adjusting the start date to when the Goal was first created, where as it was previously set to the date the website went live and testing was being performed.
Can data only start being collected for funnels when the goal is created?
I am trying to create multiple counters but not get done...
I have 4 states for every user in my page and I want to count time invested by the user in a single state..All the states are changed by user ..when users change their state the counter(up)
...start and reset again and count up to the next status change....
kindly help me as soon as imposable...
I had try many code but nor get done because the user are many and the counter code is one and the variable is one for each counter....the no of user are ..dynamic...
Yes, if your trying the same in web application where multiple users are logging then surely it will get wanish .. for that you need to maintain the session for each counter (if possible).
or one suggestion will be at a time of click call callback(jquery/ ajax) which will start the counter and automatically it will get reset . but yes you need to maintain that as per session wise.
then there will be a one way to maintain that counter value in session for that user and on page load you can again start with the same count.
Here i would suggest you to do that using Cookies by maintaining the counter value at client side.
You can use $.cookie("key", value) to set the value, and $.cookie("key") to get the saved value.
Also refer the article on jquery cookies. http://www.electrictoolbox.com/jquery-cookies/
What is the best way of doing a pagination? I would also need to save the current page, so that when I click a link it would save the page I was on. So if I'm on page 2 of the pagination and click one link and then get back to pagination page it would remember that I was on page 2.
I get the results/data from Json request where I have offset and limit possibility.
$.getJSON(base_url+'/ajax/get_news/4/!OFFSET!/!LIMIT!/true', func...
Where !LIMIT! is how many results it shows and !OFFSET! is, well offset :D When I click a link, it makes that request, it goes throught the results and appends the result into page.
What is best way to save the page, cookies? Should I get all the results and then do the pagination somehow or do new request when user change page?
Some tutorial or "hands on" example would be awesome. Normal instructions/guides are difficult to undestand since my first language isn't english.
It appears you have two questions:
1) How to save page state (what page you are on): If the application must continue to use an ajax, then you should look at storing the state in the url as discribed here:
http://ajaxpatterns.org/Unique_URLs
2) Regarding where to do the pagination, I think it would depend on the size of the data to paginate. If it is small and you are not worried about the data changing on between paging, do it all in javascript. Otherwise, do it server-side.
Okey I should use the !OFFSET! and !LIMIT! to do the pagination. I just need change those numbers with pagination links (1 2 3 4 pages etc) to get the pagination to work I believe. But I dont know where to start :/