PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Google AdSense in Content Template

  1. I'm using this form - http://www.travelquotes.co.za/list-as-a-supplier - to create posts.

    I have some Google Adsense script inside the "Description" (Post Body) Content Template. See code - http://www.pastie.org/1731431

    The form works 100% but the Adsense script seems to get lost. It doesn't show up in the post and I have to go back to the post and insert it manually

    Posted 8 years ago on Tuesday March 29, 2011 | Permalink
  2. So the adsense script itself doesn't get stored with the post data but everything else does?

    Posted 8 years ago on Tuesday March 29, 2011 | Permalink
  3. Yes Carl...

    All data is fine accept the part between <script> and </script> doesn't get saved.

    Posted 8 years ago on Tuesday March 29, 2011 | Permalink
  4. We'll take a look and try to replicate it locally and then see what is going on.

    Posted 8 years ago on Tuesday March 29, 2011 | Permalink
  5. I used what was in your pastie.org snippet in a content template and here is a screenshot of the post that was created, I viewed the post in the post editor and viewed it in the HTML mode:

    http://grab.by/9KOl

    It looks like the javascript code snippet is correct on my end from the data the content template created. See the screenshot above.

    Posted 8 years ago on Tuesday March 29, 2011 | Permalink
  6. Thx Carl

    But you will see that the code you used is not exactly the same as what I had in the snippet. You had extra [[CDATA[[ and ]] code in yours.

    I've added this and it is now working. Strange why? Cause I used the code exactly as how Adsense gave it to me.

    Where did you get the extra code?

    Posted 8 years ago on Wednesday March 30, 2011 | Permalink
  7. I cut-n-paste the code from Pastie into the content template so i'm not sure where the extra CDATA came from because I didn't make an edits to the code myself.

    Posted 8 years ago on Wednesday March 30, 2011 | Permalink