Adding Custom Code To Specific Pages in WordPress

Share this post and enter to win 1 on 1 consulting worth $2000!

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 ManagerAdding Custom Code To Specific Pages in Wordpress
  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 CodeAdding Custom Code To Specific Pages in Wordpress
  3. Paste the code, and select where/how it should be shown (for me it’s before the </BODY so i selected that)Adding Custom Code To Specific Pages in Wordpress
  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 [tcm id=”1″]  and head over to the page you want to add the code into.Adding Custom Code To Specific Pages in Wordpress*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?

 

Share this post and enter to win 1 on 1 consulting worth $2000!

iAmAttila is a serial entrepeneur that started performance affiliate marketing in 2008 building and ranking sites. After the google humminbird update made SEO ranking way harder he switched to paid advertising in 2012. Ever since switching to paid ads, he has spent over 8 figures in ad spend promoting a variety of verticals and adapting to new changes and challenges as they come up. on iAmAttila.com, the blog he shares up to date information, tips and tricks that work and helps readers learn about new affiliate marketing opportunities. When he's not busy working (although he works 12-14 hours each day) he enjoys traveling with his family, playing with his dogs, BBQ, movies and learning new stuff.

Leave a Reply

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

two × 4 =

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