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.
- Login to wordpress, and on the left hand side select Settings -> Tracking Code Manager
- 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
- Paste the code, and select where/how it should be shown (for me it’s before the </BODY so i selected that)
- Click SAVE and now you will be presented with a list of the tracking codes where you can grab the shortcode.
- 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
- Paste in the code, and press update post and bam you are done.
That’s it pretty simple right?