I’m using GP Premium and elemntor for my site, and I just affiliate to clickbus a program to sell bus tickets, but they want me to add the script below, my question is, where should I add it? is there an specific folder I should use? or should I just add it in every page I need it?, please let me know, I dont want to screw something up
<script>
!function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id + s)) {
js = d.createElement(s);
js.id = id + s;
js.src = “https://s3.amazonaws.com/clickbusmx-widget-v2/build/static/js/main.js”;
fjs.parentNode.insertBefore(js, fjs);
}
var cssId = ‘clickbus.main.css’; // you could encode the css path itself to generate id..
if (!document.getElementById(cssId))
{
var head = document.getElementsByTagName(‘head’)[0];
var link = document.createElement(‘link’);
link.id = cssId;
link.rel = ‘stylesheet’;
link.type = ‘text/css’;
link.href = ‘https://s3.amazonaws.com/clickbusmx-widget-v2/build/static/css/main.css’;
link.media = ‘all’;
head.appendChild(link);
}
}(document, “script”, “mx.com.clickbus.widget”);
</script>