3

I'm using the Sourcerer extension to send script to my header tags on specific pages to comply with the new gtag requirements of placing conversion tags in the head tags of pages that you want to count as a conversion in google adwords,

Is there a better way to put a script into the head tags of one page only?

  • 2
    Could you elaborate on what "better" means here? I presume you're already using addScript or addScriptDeclaration in an article or something which you could move from your sorcerer tags into a plugin (where you test the jinput for a match) or a module (which you'd just assign to the menu item) but I don't know if those would count as "better". – jamesgarrett Dec 1 '17 at 23:47
2

I love Regular Labs Sourcerer and use it on quite a few websites but if you only want to add code into the header area of a specific page, the easiest way to do this is to use Flexi Custom Code or Mod HTML (these are both free) or a similar module.

The advantage of using a module (rather than a plugin) means you can easily select which page or pages the code should be added to via the Menu Assignment tab.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.