Wordpress/Google Conversion Tracking Issues

14 replies
I'm having issues with Google conversion tracking working properly on my WordPress site.


It has been authenticated but it can't "verify" because of a code problem.

I've gone back and forth with Google support and they aren't sure how to help me. I've also been to the Wordpress forums w/no solution yet.


On my thank you page which is where the conversion tracking goes is here.
Thank You

Here is the exact html I have for this page.
---------------------------------------------------------------------
Thank you for purchasing our wonderful ebook! It will totally change the way you think about kids exercise and nutrition. Please check your email shortly to receive your ebook.


You will be billed by our company "Gregorio" which will show up on your statement. You will receive a receipt and order will be emailed to you.

If you have any questions about this product please feel free to contact me.


info@myfamilyexercise.com

<!-- Google Code for kids exercises Conversion Page -->
<code><script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1056662689;
var google_conversion_language = "en_US";
var google_conversion_format = "1";
var google_conversion_color = "ffffff";
var google_conversion_label = "7KkKCP-ARxChye33Aw";
var google_conversion_value = 0;
/* ]]> */
</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/1056662689/?label=7KkKCP-ARxChye33Aw&guid=ON&script=0"/>
</div>
</noscript>
</code>

---------------------------------------------------------------------
Looks fine right? Now look at view source. The /* ]]> */ has turned into
/* ]]&gt; */



Also, look at the padding that was created between my last sentence and the Facebook widget. I've got to be doing something wrong with the code.

Any thoughts?


