WordPress.org

Ready to get started?Download WordPress

Forums

Shortcodes Ultimate
[resolved] How to use eventtracking within accordeon (4 posts)

  1. Toni Jonkers
    Member
    Posted 2 years ago #

    Hi Ultimate Shortcode lovers.

    Q:
    We use the accordeon to create a simple FAQ.
    We want to use event tracking to measure customer interest.

    Will the code below work?

    [spoiler title="<h4>Question</h4>"]
    Answer
    [/spoiler]

    Or will it conflict with the JS of the Plugin?
    Currently we are not able to test, due to the fact that GA is still being implemented.

    Also we do not have the JS skills to foresee and troubleshoot possible conflicts.

    If someone has previous experience with this and would be so kind to help us. It would be much appreciated.

    Regards,
    Toni Jonkers

    http://wordpress.org/extend/plugins/shortcodes-ultimate/

  2. Toni Jonkers
    Member
    Posted 2 years ago #

    I see that the code is displayed properly.
    The code is:

    [spoiler title="
    <h4><a href="javascript:void(0)" onClick="_gaq.push(['_trackEvent', 'FAQ', 'Advertise', 'eenmalige-maandkosten',, false]);">question</a></h4>
    "]
    answer
    [/spoiler]
  3. johnwolfe
    Member
    Posted 1 year ago #

    hi did you ever get this resolved? I am trying to achieve the same thing. Thanks

  4. Vladimir Anokhin
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    you can just hire js-coder and he will write for you code like this:

    jQuery(document).ready(function($) {
       $('.su-spoiler-title').on('click',function() {
          var title = $(this).text();
          _gaq.push(['_trackEvent', 'FAQ', title, 'eenmalige-maandkosten',, false]);
       });
    });

    No need to use ugly markup. Make it right.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic