gaapgeek Posted May 30, 2020 Share Posted May 30, 2020 Hi there, I'm trying to add a Javascript snippet to insert an onboarding overlay to the homepage, but I can't seem to get it to work. Attached is a screenshot of the text to be added. Is anyone able to tell me exectly where I should add it? Thanks Link to comment Share on other sites More sharing options...
Sonya* Posted May 30, 2020 Share Posted May 30, 2020 You can use this plugin gaapgeek 1 Link to comment Share on other sites More sharing options...
Daniel F Posted May 31, 2020 Share Posted May 31, 2020 There's no need for a 3rd party plugin 🙂 Just add it to the analytics setting, which can be found in your ACP on the System => Analytics page. Link to comment Share on other sites More sharing options...
gaapgeek Posted May 31, 2020 Author Share Posted May 31, 2020 Thanks Daniel - ideally, I only want the code on the homepage (I've created in Pages). what's the best way to add this snippet to the one page? 18 hours ago, Sonya* said: You can use this plugin Link to comment Share on other sites More sharing options...
Sonya* Posted May 31, 2020 Share Posted May 31, 2020 4 hours ago, Daniel F said: Just add it to the analytics setting, which can be found in your ACP on the System => Analytics page. He has to include it before the <body>-tag. If he changes the location of JavaScript in the theme, then the script will fail. This will not happen with 3rd party plugin 😉 4 hours ago, gaapgeek said: I only want the code on the homepage (I've created in Pages). what's the best way to add this snippet to the one page? You can limit the script to one page only: {{if \IPS\cms\Pages\Page::$currentPage == 'YOURPAGE'}} your script {{endif}} Use this either in Analytics field or with the 3rd party plugin. gaapgeek 1 Link to comment Share on other sites More sharing options...
Recommended Posts