• Hi,

    Right now, I’m adding an event tracking code to the file includes/template_thumbnails.php. Line 30-31 look like this:

    $pagetitlee = get_the_title();
    $output .= "<a class='yarpp-thumbnail' href='" . get_permalink() . "' title='" . the_title_attribute('echo=0') . "' onClick='_gaq.push(['_trackEvent', 'YARPP', 'Single Page thumb $pagetitlee', 'Clicked',, false]);'>" . "\n";

    It works well, but the disadvantage is that with the next plugin update I have to add it again.

    Is there a better way of doing this?

    Thanks

    https://www.ads-software.com/plugins/yet-another-related-posts-plugin/

Viewing 3 replies - 16 through 18 (of 18 total)
Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Adding event tracking’ is closed to new replies.