Skip Navigation

[Resolved] Tracking Page/Map loads and limiting map preview of classified events in website

This thread is resolved. Here is a description of the problem and solution.

Problem:

Is there any mechanism by which we can set condition that after certain map load counts the preview gets disabled?

Solution:

As a workaround, you can install other "visit count" plugin, for example:
https://wordpress.org/plugins/search/count+visit/

get the visit count for each post with a shortcode of that "visit count" plugin, use it in wpv-conditional shortcode, check if it is out the limitation, then display something else.

Relevant Documentation:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 6 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1114157

Suppose my website allows users to register and display events with venue displayed on Google Map. There is an option in Google Map Platform for creating limitations like only certain url can access particular API key. So I may create new API key for each such event and create url restriction and further add budget notification. Based on it I may disable preview of maps for those classified events. By this firstly I can make sure my billing is not affected due to over load traffic. Secondly I may provide different plans/packages to clients for showing their event venue on google map along with other details.

Toolset settings allows to add only one Google Maps API key. So how can we deal in such case where we need to limit map loads for clients based on their selected plans? Or is there any mechanism by which we can set condition that after certain map load counts the preview gets disabled?

Regards.

#1114907

Hello,

First, the Toolset Map plugin allows you to add two Maps API keys:
- The second one works in for server-side requests

See our document:
https://toolset.com/documentation/user-guides/display-on-google-maps/creating-a-google-maps-api-key/#entering-the-maps-api-keys

But there isn't such kind of built-in feature to achieve what you want:
we need to limit map loads for clients based on their selected plans

As a workaround, you can install other "visit count" plugin, for example:
https://wordpress.org/plugins/search/count+visit/

get the visit count for each post with a shortcode of that "visit count" plugin, use it in wpv-conditional shortcode, check if it is out the limitation, then display something else:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional

#1115124

My issue is resolved now. Thank you!

#1115427

You are welcome