• Resolved franksontech

    (@franksontech)


    I just installed the latest version of the Social Media Tracking plugin (v2.2) on WP 3.2.1. I noticed that the twitter button was not displaying where it should – I only got a text link. Here’s what I did to get it to show up.

    1. Go to Plugins > 42functions Social Media Tracking > Edit
    2. Click on social-media-tracking/buttons/Twitter.php
    3. Find the section of code that says

      return '<a href="http://twitter.com/share" class="twitter-share-button" data-url="'.get_permalink().'" data-text="'.get_the_title().'" data-count="'.$this->option('button').'">Tweet</a>';

    4. change it to

      return '<a href="http://twitter.com/share" class="twitter-share-button" data-url="'.get_permalink().'" data-text="'.get_the_title().'" data-count="'.$this->option('button').'">Tweet</a>' . "\n" . '<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>';

    5. Save your changes

    If you know PHP, you’ll probably notice that I just appended a nextline character and <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> to the string.

    sources:
    http://www.socialmediaexaminer.com/how-to-track-tweets-facebook-likes-and-more-with-google-analytics/

    I found a snippet of sample code for embedding a twitter button in the above link, which I used as the basis for this fix. It also contains a link to this plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author BlueElevation.

    (@42functions)

    Dear Franksontech,

    Thank you for the feedback, I will look into it as soon as possible. We’ve must have overlooked it since we’re currently testing in 3.3.1. It’s still strange do.

    Kind regards,

    42functions

    Plugin Author BlueElevation.

    (@42functions)

    Releasing a quick fix later today

    Thread Starter franksontech

    (@franksontech)

    You’re welcome! Btw, the google+ button wasn’t showing for me as well. I didn’t fiddle with it though because I didn’t need it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Social Media Tracking] Twitter button missing.. and the fix I made’ is closed to new replies.