So you want to track your conversion for adwords? Here is how you do it for woocommerce.
Get the Conversion Tracking Code from AdWords
Log into your AdWords account. Select “tools” then “Conversions”.
Next select “+ Conversions” and add one. You can see I added one called “purchases”.
When you click on the name your created it will give you a conversion code. I am clicking on purchases.
Go To WordPress and Enter Conversion Code
Now you want to go to your WordPress dashboard and open up your functions.php in your theme. It is better if you use a child theme so your changes are never overwritten. Put your tracking code in where it tells you too below. You do not need to get the order total but I will leave it in the code below if someone wants it.
add_action( 'woocommerce_thankyou', 'my_custom_tracking' ); function my_custom_tracking( $order_id ) { // Lets grab the order $order = wc_get_order( $order_id ); echo ' PUT YOUR CONVERSION TRACKING SCRIPT HERE LEAVE THE QUOTES '; }
Go To Appearance then Editor
Then Choose Theme Functions.php
The theme functions will be on the right hand side of the screen.
Enter Your Conversion Tracking Code and Save File
Make sure that you have your tracking code in there!!!
Congratulations you now have a conversion pixel installed so you can track your orders!
A1WEBSITEPRO Social Media Pages
Here are my social media pages, lets hook up!