This guide demonstrates how to incorporate an external script into your decision tree, allowing for the addition of external buttons such as those used for affiliate and ecommerce offers.


One of the most effective ways to sell online is to help your website visitors or leads to self-select for themselves the best offer, product or solution.

Think of this as a virtual sales person similar to someone you’d help you in a retail, white goods or hardware store.

At the end of your decision paths, you can add a button containing a link to the offer.

Some platforms like ThriveCart will even give you code to add to any page on the internet. Clicking the button will start the add to cart or checkout process.

<script async src="//"></script><a data-thrivecart-account="ippc" data-thrivecart-product="1" class="thrivecart-button thrivecart-button-styled thrivecart-button-green ">Buy now!</a>

How to Add Script to Your Decision Tree

On the very last step, add the script anywhere in the text editor provided in every node in LeadsHook.

1: Click ‘Source’
2: Copy/Paste Your Script
3: Click ‘Source’ Again

4: Your button will appear as shown above (don’t worry if it does not look like a button yet)
5: Highlight the button text and align it as required (center your button).
Press SAVE

6: Your button will appear on your deployed decision tree.

Feel free to adjust the colour, size etc from your shopping cart. LeadsHook is ONLY displaying your content. You control and look and feel from your 3rd party ecommerce app/software.


Integrating external buttons in your decision tree can enhance user experience and promote seamless engagement with affiliate and ecommerce offers. Always ensure your scripts are correctly configured and displayed for optimal functionality.


  • Can I add multiple external buttons in a single decision tree?
    • Yes, you can add multiple buttons, each with their own scripts. However, make sure this doesn’t confuse the users.