TrustHub provides multiple embedding options to integrate your TrustHub pages into your existing website. You can choose between iframe and JavaScript embedding methods, depending on your technical requirements and preferences.
Log in to your Osano account
Navigate to the TrustHub section
Open the page you want to embed
Click the purple "Get Code" button in the top right corner of your TrustHub page
Choose your preferred embedding method:
Iframe Embed: Simple HTML iframe code
JavaScript Embed: More advanced JavaScript implementation
The embed code will be displayed in a popup
Copy the code snippet
Iframe embedding is the simplest method and works with most websites:
<iframe title="Osano TrustHub Embedded Page" frameborder="0" src="https://example.trusthub.com/page-id/" width="100%"></iframe>Benefits:
Simple implementation
Works with most content management systems
Minimal technical requirements
Easy to customize with CSS
Considerations:
Fixed height may not work for all content
Limited interaction with parent page
May have styling limitations
JavaScript embedding provides more flexibility and control:
<!-- Osano TrustHub Embedded Page -->
<script type="text/javascript">
(function (w, d) {
var l = w.addEventListener(
"message",
function (e) {
try {
var f = d.getElementById("osano-trusthub-page_example");
if (e.source === f.contentWindow && e.origin === "https://example.trusthub.com") {
var m = JSON.parse(e.data);
f.style.cssText = "height:" + m.osanoTrustHub.contentHeight + "px;min-width:100%";
w.removeEventListener(l);
}
} catch {}
},
false
);
d.write('');
})(window, document);
</script>
<iframe frameborder="0" id="osano-trusthub-page_example" title="Osano TrustHub Embedded Page" src="https://example.trusthub.com/page-id/" width="100%"></iframe>Benefits:
Dynamic height adjustment
Better integration with your site
More customization options
Responsive design support
Considerations:
Slightly more complex implementation
May need additional configuration
For simple linking without embedding, you can use the direct URL to your TrustHub page:
From TrustHub Dashboard: Click the "View Site" button in the top right corner
From Individual Pages: Click the "View Page" button on any TrustHub page
Copy the URL from your browser's address bar
Simply add the TrustHub URL as a regular link on your website, for example:
<a href="https://example.trusthub.com/privacy-policy">Privacy Policy</a>Benefits of Direct Linking:
Simple implementation
No iframe or JavaScript required
Full page experience for users
Easy to maintain and update