Solved

Multiple attributes mapped in one selector

  • 18 December 2019
  • 1 reply
  • 292 views

Let’s say you have this element:

<div data-gs=”something” title=”Edit Button”></div>

In standard CSS, I can write

div[data-gs=“something”][title=“Edit Button”]

 

In Gainsight PX, can I write a selector the same way? 

div[data-gs=“something”][title=“Edit Button”] 

 

Thank you,

Glen Lipka

icon

Best answer by dileepnalla 31 December 2019, 14:25

View original

1 reply

Userlevel 5
Badge +1

Hi @GlenLipka ,

This is Dileep from Gainsight Support. Yes, you can define the multiple attributes in the single selector.

Please refer the below explanation and Video recording

Use cases where we can use any number of CSS selectors on PX to identify the element

1. While we want to tag a tooltip/ Hot spot / Badges in the engagements.

2. We use CSS selectors with the combination of scope(URL) to track a feature by mapping it in the product mapper.

The below video helps you how to achieve multiple attributes mapped in one selector, this video has been recorded in my local instance taking your use case.

https://share.vidyard.com/watch/F8GWFBDfrz5JpEm4LefFRg?

 

Steps to do:

  1. Add data-gs and title in the DOM elements in SDK settings as shown below
  2. Add the Multiple Attributes in the Selector as shown below
  3. Once you use the feature, you will be able to track that in the Recent Activity

 

Hope this helps, Please let us know if you have any further concerns, we are happy to share

Wishing you a happy New year 2020!

 

Thanks

Dileep Nalla

 

 

 

 

Reply