Support » Plugin: WordPress Popular Posts » Ananlytics events

  • Resolved Okoth1

    (@okoth1)


    Hi Hector,

    I’ve forgotten if I’ve asked you before, but will there be be an option in the future to see the clicks on the widget links in Analytics?

    After every plugin update I modify your plugin code. class-wordpress-popular-posts-output.php line 248 will become this
    . "<a " . ( $is_single == $postID ? '' : "href=\"{$permalink}\"" ) . " title=\"{$post_title_attr}\" class=\"wpp-post-title\" target=\"{$this->admin_options['tools']['link']['target']}\" onClick=\"ga('send', 'event', 'Widget WPP', '{$post_title} Click', 'Clicked');\">{$post_title}</a>\n"
    Would be great if it’s already there permanently 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hey there, it’s been a while!

    You can use either of these solutions to customize WPP’s HTML output and forget about making changes directly to the plugin for good 😛

    For example, using the built-in Custom HTML Markup feature from the widget:

    1. Go to Widgets > WordPress Popular Posts.
    2. Check the Use custom HTML Markup option under HTML Markup settings and hit Save to apply changes.
    3. Set Post HTML Markup to <li>{thumb} <a href="{url}" onClick="ga('send', 'event', 'Widget WPP', '{text_title} Click', 'Clicked');">{text_title}</a></li>
    4. Hit the Save button again to apply changes.
    • This reply was modified 7 months, 3 weeks ago by  Hector Cabrera. Reason: Removed dollar sign from {text_title}

    Thanks Hector. Didn’t know the options was there. It’s a very welcome one!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ananlytics events’ is closed to new replies.