I’m trying to get Google Analytics Code to work on the thank-you page after customer has filled in the contact form and I’ve tried putting it in the thank-you page which is in the pages under admin in WordPress backend using HTML tab but it seems to generate unnecessary p and br tags in between codes especially before closing tag. I’m not sure whether that is causing the issue or not.
Is there a way we can do this for just one page?
I’m trying to get Google Analytics Code to work on the thank-you page after
Share
I’m not 100 % sure whether it’s possible at all to insert javascript with the tinyMCE Editor of WordPress.
If that’s true, then you can try the following:
Get the posts’ ID: Look at the linking in your admin menu when you are in the view where you can see all your posts, e.g.
http://www.your-url.com/wp-admin/post.php?post=796&action=edit
796 would be your ID here.
Enter the following in your header.php of your wordpress theme (to find at /wp-content/themes/theme-name):
.
Replace 796 with your ID here, and put your analytics code in between the PHP code.