Support Center

How do I utilize the HTML5 "Embed Code"?

Last Updated: Aug 25, 2012 12:19AM CEST
The Embed Code under your "HTML5 App" tab redirects users who visit your mobile site on their device to your new HTML5 app version. This allows your app to become your site's complete mobile experience.

If you don't wish to point users to your app automatically when they visit your site on their mobile device, this option may not be for you.

After you've completed the HTML5 domain process, this code will propagate with your personal domain information.

Where to place this code

This code (script) should be placed in the header in of your site's HTML. For example:

<html>
<head>

<script type="text/javascript">
function seIsMobile() { 
    var userAgent = navigator.userAgent.toLowerCase();
    var devices = ['android', 'iphone', 'ipod', 'ipad'];
        for(var i in devices) { 
            var device = devices[i];
            if (userAgent.indexOf(device) != -1) {
                return true;
            }
        }
    return false;
};
if (seIsMobile()) { location.href = 'http://app.yoursite.com'; }
</script>

</head>
<body>
</body>

</html>

---

If you don't have access to your HTML header area, try placing this code anywhere in your homepage framework that accepts script.

Some CMS or site providers don't allow external script in their platform, and you may want to check with you site manager or CMS provider if you're unsure how to insert this type of code.

Contact us

Didn't find what you were looking for? No problem! Feel free to
write to our support team.

shoutem@shoutem.com
http://assets2.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete