Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted May 30, 20204 yr 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
May 31, 20204 yr Community Expert 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.
May 31, 20204 yr Author 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? You can use this plugin
May 31, 20204 yr 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 😉 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.