WordPress.org

Ready to get started?Download WordPress

Forums

GoogleAds Conversions support and raw HTML (7 posts)

  1. remvpn
    Member
    Posted 1 year ago #

    Hi,

    I'm trying to integrate the following code into one of my pages:

    <!-- Google Code for Trial - new Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = ????;
    var google_conversion_language = "en";
    var google_conversion_format = "3";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "???";
    var google_conversion_value = 2$;
    /* ]]> */
    </script>
    <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/????/?value=2$&label=?????&guid=ON&script=0"/>
    </div>
    </noscript>

    However instead the '/* ]]> */' im getting '/* ]]> */' in the html's source (and there are some other errors).
    I have used the Raw HTML plugin which fixed the added <p> but not this.
    Please help!

  2. remvpn
    Member
    Posted 1 year ago #

    However instead the '/* ]]> */' im getting:
    /* ]]> */
    in the html's source (and there are some other errors).

  3. remvpn
    Member
    Posted 1 year ago #

    However instead the '/* ]]> */' im getting:
    /* ]] & g t ; */ (i have inserted spaces for it to show here:))
    in the html's source (and there are some other errors).

  4. Adamstar1
    Member
    Posted 1 year ago #

    Have you tried validating your code at validator.w3.org

  5. remvpn
    Member
    Posted 1 year ago #

    No I didn't. But it's a copy paste from Google.
    And it gets screwed up by WP.

  6. You can't paste raw HTML like that into the WordPress post editor. It just doesn't work reliable as you see.

    Try using a plugin to insert that code into the footer.

    http://wordpress.org/extend/plugins/search.php?q=insert+footer

  7. bastien31
    Member
    Posted 1 year ago #

    Hi remvpn,

    I found this solution for this f*$รน$ problem :

    The annoying culprit is this little line in /wp-includes/post-template.php, which I once more commented out:
    $content = str_replace(']]>', ']]>', $content);

    Thanks to the guy who posted this answer.

    http://simon.xn--schnbeck-p4a.dk/wordpress-cdata-nightmare/

    I also use the preserved html tag plugin which works for all the other stuffs, except the ]]> problem.

    Hope it works for you.

    Bastien

Topic Closed

This topic has been closed to new replies.

About this Topic