# Can we add/combine two different css selections to create one user tag ?

**URL:** <https://community.dynatrace.com/t/can-we-add-combine-two-different-css-selections-to-create-one-user-tag/18765>\
**Category:** Real User Monitoring\
**Tags:** user-sessions\
**Created:** [December 10, 2018, 8:03am UTC](https://community.dynatrace.com/t/can-we-add-combine-two-different-css-selections-to-create-one-user-tag/18765 "2018-12-10T08:03:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohit\_sharma](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@rohit\_sharma](https://community.dynatrace.com/u/rohit_sharma)\
**Post date:** [December 10, 2018, 8:03am UTC](https://community.dynatrace.com/t/can-we-add-combine-two-different-css-selections-to-create-one-user-tag/18765/1 "2018-12-10T08:03:26Z")

</div>

Can we add/combine two different css selections to create one user tag ?

I want to capture two different texts from two different areas of the html for example:

text 1: Joe

text 2: Joe’s emp no ( 242) ( mentioned on same page but elsewhere)

Desired result: Joe 242

Is it possible ? if yes how can I combine the css selections to achieve the same.

I have been trying : css selection 1(body \> div.dJi-f.ds-i \> div:nth-child(1) \> div \> div:nth-child(3) \> div \> div.dil-e \> a \> div.dil-f) + css selection 2

Regards

Rohit Sharma

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [December 10, 2018, 8:28am UTC](https://community.dynatrace.com/t/can-we-add-combine-two-different-css-selections-to-create-one-user-tag/18765/2 "2018-12-10T08:28:22Z")

</div>

I think you will have create two rules (one per each selector). But you will result 2 tags. In this way the best option is to save desired value to cookie or global js variable if you have such option.

---

<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:** [December 10, 2018, 1:08pm UTC](https://community.dynatrace.com/t/can-we-add-combine-two-different-css-selections-to-create-one-user-tag/18765/3 "2018-12-10T13:08:24Z")

</div>

Additionally if you have the option to alter the code, I’d suggest to use the Dynatrace dtrum API for for tagging the user.

---

<div class="post-metadata">

**Author:** ![rohit\_sharma](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@rohit\_sharma](https://community.dynatrace.com/u/rohit_sharma)\
**Post date:** [December 12, 2018, 11:55am UTC](https://community.dynatrace.com/t/can-we-add-combine-two-different-css-selections-to-create-one-user-tag/18765/4 "2018-12-12T11:55:02Z")

</div>

Thanks Julius, we are looking into that possibility 🙂

---

<div class="post-metadata">

**Author:** ![rohit\_sharma](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@rohit\_sharma](https://community.dynatrace.com/u/rohit_sharma)\
**Post date:** [December 12, 2018, 11:55am UTC](https://community.dynatrace.com/t/can-we-add-combine-two-different-css-selections-to-create-one-user-tag/18765/5 "2018-12-12T11:55:35Z")

</div>

Thanks for the input Sebastian 🙂
