Hi I am trying to put a GPT code in a Static block to display a client's banner.
Whenever I put the code in, Magento is changing the code and I can't do anything therefore ads are not showing.
Example:
This code is changing
<script src="http://www.googletagservices.com/tag/js/gpt.js">
googletag.pubads().definePassback('/8786/Banner-Web', [300, 250])
.setTargeting("tag", "xaskiddksadksoaoidjsaui")
.display();
</script>
TO THIS
<p>
<script type="text/javascript" src="http://www.googletagservices.com/tag/js/gpt.js">// <![CDATA[
googletag.pubads().definePassback('/8786/Banner-Web', [728, 90]) .setTargeting("tag", "xaskiddksadksoaoidjsaui") .display();
// ]]></script>
</p>
Please help on how to make this work
thanks
Solved! Go to Solution.
Hi @WYamout
Try to add a phtml file in that static block and add the java script code in the phtml file.
{{block type="core/template" name="custom" template="cms/custom.phtml"}}
You have to create a custom.phtml file in your theme under cms folder.
Hi @WYamout
Try to add a phtml file in that static block and add the java script code in the phtml file.
{{block type="core/template" name="custom" template="cms/custom.phtml"}}
You have to create a custom.phtml file in your theme under cms folder.
awesome thanks
@Mukesh Tiwari wrote:Hi @WYamout
Try to add a phtml file in that static block and add the java script code in the phtml file.
{{block type="core/template" name="custom" template="cms/custom.phtml"}}You have to create a custom.phtml file in your theme under cms folder.