Solved

Can you edit a button to do two actions within a guide?

  • 10 September 2020
  • 6 replies
  • 399 views

I’m trying to create a two step guide that works as follows:

 

Step 1: Guide asks if user would like to download an asset to help them during their implementation. Upon clicking a “download now” button I would like the asset to be downloaded AND for the guide to progress to the next step

Step 2: Thank you for downloading message

 

I would like to create it as two steps to be able to trigger guides the next week that target only users who have downloaded the asset. This can be achieved by targeting only users who have completed the guide.

 

So far I’m able to acheive either downloading the asset OR progressing to the next step, but not both. 

 

Any idea?

icon

Best answer by link_black 16 September 2020, 05:03

View original

6 replies

Userlevel 6
Badge +2

Thanks for posting to PX Community Katie!

 

@richiemin did something similar with overriding the standard PX Engagement navigation buttons with his own custom button by using some advanced custom CSS and his answer is posted here.  However, this was not a simple task and he was very creative and persistent while solving his use case (Nice work Richie!). While I have not tried expanding on his findings to include a file download option as well, it does seem like it may be possible to do with more effort.  Not easy though in my experience.

 

Perhaps an easier way to do this would be to use a “normal” download button in a simple PX Dialog and couple that with a PX Custom Event for the “File Downloaded” event at the same time?  I posted some good examples about implementing Custom Events in a PX Engagement in this “Tip of the Week” post a while back, which should be helpful too.

 

For your specific example, I would suggest building this use case in single PX Dialog similar to the following:

 

 

When the user clicks the button, the file will be downloaded, a new PX Custom Event called “FileDownload” with a property of “clicked=true” will be created for the user, and the dialog window will close.  Here is what the PX Custom Event will look like in the “Recent Activity” for this PX user:

 

 

Notes: Perhaps it is not obvious, but you can change the PX Custom Event name to be anything that you want and also change/include other properties, such as the actual filename, which will make filtering through PX Analytics and targeting via Audience Logic in PX Engagements easier.

 

Once the PX Custom Event has been created, you can use the existence of the PX Custom Event to target users with additional PX Engagements using Audience Logic such as the following:

 

 

Happy PX-ing!!!!

 

cc: @harshibanka 

@link_black  thank you for the information! I’ve looked at both articles, and for my use case, I think the second custom event would work best. 

 

I’ve tried to add in the custom information as you’ve described, but I’m not seeing the custom event show up under my profile when I test it out.

 

<div class="px-dialog-title">AA Guide #1</div>
<div class="px-dialog-content">
<div>You can <strong>bold text</strong> or include. For more information, review the copy styling guide. Do not edit the styling <a href="insert url here" onclick="aptrinsic( 'track', filedownload ', { 'clicked ': 'true’});this.window.close(); ">without permission</a>.</div></div>

Note that in my code I do I have a working URL.

 

Is there a step missing once you add the custom event to the click?

 

I appreciate your help!

 

Katie 

Userlevel 6
Badge +2

To confirm, you are testing this with a live, launched PX Dialog Engagement, correct?  So you know, the PX Custom Event can only be created in a real, live PX Engagement running in your actual PX-tracked application and will not work in “preview” mode.

 

Your JavaScript code above looks almost correct, but one of the single parenthesis missing and another one is odd.  Not sure if that was a copy/paste error, but not valid JavaScript for sure.

 

This is how your hyperlink code should look :

<a href="https://insert.url.here.com" onclick="aptrinsic('track', 'filedownload',{'clicked':'true'});this.window.close();">without permission</a>

 

Userlevel 5
Badge +1

Hi @katie,

The above explanation from @link_black looks great. However, if you still face any challenges in implementing this, I have made a working video session which can be helpful.

https://share.getcloudapp.com/E0unw1dN

 

 

Thanks

Dileep Nalla

Userlevel 6
Badge +2

Excellent add-on post and video @dileepnalla , thank you!

Hi @katie,

The above explanation from @link_black looks great. However, if you still face any challenges in implementing this, I have made a working video session which can be helpful.

https://share.getcloudapp.com/E0unw1dN

 

 

Thanks

Dileep Nalla

 

I am unable to open this video, can you make it shareable? 

Reply