Created
July 21, 2026 20:11
-
-
Save greenhornet79/2f0429b3462ec1128b2d4936890fa006 to your computer and use it in GitHub Desktop.
custom event to Leaky Paywall Insights
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'leaky_paywall_rest_after_create_subscriber', 'my_custom_signup_event', 10, 3 ); | |
| function my_custom_signup_event( $user_id, $request, $level ) { | |
| if ( ! function_exists( 'leaky_paywall_track_event' ) ) { | |
| return; | |
| } | |
| leaky_paywall_track_event( | |
| 'Custom Signup Form', | |
| $user_id, | |
| array( | |
| 'source_form' => 'Newsletter Landing Page', | |
| 'campaign' => $request->get_param( 'campaign' ), | |
| 'referring_page' => $request->get_param( 'referring_page' ), | |
| ) | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment