Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    The JS code is only a part of what needs to be added to your page. At the beginning of the article it says: “To create this audience type, you have to add a piece of code to the onClick attribute of your JavaScript button.”

    Try adding the following JS code instead:

    jQuery(document).ready(function($) {
        $("a.single_add_to_cart_button").click(function(e) {
            try{
                __adroll.track("pageView", {"segment_name":"my_code_id_here"})
            } catch(err) {} 
        });
    });
    • This reply was modified 3 years, 4 months ago by Diana Burduja.
    Thread Starter Bertrand66

    (@bertrand66)

    Thanks @diana_burduja, I have installed the code and I am testing it.

    Thread Starter Bertrand66

    (@bertrand66)

    I confirm, it’s working :). Many Thanks Diana !

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Event on a button click’ is closed to new replies.