Solved

Measuring map data layer

  • 31 July 2023
  • 5 replies
  • 71 views

Badge +1

Hi all,

I would like to know if it’s possible or if anyone create a practice on how to log/measure users engaging with map data layers?

We have similar tool to google maps, that allow users to turn on/off map layers such as satellite, traffic, transit and we would like to measure how our users using it. 

 

 

icon

Best answer by ALabs l Preetam Barik 1 August 2023, 10:45

View original

5 replies

Userlevel 1
Badge

 

Hi ukaufman,

 

Just wanted to know a little more on this. Are this options available as toggle buttons and you want to capture the current state?

 

Thanks and Regards,

Preetam Barik

 

 

Badge +1

Hi @ALabs l Preetam Barik 

 

Yes, they are some sort of toggle buttons, we have two types, and i do want to have a differentiation with all buttons/layers.

For example:

  1. I have those toggles that can be on/off (currently they are off) i would like to capture the usage of them. 

     

  2. Data layers: I have layers that provide additional data (such as hazards location and types, Weather condition, etc.) that i want to get insights on how user use it, how long, and more.

 

Userlevel 1
Badge

Hi @ukaufman ,

 

Thanks for providing the details:

  • I have those toggles that can be on/off (currently they are off) i would like to capture the usage of them

1.The first way is to send a custom event property for the same. Attached docx for the same.

  1. The other way is adding javascript snapshots to a event in the Heap UI.
You can add a javascript snapshot to capture the toggle. For ex: (function(){const toggleButton = document.getElementById('id');
const isToggleOn = toggleButton.checked;

if (isToggleOn) {
  var toggle_state = 'Toggle is ON';
} else {
  var toggle_state = 'Toggle is OFF';
} return toggle_state})() “This should return you the button usage”

 

  • Data layers: I have layers that provide additional data (such as hazards location and types, Weather condition, etc.) that i want to get insights on how user use it, how long, and more.
  1. This also could be achieved by javascript snapshots to see interactions on anybody selecting any of the radio buttons.

(function(){ 
    var emptstr = []
    var i = 1
    var elements = document.querySelectorAll('input[name="selection"]')
    for (check of elements) {
        if (check.checked){
            var option = check.getAttribute("data-title")
            emptstr.push(option)
        }           
           }
return emptstr.join(", ")
})()

 

Also, the hazard button can be defined if that is clickable element. Once this data starts flowing in you can start your analysis in the analyze section and make use of Avg time between to get the required results.

 

Hope this helps. But in case you have any questions, please let us know.

 

 

Thanks and Regards,

Preetam Barik

 

Badge +1

@ALabs l Preetam Barik 

Thanks.

To add on it, let’s say the defult is off. The user came in to my platform.

  1. I want to know if the users open the layers and for how long it stays on
  2. How it will perform if the same user have different session? (our users have shift of couple of hours) The status of the button will stay the same.
  3. How it will perform if the users signs out? 
Userlevel 1
Badge

 Hi @ukaufman ,

  1. I want to know if the users open the layers and for how long it stays on

This can be achieved by the this particular report. Screenshot attached

 

Note: Step1: Use the click event on which you have defined the toggle state snapshot. 

Step2: Add a filter as shown “toggle state equals ON” 

Step3: Similarly choose the same event another time with filter “toggle is off”

You will get the avg. time for how long it stays on. 

 

  1. How it will perform if the same user have different session? (our users have shift of couple of hours) The status of the button will stay the same.

Unless a same user does not change the button , the status of the button will remain same

  1. How it will perform if the users signs out? 

Even if the user signs out you will still see the state of the button which the user selected. But if the button has a by default state. For ex: I toggled on the button but when I signed out , it automatically got toggled off, then that value won’t be automatically updated.

 

Hope this helps. Let me know in case of any follow up questions.

 

 

Thanks and Regards,

Preetam Barik

 

Reply