Skip to main content
Question

Tip of the Week: Creating PX Custom Events from within a PX Engagement


link_black
Forum|alt.badge.img+2
  • Gainsight Employee ⭐️⭐️
  • 316 replies

When I created this post about updating the PX User Profile attributes with button links from within a PX Dialog Engagement, I also wanted to share a similar method to create PX Custom Events from within a PX Engagement. 

 

Here are some simple use cases:

  • Simply being able to create PX Custom Events without asking a developer to add our JavaScript snippets into your application source code … good for testing, experimentation, and learning too!
  • Allowing the user to “select” some preference and/or follow-up action or request while within a PX Engagement.
  • Tracking any/every link clicked within a PX Engagement specifically as opposed to relying on the general CTA count provided in Engagement Analytics.
  • Enhancing your PX Analytics filtering and PX Engagement Audience Logic targeting with this new level of rich PX User information.

We have some good use cases for PX Custom Events described in our online documentation here, but I am sure that we/you can think of many more uses for this, so here is what you need to know…

 

The PX Custom Event Javascript has the following format:

 

aptrinsic('track', '[custom_event_name]', {'[custom_event_property]':’[custom_event_property_value]’});"

 

[custom_event_name] is the PX Custom Event name.

[custom_event_property] is the PX Custom Event Property name.

[custom_event_property_value] is the PX Custom Event Property value.

 

While you cannot add a bunch of JavaScript code to the source of a PX Engagement, you can make simple JavaScript calls when the user clicks a Custom Button or any hyperlink by using the “onclick” <a href>property.  You will need to edit the source code of your Engagement to do this, but it is not hard, and below is an example screenshot of how this can be implemented on both a PX custom button as well as a general hyperlink:

 

And here is how an actual PX Engagement screen could look for your users:

 

Once this is implemented and you have users clicking these buttons/links, you will then see these PX Custom Events in the “recent activity” section of the PX User Profile and can now use them for PX Analytics filtering and Engagement targeting.  See below screenshots for the results:

 

This is a pretty cool way to use more PX Custom Events and to get more value/benefit from your PX Subscription … without getting your development team to build them into your product. 

 

Feel free to comment below with your experience and feedback.

 

Happy PX-ing! 

 

IMPORTANT UPDATE:

Due to cross site scripting (XSS) security concerns, our PX Product team was asked by our Gainsight Security team to disable simple JavaScript support within PX Engagements in all recent/new PX Subscriptions. 

This high demand/value feature can now be quickly enabled by your PX Administrator right inside your PX subscription.  See below:

 

5 replies

harshibanka
Forum|alt.badge.img+2
  • Gainsight Employee ⭐️⭐️
  • 196 replies
  • June 30, 2020

This is so amazing @link_black , thank you for sharing these nuggets with us!


sai_ram
Forum|alt.badge.img+1
  • Expert ⭐️⭐️
  • 3727 replies
  • July 2, 2020

Bumping this to the top for more visibility.

@link_black Thanks for sharing it here!


bostojic
  • Contributor ⭐️⭐️⭐️⭐️
  • 32 replies
  • October 17, 2020

This post was shared by @link_black  in the Pulse For Product 2020 and I’m so grateful for that!


link_black
Forum|alt.badge.img+2
  • Author
  • Gainsight Employee ⭐️⭐️
  • 316 replies
  • May 11, 2021

IMPORTANT UPDATE:

Due to cross site scripting (XSS) security concerns, our PX Product team was asked by our Gainsight Security team to disable simple JavaScript support within PX Engagements in all recent/new PX Subscriptions. 

This high demand/value feature can now be quickly enabled by your PX Administrator right inside your PX subscription.  See below:

 


sai_ram
Forum|alt.badge.img+1
  • Expert ⭐️⭐️
  • 3727 replies
  • May 17, 2021
link_black wrote:

IMPORTANT UPDATE:

Due to cross site scripting (XSS) security concerns, our PX Product team was asked by our Gainsight Security team to disable simple JavaScript support within PX Engagements in all recent/new PX Subscriptions. 

To have simple JavaScript support as described above available within your PX Engagements, please reach out to PX Support team to have this enabled (pxsupprt@gainsight.com).

@link_black thank you for sharing  this here.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings