cancel
Showing results for 
Search instead for 
Did you mean: 

Google Publisher Tags Code in a Static Block

SOLVED

Google Publisher Tags Code in a Static Block

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Google Publisher Tags Code in a Static Block

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.

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

View solution in original post

2 REPLIES 2

Re: Google Publisher Tags Code in a Static Block

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.

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: Google Publisher Tags Code in a Static Block

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.