DevHub Docs
Search…
Embed landing pages
Intended to be used as a dedicated page from marketing ads online or as a resource, some customers embed our landing pages and microsites into their website to create a customized experience for their site visitors.
With this approach, you can setup a page within your existing Site and CMS and then use the embed code to display your DevHub landing page or microsite.

Installation steps

  1. 1.
    Generate your embed javascript code - See notes below
  2. 2.
    Create a blank page on your existing site
  3. 3.
    Add the embed javascript code to the content area of your blank page

Example embedded javascript code

1
<div data-url="LANDING_PAGE_URL" id="sb-site-embed"></div>
2
<script type="text/javascript">
3
(function() {
4
var _cachebuster = Math.round(new Date().getTime() /2000);
5
var _sb = document.createElement('script'); _sb.type = 'text/javascript';
6
_sb.src = 'LANDING_PAGE_HOSTNAME/stat/js/site-embed.js?' + _cachebuster;
7
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(_sb, s);
8
})();
9
</script>
Copied!

Required configuration of the above code

  • LANDING_PAGE_URL - this is the full published URL of your landing page or microsite
    • Example: https://yourcampaign.yourdomain.com/landing-page/
  • LANDING_PAGE_HOSTNAME - this is just the hosted domain part of your landing page URL (if different)
    • Example: https://yourcampaign.yourdomain.com
Last modified 2yr ago