Question

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

  • 30 June 2020
  • 5 replies
  • 1468 views

Userlevel 6
Badge +2

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

Badge +2

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

Userlevel 7
Badge +1

Bumping this to the top for more visibility.

@link_black Thanks for sharing it here!

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

Userlevel 6
Badge +2

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:

 

Userlevel 7
Badge +1

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