# Javascript tracking on shared devices - not working

**URL:** <https://forum.mautic.org/t/javascript-tracking-on-shared-devices-not-working/36344>\
**Category:** Product Support\
**Created:** [August 17, 2025, 7:11am UTC](https://forum.mautic.org/t/javascript-tracking-on-shared-devices-not-working/36344 "2025-08-17T07:11:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauticsmit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mauticsmit/32/14285_2.png) [@mauticsmit](https://forum.mautic.org/u/mauticsmit)\
**Post date:** [August 17, 2025, 7:11am UTC](https://forum.mautic.org/t/javascript-tracking-on-shared-devices-not-working/36344/1 "2025-08-17T07:11:39Z")

</div>

**Your software**  
My Mautic version is: 6.0  
My PHP version is: 8.3.6  
My Database type and version is: mysql

**Your problem**  
My problem is: when using javascript on a shared device, when the user logs off, I setting the value for mautic tracking via javascript code below

```auto
    // Delete the mtc_id cookie on page load
    deleteCookie('mautic_device_id');
    deleteCookie('mtc_id');
    deleteCookie('mtc_sid');
    StorageSave('mautic_device_id', '');
    StorageSave('mtc_id');
    StorageSave('mtc_sid');

```

These errors are showing in the log:

When i log in with a second user, the page views still show up under user 1 vs user 2

Steps I have tried to fix the problem:

Verified that the cookies and local storage values are either removed or set to undefined.
