Is it possible to import the number of visitors into a Foundation Billboard stack?


(Garth Poon) #1

Hi! Our company is running a campaign and they would like me to display the number of page hits inside @tav’s Billboard stack (see http://jellysign.com…instead of “123,” they would like that number to update every time someone else views the page).

Is this posible? I tried using hit counter scripts, but it seems to just mess up the page. It seems like it should be something that is fairly simple to do…make the number of page hits appear inside a stack. However, I can’t seem to make it work.

Any ideas?


(Andrew Tavernor) #2

Yes it is, I’ve made you a simple demo - you can download all the files required from the link on the page

https://demo.bigwhiteduck.com/bb-hitcount/


(Garth Poon) #3

Wow! This is amazing Andrew! Thank you so much! I had tried something similar with another PHP hit counter script that I found on the internet, but I didn’t use a PHP include and it didn’t work properly.

Thank you!!


(Andrew Tavernor) #4

I suspect that if you were using a script tag inside BillBoard then that was messing things up. Doing it this way means that the counter text is inserted server side so BillBoard just sees the text as if you had entered it yourself when the page JS runs.


(Garth Poon) #5

Yes, your way is much better! I don’t know enough about scripts to figure
all of that out on my own…

Really appreciate the help, Andrew! Enjoy the coffee :wink:


(Andrew Tavernor) #6

Thanks, much appreciated