Hi there. How and where do I paste Google Adwords Conversion Tracking Code in the 'Order Received - Thank You' page?
Google Adwords Conversion Tracking Code
6 posts from 3 voices-
Posted 8 months ago #
-
Hi,
Go to wp-content\plugins\woocommerce\templates\checkout and open thankyou.php.
Regards,
IsmaelPosted 8 months ago # -
Thanks Ismael.
I downloaded the file, open with Notepad.
Sanskrit is easier to read than this.
Sorry, me zero experience!Do I paste the tracking code between
</p> <?php endif; ?>Warm regards
JonasPosted 8 months ago # -
Hi,
Maybe you can find this code
<li class="method"> <?php _e('Payment method:', 'woocommerce'); ?> <strong><?php echo $order->payment_method_title; ?></strong> </li>Paste this code below
<li class="google-adwords"> <?php _e('Google Adwords Tracking Code:', 'woocommerce'); ?> <strong>PASTE THE CODE HERE</strong> </li>Regards,
IsmaelPosted 8 months ago # -
Hi - found this useful bit too - so do the above first then do the following (comment out that bit as it says below).
Unfortunately there is still a problem with WordPress 3.5.1 that has been documented for 6 years which replaces the end of the CDATA section "/* ]]> */" with "/* ]]> */". The quick fix for this is to comment out the offending code in /wp-includes/post-template.php.
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); */Google has a neat little extension for Chrome, Tag Assistant, which allows you to check that your Google code snippets are working on the displayed page. I ran that on the Order Received page and everything was finally functioning.
I got it working.
Posted 1 month ago # -
Hey, oneilldesign,
Thank you for the tip. Very helpful. :)
Regards,
IsmaelPosted 1 month ago #
Reply
You must log in to post.














