• Resolved Karol

    (@somrafka)


    Hello, first of all I would like to say that the plugin is really good, the only thing I would need help with is to get the data to google ads conversions when the user clicks the button.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Spencer Finnell

    (@spencerfinnell)

    Hello @somrafka, I’m so glad you are enjoying the plugin.

    To track conversions you could attach a click event to the payment button in JavaScript, and execute your tracking code:

    <script>
    jQuery( '.simpay-payment-btn' ).on( 'click', function() {
      // track
    } );
    </script>
    

    However, a Stripe Checkout session can be abandoned so at that point it has not necessarily converted. Instead, there is a PHP hook that runs one time when the payment confirmation is viewed:

    <?php
    add_action(
      'simpay_payment_receipt_viewed',
      function( $payment_confirmation_data ) {
        // Track.
      }
    );
    

    I hope that helps! Please let me know if you have any further questions.

    Plugin Author Spencer Finnell

    (@spencerfinnell)

    Hello @somrafka,

    Since we haven’t heard back from you, I am going to close this ticket.

    Please do follow up again if needed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Google Ads Help’ is closed to new replies.