Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- == Code from page ==
- {% includeJsFile "http://craft/js/tracking.js" %}
- {% set myJs %}
- loadScript("{{entry.title}}");
- {% endset %}
- {% includeJs myJs %}
- == included js==
- function loadScript(entryTitle){
- var script = document.createElement('script');
- script.innerHTML = "fbq('track',this.entryTitle)";
- document.body.prepend(script);
- console.log('entryTitle: ' + entryTitle);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement