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 conversion tracking not executed

  1. nicomollet
    Member

    Hello,

    I am trying to include a Google Adwords conversion tracking code into my confirmation message. I disabled autoformatting.
    But conversions are not executed somehow.

    The tracking code looks like this on the confirmation page:

    <!-- Google Code for Webcallback Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 1008917062;
    var google_conversion_language = "fr";
    var google_conversion_format = "2";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "kLj1CLKd2gMQxrSL4QM";
    var google_conversion_value = 0;
    alert('bbb');
    /* ]]> */
    </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/1008917062/?value=0&label=kLj1CLKd2gMQxrSL4QM&guid=ON&script=0"/>
    </div>
    </noscript>

    It looks like the closing CDATA tag is:
    /* ]]> */
    But should be:
    /* ]]> */
    I guess it has something to do with the conversion not executing?

    You can test the form here:
    http://www.talenco.com/nos-formations/etre-rappele/

    I hope you can help or fix the cdata closing tag problem.
    Thanks.

    PS: I want to use Text confirmation, not Page or Redirection.

    Posted 7 years ago on Monday October 15, 2012 | Permalink
  2. nicomollet
    Member

    Hmm the html formating didn't go well in my previous message, you should read:

    ******

    Hello,

    I am trying to include a Google Adwords conversion tracking code into my confirmation message. I disabled autoformatting.
    But conversions are not executed somehow.

    The tracking code looks like this on the confirmation page:

    <!-- Google Code for Webcallback Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 1008917062;
    var google_conversion_language = "fr";
    var google_conversion_format = "2";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "kLj1CLKd2gMQxrSL4QM";
    var google_conversion_value = 0;
    /* ]]& gt; */
    </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/1008917062/?value=0&label=kLj1CLKd2gMQxrSL4QM&guid=ON&script=0"/>
    </div>
    </noscript>

    It looks like the closing CDATA tag is:
    /* ]]& gt; */ (without space between & and gt)
    But should be:
    /* ]]> */
    I guess it has something to do with the conversion not executing?

    You can test the form here:
    http://www.talenco.com/nos-formations/etre-rappele/

    I hope you can help or fix the cdata closing tag problem.
    Thanks.

    PS: I want to use Text confirmation, not Page or Redirection.

    Posted 7 years ago on Monday October 15, 2012 | Permalink
  3. nicomollet
    Member

    Actually it's not related with Gravity Forms, but Wordpress engine edits cdata closing tags.
    See: https://core.trac.wordpress.org/ticket/3670

    wp-includes/pos-templates.php line 164:

    function the_content($more_link_text = null, $stripteaser = false) {
    	$content = get_the_content($more_link_text, $stripteaser);
    	$content = apply_filters('the_content', $content);
    	//$content = str_replace(']]>', ']]>', $content); // I had to remove this line
    	echo $content;
    }

    Now I have to check if this was the only problem and if conversion is now executed correctly.

    Posted 7 years ago on Monday October 15, 2012 | Permalink
  4. Please see this previous reply:
    http://www.gravityhelp.com/forums/topic/xhtml-validation-gf_apply_rules#post-43168

    I don't believe there is any way for us to fix this, as it's a core trac issue and a decision on the part of WordPress. Sounds like you need to add the tracking code in some other manner so that it's not affected by this WordPress issue.

    Posted 7 years ago on Monday October 15, 2012 | Permalink