Thank you
#conversion #issues #tracking #wordpress or google
  • Profile picture of the author kernelpaniker
    That' the adwords code right?
    Are you adding the code within the WordPress Page? Like where you add the page content? Or are you editing the Page Template (page.php)?
    {{ DiscussionBoard.errors[3306749].message }}
    • Profile picture of the author wiseworks
      Originally Posted by kernelpaniker View Post

      That' the adwords code right?
      Are you adding the code within the WordPress Page? Like where you add the page content? Or are you editing the Page Template (page.php)?
      Yes, adwords code for conversions.

      I'm adding it right to the Wordpress page. Maybe that's my issue? Where would I find my thank you page template so I can add the code there?

      Thank you for responding.
      {{ DiscussionBoard.errors[3306855].message }}
      • Profile picture of the author kernelpaniker
        Well there is a page.php under Appearance>Editor. But that is the template for all of your WordPress pages.

        Does the Adwords code need to be placed in a specifica area? Liek with the <head></head> area of a page?

        Try this, if you are on the page (where you enter the content for the page) within WordPress there may be an "HTML" tab on the box where you can enter text and images, etc. Paste the Adwords code in while in "HTML editor" mode. That may be your problem.
        {{ DiscussionBoard.errors[3306913].message }}
  • Profile picture of the author wiseworks
    It says this in Google in regards to where to past the code.

    "Paste the conversion tracking code into the source of your action page."

    "<body>

    Paste the code between the body tags of your conversion pages.

    </body>"


    The only thing I see remotely close to what you're referring to in HTML mode is the button which says, "CODE". I did that earlier. You can see in the code I pasted there is <code> and </code>

    Maybe I put it in the wrong place?
    {{ DiscussionBoard.errors[3307423].message }}
  • Profile picture of the author Istvan Horvath
    Never ever add this type of code to your content!

    You should always edit the template file used to display that specific content.
    Signature

    {{ DiscussionBoard.errors[3308812].message }}
  • Profile picture of the author wiseworks
    If I edit the template file will that mean my google conversion tracking code will be on every page?
    {{ DiscussionBoard.errors[3308833].message }}
    • Profile picture of the author wiseworks
      Okay, so I added the Creative Clans Embed Script and added the conversion tracking code to my thank you page. Let's see if that works.

      Anybody is welcome to chime in and let me know if there is a better way to add Google conversion tracking to a Wordpress page without having to code too much.
      {{ DiscussionBoard.errors[3321440].message }}
      • Profile picture of the author kernelpaniker
        If I remember adwords correctly, the conversion code was not "keyword" of "campaign" specific. So you should be able to safely add it to the "Page Template" (page.php) in WordPress.

        If you are logged in to the Admin area of WordPress:
        Appearance > Editor
        Click on Page Template (page.php) in the right column.
        You may just want to add it right before the </body>.
        {{ DiscussionBoard.errors[3323859].message }}
        • Profile picture of the author wiseworks
          Originally Posted by kernelpaniker View Post

          If I remember adwords correctly, the conversion code was not "keyword" of "campaign" specific. So you should be able to safely add it to the "Page Template" (page.php) in WordPress.

          If you are logged in to the Admin area of WordPress:
          Appearance > Editor
          Click on Page Template (page.php) in the right column.
          You may just want to add it right before the </body>.
          Would this still give me an accurate count of real conversions once they buy and go to the thank you page?
          {{ DiscussionBoard.errors[3325400].message }}
  • Profile picture of the author wiseworks
    There actually aren't any <body> tags on my page.php file. Not sure where to place the google code.

    <?php get_header(); ?>

    <!-- #content Starts -->
    <?php woo_content_before(); ?>
    <div id="content" class="col-full">

    <div id="main-sidebar-container">

    <!-- #main Starts -->
    <?php woo_main_before(); ?>
    <div id="main">

    <?php if (have_posts()) : $count = 0; ?>
    <?php while (have_posts()) : the_post(); $count++; ?>

    <!-- Post Starts -->
    <?php woo_post_before(); ?>
    <div <?php post_class(); ?>>

    <?php woo_post_inside_before(); ?>

    <h1 class="title"><?php the_title(); ?></h1>

    <div class="entry">
    <?php the_content(); ?>
    </div><!-- /.entry -->

    <?php edit_post_link( __('{ Edit }', 'woothemes'), '<span class="small">', '</span>' ); ?>

    <?php woo_post_inside_after(); ?>

    </div><!-- /.post -->
    <?php woo_post_after(); ?>

    <?php $comm = get_option('woo_comments'); if ( 'open' == $post->comment_status && ($comm == "page" || $comm == "both") ) : ?>
    <?php comments_template(); ?>
    <?php endif; ?>

    <?php endwhile; else: ?>
    <div class="post">
    <p><?php _e('Sorry, no posts matched your criteria.', 'woothemes') ?></p>
    </div><!-- /.post -->
    <?php endif; ?>

    </div><!-- /#main -->
    <?php woo_main_after(); ?>

    <?php get_sidebar(); ?>

    </div><!-- /#main-sidebar-container -->

    <?php get_sidebar('alt'); ?>

    </div><!-- /#content -->
    <?php woo_content_after(); ?>

    <?php get_footer(); ?>
    {{ DiscussionBoard.errors[3328824].message }}
  • Profile picture of the author Istvan Horvath
    None of the normally coded themes would have the body and /body tags in them. If anybody expects those to be in the page.php template - doesn't know WP.

    Put it anywhere because the code from your page.php WILL BE between the <body> and </body> when WP puts together the page.
    Signature

    {{ DiscussionBoard.errors[3329510].message }}
  • Profile picture of the author carrot
    Open your page.php file in any text editor.
    Delete the code you recently added, and save it.
    Then save a copy as page-thankyou.php

    Add this at the very top:

    <?php /* Template Name: thankyou page
    */ ?>

    Then directly underneath the '<?php get_header(); ?>' line add your google code.
    Save it again, and upload it to your theme directory.

    In the wp admin, select pages > edit > your thankyou page, and on the right hand side in the edit page screen, see the option [page template]. Click the dropdown and select 'thankyou page'.

    Done.
    {{ DiscussionBoard.errors[3334846].message }}

Trending Topics