Comments on: Tracking Twitter Traffic Redux https://www.leewillis.co.uk/tracking-twitter-traffic-redux/ Fri, 29 Oct 2010 10:42:17 +0000 hourly 1 https://wordpress.org/?v=6.7 By: Lee https://www.leewillis.co.uk/tracking-twitter-traffic-redux/#comment-813 Fri, 29 Oct 2010 10:42:17 +0000 http://www.leewillis.co.uk/?p=116#comment-813 In reply to David Wang.

Hi David,

To be honest, I’m not sure off the top of my head at what point this function gets called – so not sure what variables are available to grab the post ID from. You’d have to do some digging to check.

]]>
By: David Wang https://www.leewillis.co.uk/tracking-twitter-traffic-redux/#comment-812 Fri, 29 Oct 2010 10:32:33 +0000 http://www.leewillis.co.uk/?p=116#comment-812 How would you modify the plugin to include the slug as the utm_campaign variable? I found this snippet that gets the post slug:

$post_data = get_post($post->ID, ARRAY_A);
$slug = $post_data[‘post_name’];

But I’m not sure how I can integrate it into my function. Cheers

]]>