JavaScript Conversion Tracking for WooCommerce

WooCommerce is the most popular e-commerce plugin for WordPress. The conversion tracking code can either be hardcoded into your WordPress theme or installed using third-party plugins. In this article, you'll learn how to use plugins to install the conversion tracking code.

Note: FlexOffers.com did not develop the plugins suggested in this article, and FlexOffers.com cannot be held responsible for their use.

 

Install Conversion Tracking Plugins

1. Log into your WordPress admin account and go to Plugins > Add New.

1_-_4413804559892_-_Add_New_WooCommerce_WordPress_Plugin.png

 

2. Search for the “Header Footer Code Manager” plugin, click Install Now, and then click the Activate button that appears.

2_-_4413804559892_-_Install_Header_Footer_Code_Manager_Plugin.png

 

3. Search for the “WooCommerce Conversion Tracking” plugin, click Install Now, and then click the Activate button that appears.

3_-_4413804559892_-_Install_WooCommerce_Conversion_Tracking_Plugin.png

 

Add Entry Page Code

1. In a new browser tab, log into your AdvertiserPro account and go to Settings > Conversion Tracking.

4_-_4413804559892_-_Go_to_Conversion_Tracking_Page.png

 

2. Click the Get JavaScript button.

5_-_4413804559892_-_Click_Get_Javascript_Button.png

 

3. Select your program and click Next.

6_-_4413804559892_-_Select_Your_Program.png

 

4. Select the Entry Page Code and copy it.

7_-_4413804559892_-_Copy_Entry_Page_JavaScript_Code.png

 

5. In your WordPress account, go to the Plugins page, locate the Header Footer Code Manager plugin, and click Settings.

8_-_4413804559892_-_Go_to_Header_Footer_Code_Manager_Plugin_Settings.png

 

6. Click Add New Snippet.

9_-_4413804559892_-_Click_Add_New_Snippet.png

 

7. Type in a Snippet Name and select the following settings. Snippet Type: JavaScript, Site Display: Site Wide, Location: Footer, Device Display: Show on All Devices, and Status: Active.­­­­ We suggest not excluding any pages or posts to avoid conversion tracking issues.

10_-_4413804559892_-_Type_in_Snippet_Settings.png

 

8. In the Snippet/Code section, paste the Entry Page Code that you copied from AdvertiserPro and click Save.

11_-_4413804559892_-_Paste_Entry_Page_JavaScript_Code_and_Click_Save.png

 

Add Confirmation Page Code

1. Go back to the Entry Page Code in AdvertiserPro and click Next.

 

2. Edit the variables at the top of the page to reflect the following. Order Amount: '{order_total}', Order Number: '{order_number}', Coupon: '{used_coupons}', Order Currency: '{currency}', and Geo: '{geo}'.

Notes: Be sure to include the quotation marks around each variable. Geo is not able to be tracked in this plugin.

 

3. Select the Confirmation Page Code and copy it.

 

4. In your WordPress account, go to the Plugins page, locate the WooCommerce Conversion Tracking plugin, and click Settings.

14_-_4413804559892_-_Go_to_WooCommerce_Conversion_Tracking_Plugin_Settings.png

 

5. Locate the Custom section and click the toggle to activate it.

15_-_4413804559892_-_Activate_Custom_Integration_Settings.png

 

6. Paste the Confirmation Page code into the Successful Order field.

16_-_4413804559892_-_Paste_Confirmation_Page_JavaScript_Code.png

 

7. Select the “order_items” section of the code, delete it, and click Save Changes.

Create a Test Transaction

In your AdvertiserPro account, go to Settings > Tracking Diagnosis and follow the instructions to create a test transaction.

Note: Be sure to leave the Tracking Diagnosis page open while you create the test transaction and go back to that page to confirm that the test was successful.

 

Articles in this section