seatocity Posted September 24, 2019 Share Posted September 24, 2019 I've added custom code to 3 pages on my website for an email subscription that goes to Marketo instead of the squarespace email campaign. When I first arrive to my website (regardless of page), the subscription box is there. When I switch to a new page that also has the subscription page, the subscription box is not there. When I return to the original page, the subscription box is no longer there. The subscription box is only live one the first page I land on - not 1 specific page. Once I switch pages, it disappears altogether. Anyone have a solution? Thanks! Link to comment
paul2009 Posted September 25, 2019 Share Posted September 25, 2019 See my answer here: https://answers.squarespace.com/questions/188857/why-doesnt-my-javascript-code-work-until-i-refresh.html About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
seatocity Posted September 25, 2019 Author Share Posted September 25, 2019 Thank you so much! If I disable the Ajax loading and it messes up other parts of my site, can I just recheck "enable Ajax loading" and the rest of my site will work again? Want to try this but want to know I can undo it if it doesn't work. Thanks for you help! Link to comment
paul2009 Posted September 25, 2019 Share Posted September 25, 2019 Yes you can. However, the better solution is to re-write and relocate the code. Code in per-page injection won't fire when a page is loaded with Ajax. About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.