# Session property for web vs mobile application

**URL:** <https://community.dynatrace.com/t/session-property-for-web-vs-mobile-application/42709>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, user-sessions\
**Created:** [November 20, 2023, 10:03am UTC](https://community.dynatrace.com/t/session-property-for-web-vs-mobile-application/42709 "2023-11-20T10:03:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Weilin1](https://avatars.discourse-cdn.com/v4/letter/w/5f8ce5/32.png) [@Weilin1](https://community.dynatrace.com/u/Weilin1)\
**Post date:** [November 20, 2023, 10:03am UTC](https://community.dynatrace.com/t/session-property-for-web-vs-mobile-application/42709/1 "2023-11-20T10:03:56Z")

</div>

Hi,

I am trying to find out more about session and action property.

Understand that for web application, there is RUM JavaScript API for me to add session and action property through&nbsp;sendSessionProperties and addActionProperties().

And for mobile, i can use reportValue.

Hence i would like to ask if they function the same way?

Adding Session Property

- Web:

```javascript
var js_role = { js_role: "staff" };
window.dtrum.sendSessionProperties(null, null, js_role);

```

- Mobile:

```javascript
Dynatrace.reportStringValue("js_role", "staff");

```

Add Action Property

- Web

```javascript
var rating;
    function submitForm(value) {
        fetch('https://example.com/submit')
        .then(response => response.json())
        .then(data => {
            if (typeof dtrum === "undefined") return;

            // Add Action Listener
            rating = { js_rating: value };
            window.dtrum.addEnterActionListener(addRatingToAction);

            // Add Custom Action 
            var submtitForm = window.dtrum.enterAction('Submit Form');
            window.dtrum.leaveAction(submtitForm);

            // Remove Action Listener
            window.dtrum.removeEnterActionListener(addRatingToAction);

        })
        .catch(error => {
            console.error('API Error:', error);
        });
    }

    // Add Action Properties 
    function addRatingToAction(actionId) {
        window.dtrum.addActionProperties(actionId, null, null, rating);
    }

```

- Mobile

```javascript
let myAction = Dynatrace.enterAutoAction("Submit Form");
myAction.reportStringValue("js_rating", value);
myAction.leaveAction();

```

- is this correct?

Thanks.

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [November 20, 2023, 10:51am UTC](https://community.dynatrace.com/t/session-property-for-web-vs-mobile-application/42709/2 "2023-11-20T10:51:30Z")

</div>

Hi [@Weilin1](https://community.dynatrace.com/user/52140)

In general, **sendSessionProperties** and **addActionProperties** in web applications and **reportValue** in mobile applications serve a similar purpose of enriching session and action data with custom properties, they are tailored to the specific requirements and best practices of web and mobile platforms respectively.

Radek

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [November 20, 2023, 11:25am UTC](https://community.dynatrace.com/t/session-property-for-web-vs-mobile-application/42709/3 "2023-11-20T11:25:31Z")

</div>

Just for the record - for web apps, you won’t see any values until properties are configured for the web application in Dynatrace. For mobile applications it’s different, you will still see the values in user action waterfall screens (very convenient and useful), and they will act as user action property just after you defined them. That’s why the difference - sendActionProperties vs. reportValue.
