Skip to Content Skip to Menu

Support for functionality to track content visits

  • aptol
  • aptol
  • OFFLINE
  • Posts: 49
  • Thanks: 3
  • Karma: 1
3 years 3 months ago #325689 by aptol
Hello, I like to inquire if your platform can handle this specification. We would like to prompt the visitor of our site if they have visited x number of
pages. When x is reached we like to show login/registration form. Can your software support such, so we can register and acquire more members?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48534
  • Thanks: 8290
  • Karma: 1445
3 years 3 months ago #325691 by krileon
Not out of the box, but it's doable with a few plugins. You've a couple of options on how you track your users visits. You can either do that using JS and cookies/localstorage or using PHP and logging to a database their ip address. That code would handle incrementing the hits. JS usage can be handled in CB Content Module as just a module or using CB Auto Actions to output JS to the page. PHP usecase would require CB Auto Actions.

As for rendering the login module it's basically same situation of either use JS to move the login module into view after their hits counter has hit your desired number or use PHP and have CB Auto Actions redirect them to the login page after reaching the desired number of visits.

So yes it is doable, but requires custom code. If you've no experience with writing JS or PHP this would prove difficult to implement.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • aptol
  • aptol
  • OFFLINE
  • Posts: 49
  • Thanks: 3
  • Karma: 1
3 years 3 months ago #325693 by aptol
Wow thanks for your quick response. So what would it take to achieve this, in time and cost?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48534
  • Thanks: 8290
  • Karma: 1445
3 years 3 months ago - 3 years 3 months ago #325694 by krileon
That most difficult part is you'd need to know how to code that as we do not provide custom coding assistance here. As for tools that'd help with that you'd need CB Auto Actions if you want to handle it server side with PHP or CB Content Module if you want to try handling it client side entirely with JS (or some other means of outputting custom JS to the page).

Have you checked the JED (Joomla Extension Directory) for something like what you're wanting as there maybe something ready to install already available.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 3 years 3 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • aptol
  • aptol
  • OFFLINE
  • Posts: 49
  • Thanks: 3
  • Karma: 1
3 years 3 months ago #325695 by aptol
No i figured if anyone could provide this would be Joomlapolis out of the box, haha. I will continue my search or wait for my people in India, who are under Covid lockdown.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48534
  • Thanks: 8290
  • Karma: 1445
3 years 3 months ago - 3 years 3 months ago #325705 by krileon
The below example would work in CB Content Module. It keeps track of their page views using browser local storage. At 10 views it'll redirect to the login page.

Code:
const limit = 10; let views = localStorage.getItem( 'numberOfVisits' ); if ( views === null ) { views = 0; } if ( views >= limit ) { localStorage.setItem( 'numberOfVisits', 0 ); window.location = '[cb:url location="login" /]'; } else { views++; localStorage.setItem( 'numberOfVisits', views ); }

Change the limit to whatever you like. Render the module on any page you want their view tracked. CB Content Module can also be purchased individually from our addons page below.

www.joomlapolis.com/addons

Would this be sufficient for your needs or are you looking for some sort of login modal window popup instead?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 3 years 3 months ago by krileon.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum