0

How to add the google ad conversion tracking code into the thank you page (Contact form7 - Redirected thank you page) in WordPress. I’ve tried to place the tracking code on this specific page but instead, the code is placed on every page of the website.

  • May I know how have you tried to add the code in that specific page? – made2popular Jul 2 at 11:13
  • Tried to paste code through header.php, – jeens Jul 2 at 11:23
  • Have you defined the condition to check if the page is thank-you page? – made2popular Jul 2 at 11:27
0

You can try to add conditional code like this:

<?php if (is_page ('thank-you')){ ?>

  // script goes here

<?php } ?>

NOTE: Replace the thank-you with your page slug or you can even replace it with the page ID and add your tracking code just below //script goes here.

One more way is to do it via plugin, here is a link to such plugin https://wordpress.org/plugins/oh-add-script-header-footer/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.