WooCommerce
In order to integrate with WooCommerce one needs to place Offer18 Image Pixel in WooCommerce (WordPress).
WooCommerce Integration
There are two ways to add Offer18 Image Pixel to WooCommerce:-
Option 1 : WordPress Plugin
One can use WordPress plugin "WooCommerce Conversion Tracking" by weDevs.
Steps to follow:
Login to the WordPress Admin dashboard.
Go to "Plugins" and search "WooCommerce Conversion Tracking".
Install and activate "WooCommerce Conversion Tracking" by weDevs.
Go to Conversion Tracking (sub-menu to the WooCommerce tab).
Enable "Custom" and Place Offer18 Pixel in "Successful Order."

Go to Save Changes
One can receive dynamic values using tokens provided by the Plugin. For Example: &sale (Offer18) can be added to an Image pixel containing {order_subtotal}
Example Image pixel with sale parameter
<img src="https://example.o18.click/p?mid=000&t=i&gb=1&sale={order_subtotal}" width="0" height="0">
Video Tutorial - WooCommerce Integration
Option 2 : Custom Configuration
One can configure the Conversion Tracking Syntax in a custom configuration of the WordPress. Offer18's Conversion Tracking Syntax is given below.
Conversion Tracking Syntax
add_action('woocommerce_thankyou', 'custom_track_o18');
function custom_track_o18($order_id)
{
$order_data = wc_get_order($order_id);
$total_amount = $order_data->get_subtotal();
$currency = $order_data->get_currency();
$order_number = str_replace('#', '', $order_data->get_order_number());
echo '<img src="https://[domain]/p?m=[account_id]&t=i&gb=1&sale=' . $total_amount . '&adv_sub1=' . $order_number . '¤cy='. $currency.'" width="0px" height="0px">';
}
Steps to follow
Login to the WordPress Admin dashboard.
Go to Appearance ยป Theme File Editor.
Open the functions.php file.
Place Offer18's Conversion Tracking Syntax in this file.

Go to "Update File."
Last updated
Was this helpful?