I have a dynamic list of data that I would be rendering. Now I want that on clicking any item from this list an engagement to be triggered. So i have tried out 2 ways- one is to add a custom event and then associate engagement with it, the other way is to associate the engagement with product mapper. In the case of a custom event I would have to would have to create the event and then from backend I would have to send the event name, while in case of product mapper I would have to create a unique selector for every item. Which one of this would be the better option?
Hi
Thanks for reaching out us over community!
Using Product Mapper:
- When you say you have dynamic list of data being rendered, its always best to have the data-attributes being rendered in the HTML content which can be used as the strong selectors to map the elements
- If you believe that list of elements that are being rendered has fixed with unique order - you can go with nth child selector option (NOT Recommended if the values are dynamic in nature)
Using Custom Events:
- Implementation should be a short liner code, however this is more effective, If you are interested in this approach, you can implement a single custom event for the entire dropdown list with multiple properties (Items in the list) being passed.
- Example: I have a list of States to be rendered based on Country
aptrinsic('track', 'Dropdown List', {"StateName":"California"}); - // This will be triggered when some one clicks the list and choose california.-------------aptrinsic('track', 'Dropdown List', {"StateName":"Nevada"}); - // The same will be triggered when some one clicks the list and choose Nevada Here is the doc for custom events:
- https://support.gainsight.com/PX/API_for_Developers/02Usage_of_Different_APIs/Use_Custom_Event_API
For any further questions, I would recommend to reach us on pxsupport@gainsight.com
Thanks
Dileep Nalla
This has been here a bit but also wanted to add some thoughts. I love custom events, I am working to try to get our engineering team to use them more…
We recently added a new feature which can be three different states, under each state is different metadata:
- empty
- error
- success
We trigger an engagement for each state where each is triggered by an accompanying Feature created within Product Mapper. Then I realized that I could create unique elements with data reporting capabilities from each item within the product mapper - so that the custom event data was visible next to the user click data.
We could report the number of times users ‘Viewed’ an indicator - by the state. Then we could also present the number of times a user ‘Clicked’ the indicator showing feature adoption and click through rates without having to connect data from the backend teams. In the end, we were able to connect three very valuable datapoints:
- The number of items generated by the back end services (we don’t have gainsight in all products)
- View: The number of items generated viewed by a user
- Clicked: The number of items presented to a user which were clicked
But that’s not all… because we also used Product Mapper to define the hyperlinks from within (our Product and Engagements) out to our marketing website providing us the ability to track and (and more importantly) present how the new feature and gainsight drove user traffic to our website.
Reply
Sign up
If you ever had a profile with us, there's no need to create another one.
Don't worry if your email address has since changed, or you can't remember your login, just let us know at community@gainsight.com and we'll help you get started from where you left.
Else, please continue with the registration below.
Welcome to the Gainsight Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.