Skip to main content

Seamless Woo-Commerce Integration with Trackier Platform

This article will provide a detailed guide about integrating Trackier with the WooCommerce platform via Web SDK, enabling seamless tracking, analytics.

Updated over a week ago

Overview

If you are looking forward to integrating the Trackier platform with the WooCommerce platform to fetch out the data (conversions, sale amounts, etc.), we can integrate via Web SDK for seamless tracking on both the ends.

Important :

We suggest using the Web SDK integration method to track all the orders seamlessly.

Woo Commerce Integration Video


Integrating via web-sdk

Step 1: To Install Plugins

To add scripts easily, we will need to install the following plugins:

Seamless Woo-Commerce Integration with Trackier Platform


Links to install plugins

Step 2: Place Header Script

Place the script after the <body> tag, as mentioned below:

Seamless Woo-Commerce Integration with Trackier Platform

<script>

window.TrackierWebSDK.init()

</script>


Step 3: Place Thank You page Script

We will do this with the help of code snippets. Code Snippets > Add a snippet and execute a function on every page.

Seamless Woo-Commerce Integration with Trackier Platform

/**

* full list methods and property that can be accessed from $order object

*/

/**

* Trackier Order tracking pixel for woo-commerce

*/

add_action("woocommerce_thankyou", "trackier_thank_you_script", 20);

if (!function_exists("trackier_thank_you_script")) {

function trackier_thank_you_script($order_id)

{

if ($order_id <= 0) {

return;

}

$order = wc_get_order($order_id);

$isPassing = $order instanceof WC_Order;

if (!$isPassing) {

return;

}

$order_id = $order->get_id(); // order id

$order_key = $order->get_order_key(); // order key

$order_total = $order->get_total(); // order total

$order_currency = $order->get_currency(); // order currency

$jsTag = sprintf(

'<script type="text/javascript">window.TrackierWebSDK&&window.TrackierWebSDK.trackConvForBrand("TRACKING_DOMAIN","ADV_UNIQUE_ID",{sale_amount:%d,txn_id:"%s",currency:"%s",is_iframe:!0});</script>',

$order_total,

$order_id,

$order_currency

);

echo $jsTag;

}

}

Pro-Tip ( Important )

To use Trackier web sdk checkbox

  • It is mandatory to follow Step 2, which is to place static code (init) on all the landing pages in order to avoid any discrepancies and difficulties.

  • If you are selecting the trackier web SDK option in the tracking link section, then you have to enable the UTM campaign check toggle from the basic campaign settings to ensure seamless tracking on both ends.

    Seamless Woo-Commerce Integration with Trackier Platform

  • Web SDK for GA ( Highly Recommended) is the most reliable version of Web SDK.

    Seamless Woo-Commerce Integration with Trackier Platform



Integration Testing

Once the integration process has been completed, Trackier allows you to make a test conversion on click and conversion level. You can navigate to the campaign > generate the test link and make a test on the campaign.

Note: Remember to replace the TRACKING_DOMAIN and ADV_UNIQUE_ID.This Information is unique for every user which you will be able to find on the panel itself.Please refer to the screenshot attached.

Seamless Woo-Commerce Integration with Trackier Platform

Automations<<E-commerce<<Integrations<<Woo-commerce<<setup Instructions.

You can select tracking domain and advertiser as per your requirement.


We're thrilled to have put together a top-notch team of qualified experts who are available to handle any of your concerns and respond to any inquiries you may have. You can contact us at any time by sending an email to support@trackier.com or using the in-platform chat feature.

Did this answer your question?