Skip to main content

Adding Custom Code To Specific Pages in WordPress

Sharing is caring!

A new challenge presented itself, and I decided to document this because I’ve been doing it blindfolded, but many people might be a bit confused on how it’s done.  The task is to add a custom tracking code to specific pages in WordPress.

In my case, I need to add a custom tracking code from LinkedIn into the thank you page at bannerslanders.com (this one -> http://bannerslanders.com/thank-you)

You can use webhooks and php code to do it if you are a 31337 hacker, but if you are like me who likes things simple and fast…. then the easiest way is to install a wordpress plugin named Tracking Code Manager.  It’s awesome, because you just add the tracking code, then you paste a shortcode by editing the WP post itself and BAM you are done.

Here’s how:

  1.  Login to wordpress, and on the left hand side select Settings -> Tracking Code Manager
  2.  You should see the Add New Script page, if not click it on the top menu and then give this tracking code a link.   I wrote LinkedIn Tracking Code
  3. Paste the code, and select where/how it should be shown (for me it’s before the </BODY so i selected that)
  4. Click SAVE and now you will be presented with a list of the tracking codes where you can grab the shortcode.
  5. Copy the shortcode; my shortcode is   and head over to the page you want to add the code into.*Since I am tracking for conversions, aka people that filled out the contact us form that came from linkedin, I am adding this to the B&L thank you page over at http://bannerslanders.com/thank-you
  6. Paste in the code, and press update post and bam you are done.

That’s it pretty simple right?

 

Sharing is caring!

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

16 − 14 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.

shares