WordPress.org

Ready to get started?Download WordPress

Forums

EMC2 Popup Disclaimer
I am trying to track the "agree" link (2 posts)

  1. usascholar
    Member
    Posted 1 year ago #

    I am using Slimstat plugin (http://goo.gl/d3Jp)

    and I was trying to attach it's tracking function to the "agree" button on the popup, so that it can record the IP of people agreeing to the terms.

    The Slimstat says it works by adding the javascript function to the onclick event of a link, (see the faq here: http://goo.gl/ZZLCx)

    I am trying to do this and make it work, however, it appears I get a server error when I try to add it to the "emc2pdc-admin.php" file, at this location:

    echo '<p class="linkwraps"><a class="fancybox agree" href="#">'.$settings['accept_text'].'</a> <a class="fancybox disagree" href="'.$settings['redirect_url'].'">'.$settings['decline_text'].'</a></p>';

    I am changing the code as such:
    echo '<p class="linkwraps"><a class="fancybox agree" href="#" onclick="if(typeof ss_track == 'function') ss_track(event, 5, 'User Agreed To Clickwrap Privacy Policy And Terms And Conditions');">'.$settings['accept_text'].'</a> <a class="fancybox disagree" href="'.$settings['redirect_url'].'">'.$settings['decline_text'].'</a></p>';

    Can you help to see if there is something I may be missing?

    Thank you :)

    http://wordpress.org/extend/plugins/emc2-popup-disclaimer/

  2. Eric McNiece
    Member
    Plugin Author

    Posted 1 year ago #

    A couple of ideas.

    Syntax looks fine, but sometimes you don't catch it until it's throwing errors. Can you link to your site, or post the error you're getting?

    The only other thing that comes to mind would be an enqueue conflict where the scripts load at the wrong times. Even then, it's an onclick event... so yeah, I'm not really sure.

    Link/error please!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic