Advice Embed
Taffrail has a sophisticated Advice embed widget that is easy to integrate. This works similarly to embeds for Google Maps, YouTube videos, Facebook profiles, etc.
Paste one line of code into your existing website, app, or CMS. We use Web Components and oEmbed, an industry-standard schema for embedded content.
Get Started
Hello World
Use this embed code to integrate our Hello World advice.
<div class="taffrail-embed"><div class="taffrail-rw"><a data-tr-url data-tr-key="YOUR_API_KEY" href="https://www.advice.taffrail.com/c/TFU3nYztaJ8yxgNGQkGsP7k/iframe?"></a></div></div><script src="https://www.advice.taffrail.com/dist/js/embed.bundle.js" async charset="utf-8"></script>
Example
oEmbed
Fetching embed code dynamically is also possible using our oEmbed API. Using the Hello World example, view the oEmbed API. This is only an example.
Key Features
- You determine the widget's width by placing it inside an element on your site.
- The widget will automatically adjust its height based on the Advice shown and continue to resize based on assumptions modified by users.
- Work with Taffrail to customize the presentation, branding, and more.
Next Steps
After testing with this Hello World example, you can find unique embed codes for given Advice Sets from your dashboard or Taffrail directly.
Commonly, embedded widgets would render complete Advice, that is, Advice with all inputs and assumptions answered or predefined. This can be accomplished by copying the embed code from a complete Advice scenario or manually by appending Variable name/value pairs as query parameters to the embed URL.
Take the following example for Tax_Filing_Status
and Tax_Year
:
?key=YOUR_API_KEY&Tax_Filing_Status=married+filing+joint&Tax_Year=2024
Configuration
- Be sure to replace
YOUR_API_KEY
with an API key provided to you by Taffrail. - Use the
data-tr-channel
HTML attribute to configure the preferred API channel."preview"
is the default channel.
Updated 6 months ago