I would like to add the like button of the customer community to the product feature mapper of px.

Can I use the class in some way?

I would like to add the like button of the customer community to the product feature mapper of px.
Can I use the class in some way?
Best answer by rschlette
Hi Alistair. It’s not possible to add additional metadata to standard PX events like page view and click, but that’s where custom events come in.
In CC, we need to add event listeners to the Third Party Scripts “Before </Body>” section. From these event listeners, we can send PX custom events, including DOM attributes from the inSidedData object.
For example:
<!--begin PX Custom Event: Topic Like-->
<script>
var likeButton = document.querySelector(".icon--thumb-up");
if(likeButton!=null){
likeButton.addEventListener("click", e => {
aptrinsic('track','Like Button Clicked',{'title':inSidedData.content.topic.title,'type':inSidedData.content.topic.type});
});
}
</script>
<!--end PX Custom Event: Topic Like-->
That script looks for the like button on the page, and if that like button exists, listens for a click. When clicked, there is a PX custom event that sends the Title and Type attributes from inSidedData.content.topic
In PX we see these events like this:
https://share.zight.com/5zuk7EQQ
From there, raw custom events that flow to PX can be used in product mapper rules (custom event rules) and engagement audience logic (custom event rules). The custom events can also be accessed directly in Query Builder for reporting purposes (event type = custom event).
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.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.