• Resolved wpnoob01

    (@wpnoob01)


    Hi,

    I would like to set up a goal which is a button click. The button is part of another plugin and has the following class: .p3d-btn.p3d-btn-primary:nth-child(2)

    However, trying to use this class in the Burst goal setup I am getting an error:

    The character '.p3d-btn.p3d-btn-primary:nth-child(2)' can not be used.

    Alternatively, I can use a JS to fire each time the button is clicked:

    jQuery(document).ready(function(){

    jQuery('.p3d-btn.p3d-btn-primary:nth-child(2)').on('click', function(){

    console.log('Next button is clicked');

    })

    });

    But how to pass it to the Burst plugin?

    Would appreciate your help

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hessel de Jong

    (@hesseldejong)

    Hi @wpnoob01,

    Burst allows only class names. What you are trying to paste is a full CSS Selector.

    You can for example use just ‘.p3d-btn-primary’. You could add a class using jQuery or some other way.

    If that does not work for you please let me know and we’ll try to figure out a other solution!

    Kind regards,
    Hessel

    Thread Starter wpnoob01

    (@wpnoob01)

    Hi Hessel,

    Thanks so much for your prompt response. Unfortunately, neither of the suggestions worked.

    Using just ‘.p3d-btn-primary’ didn’t work. And adding a class using jQuery like follows:

    jQuery(document).ready(function(){
    jQuery('.p3d-btn.p3d-btn-primary:nth-child(2)').addClass('next-button');
    });

    And then using “next-button” class in Burst also did not work.

    Plugin Author Hessel de Jong

    (@hesseldejong)

    Hi @wpnoob01,

    From my perspective it seems like I just completed the goal. Can you check in the dashboard if that is the case?

    If not can you send us an error log to our email support[at]burst-statistics.com, and we’ll help you from there!

    Kind regards,
    Hessel

    Thread Starter wpnoob01

    (@wpnoob01)

    Yep! It shows now! I went ahead and tested it myself now and it did work this time. Not sure what’s changed, I didn’t do anything…

    I will have to check the button’s CSS selector though, as it triggers on the wrong button.

    Another thing I am curious about it, why it does not trigger if the button is clicked multiple times in the same session. Refreshing the page it does.

    Also, is there no a way to see the clicks per user?

    Thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Button Click Goal Setup’ is closed to new replies.