WordPress.org

Forums

Google Maps WordPress Store Locator
[resolved] Tracking code on button (4 posts)

  1. Melusine29
    Member
    Posted 2 years ago #

    Hi

    Is it possible to put a tracking code on "addressSubmit" button and retrieve the value of the input "addressInput"?

    Thanks

    http://wordpress.org/plugins/store-locator/

  2. Melusine29
    Member
    Posted 2 years ago #

    Nobody ?

  3. Gaerwn
    Member
    Posted 2 years ago #

    I'm not sure, but maybe it will work for tracking:
    open /wp-content/plugins/store-locator/sl-functions.php and on line 1208, replace

    $button_style.=" onclick=\"showLoadImg('show', 'loadImg');\"";

    with

    $button_style.=" onclick=\"_gaq.push(['_trackEvent', 'Locations', 'Search locations']);\"";

    Location is the event category and Search locations is the action

    Use .val() if you want to retrieve the value of an input field:
    .val() | jQuery API Documentation

  4. Melusine29
    Member
    Posted 2 years ago #

    Ok thanks. it doesn't work - probably because of the many quotes and double-quotes ..
    It's okay, my client does not want this function anyway!
    Thank you for your help

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.