Hi,
I'm trying to edit my Brooklyn theme password page to run a pre-launch campaign using Kick off Labs landing page script. Ultimately I want the landing page script to load on the page not the Shopify password page code.
I'm trying to add the following code to the password page:
<!-- BEGIN KICKOFFLABS EMBED CODE -->
<style>
*{margin:0;padding:0;}
html{overflow:hidden;}
#full_kickoffpage{position:absolute;width:100%;height:100%;top:0px;left:0px;right:0px;}
iframe{height:100%;width:100%;border:none;}
</style>
<div id='full_kickoffpage' data-domain="embed.kickoffpages.com"></div>
<script type="text/javascript">
(function(doc, el) {
var script_is_loaded = false;
var s = doc.createElement(el);
s.src='https://cdn.kickoffpages.com/pages/1.9.9/kol_embed_page.js';
s.onload = s.onreadystatechange = function() {
var rs = this.readyState; if (script_is_loaded) return; if (rs) if (rs != 'complete') if (rs != 'loaded') return;
script_is_loaded = true;
try { KOL_Embed_Page.makeFrame({container_id: 'full_kickoffpage', height: '100%', width: '100%', page_id: 327774}); } catch (e) {}};
var scr = doc.getElementsByTagName(el)[0], par = scr.parentNode; par.insertBefore(s, scr);
})(document, 'script');</script>
<!-- END KICKOFFLABS EMBED CODE -->
I first tried to just embed the script into password page to start - however it loaded the shopify password page first and then 2-3 seconds later it the landing page which isn't the experience I need.
I next removed most of the password page code to just have my script run but it wont let me save the file saying that the {{ content_for_header }} and {{ content_for_layout }} are missing.
How can I get my script to load before any of the shopify code so visitors see my pre-launch landing page first?
Thanks
Damien
Sorry for facing this issue, it's my pleasure to help us.
Welcome to the Shopify community!
and Thanks for your Good question.
Please share your site URL,
So I will check and provide a solution here.
Thanks for details i have check this it's working fine
if you have see issue can you please give me a issue
User | Count |
---|---|
443 | |
194 | |
101 | |
95 | |
90 |