Created
March 7, 2022 12:07
-
-
Save wpflames/27eef792a6a0e57413de0401a99b21c8 to your computer and use it in GitHub Desktop.
Event snippet for conversion page
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 | |
| // ========================================================================= | |
| // CONVERSION TRACKING THANK YOU PAGE | |
| // ========================================================================= | |
| function add_conversion_tracking_thank_you_page() { | |
| echo ' | |
| <!-- Event snippet for https://**********.com/ conversion page --> | |
| <script> | |
| gtag("event", "conversion", { | |
| "send_to": "AW-***********/***************", | |
| "transaction_id": "" | |
| }); | |
| </script> | |
| '; | |
| } | |
| add_action( 'woocommerce_thankyou', 'add_conversion_tracking_thank_you_page' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment