Support » Plugin: Simple Side Tab » Google Analytics Event Tracking

  • Resolved Griga_M

    (@griga_m)


    Hello!

    Everything is great with plugin, but it will much better if GA will work in.

    I have looked on your plugin code and found that you have GA event tracking function in it, but it’s not working. Trying find out why.

    Here is the code for tracking event from your plugin (as you we can see everything is ready to track on):

    if($alloptions[‘tracking’] == ‘1’) {
    $tracking = “onclick=\”_gaq.push([‘_trackEvent’, ‘CS_ContactInfo’, ‘Click’, ‘Side_WEB_Button_Telephone_Contact_1’]);\””;
    } elseif($alloptions[‘tracking’] == ‘2’) {
    $tracking = “onclick=\”ga(‘send’, ‘event’, ‘CS_ContactInfo’, ‘Click’, ‘Side_WEB_Button_Telephone_Contact_1’);\””;
    } else {
    $tracking = “”;
    }

    if(preg_match(‘/(?i)msie [7-8]/’,$_SERVER[‘HTTP_USER_AGENT’])) {

    // if IE 7 or 8

    // Write HTML to render tab

    echo ‘<div id=”rum_sst_tab” class=”rum_sst_contents less-ie-9 ‘ . $rum_sst_left_right_location . ‘”‘ . $tracking . ‘>’ . $rum_sst_text_for_tab . ‘</div>‘;

    } else {

    // if IE>8

    // Write HTML to render tab

    echo ‘‘ . $rum_sst_text_for_tab . ‘‘;

    }
    ______________________________________
    I did some changes in code to track me event, but I have not do any changes in functions.

    Can you help me with that. I need to track onClick events. In advance thank you for help.

    https://wordpress.org/plugins/simple-side-tab/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Google Analytics Event Tracking’ is closed to new replies.