How to add a popup to all pages? (C5 8.4.3)
Permalink
This seems like it should be simple, but I'm just not finding it. I've got a line of script that is supposed to add a popup to all pages, and apparently just need to add it "just before the </body> tag."
Where would I make that addition? Like I said, it seems it should be simple, but I have looked through all the settings, and don't see anything, so I figure I must be missing something.
Thanks much!
Where would I make that addition? Like I said, it seems it should be simple, but I have looked through all the settings, and don't see anything, so I figure I must be missing something.
Thanks much!
Rather than trying to blindly explain how and where you may be able to insert the script, can we have a look at what it is you're trying to do? Some details will go a long way in getting the best answer for your issue. I'm happy to assist further if I'm able!
Thanks for responding. This is the message I got from our marketing guy
He said it'd create a popup on all of our pages. I know enough html and such to be dangerous, but am not a wizard by any stretch of the imagination.
Thanks!
Place this code in footer, right before </body> tag <script src="https://path/to/scipt.js"></script>
He said it'd create a popup on all of our pages. I know enough html and such to be dangerous, but am not a wizard by any stretch of the imagination.
Thanks!
A few options:
- put the script into the footer tracking code area: /dashboard/system/seo/codes
- put the script into an HTML block in the last global area in the footer. Assign my 'Safe HTML' block template to protect from breaking your site.
https://www.concrete5.org/marketplace/addons/safe-html...
- add the script using @mesuva's Script Output block https://www.concrete5.org/marketplace/addons/script-output/...
- add the script code to the footer.php of your theme
Nevertheless, there are many marketplace blocks free & paid that add popups etc. Some are general purpose. Others are specific, such as cookie consent popups. So think about what the purpose of your popup is and consider an existing addon. It will have been designed to work with c5 rather than generically. It may well save you time and money now, and more in future maintenance.
- put the script into the footer tracking code area: /dashboard/system/seo/codes
- put the script into an HTML block in the last global area in the footer. Assign my 'Safe HTML' block template to protect from breaking your site.
https://www.concrete5.org/marketplace/addons/safe-html...
- add the script using @mesuva's Script Output block https://www.concrete5.org/marketplace/addons/script-output/...
- add the script code to the footer.php of your theme
Nevertheless, there are many marketplace blocks free & paid that add popups etc. Some are general purpose. Others are specific, such as cookie consent popups. So think about what the purpose of your popup is and consider an existing addon. It will have been designed to work with c5 rather than generically. It may well save you time and money now, and more in future maintenance.
Thanks for the response. I finally heard back from my marketing guy, and he essentially said "Oh, I need to enable the script!"
So what I had tried first before even asking here (i.e. putting it in the footer tracking codes section) actually worked! So the entire discussion (and all the frustration of trying different things) was, shall we say, not exactly necessary...
Thanks to all who responded for your thoughts and expertise -- I'm sure it'll come in handy at some point!
Public Service Announcement: If you're going to send someone a script to try, please make sure that script is active and will work! :)
So what I had tried first before even asking here (i.e. putting it in the footer tracking codes section) actually worked! So the entire discussion (and all the frustration of trying different things) was, shall we say, not exactly necessary...
Thanks to all who responded for your thoughts and expertise -- I'm sure it'll come in handy at some point!
Public Service Announcement: If you're going to send someone a script to try, please make sure that script is active and will work! :)
I think you may need to re-connect with your marketing guy and discuss the code you were provided. Inserting that line in your site will do nothing, as it doesn't even point to a real url where a script would be loaded from...
Sorry for the confusion. I edited the script location for privacy reasons. I didn't think the location of the script would be necessary just to determine where to place the code. Was I mistaken about that?
No, thats fine! It looked a bit generic and I hoped it wasnt the actual line you were given. That being said, have you tried placing it in an html block on page to see if it works?