Overview
Tracking user actions and conversions on your WordPress site is essential for understanding performance, optimising campaigns, and driving better results.
With Trackier’s WebSDK integration for WordPress, you can easily set up tracking without complex configurations.
Use Case
This integration is useful when you want to:
Track conversions from WordPress landing pages or websites
Measure campaign performance accurately
Attribute sales to affiliates or traffic sources
Monitor user behaviour across pages
Improve ROI through data-driven optimisation
Prerequisites
Before starting, ensure:
Active WordPress website
Trackier account access
Created an offer in Trackier
For a more detailed, step-by-step walkthrough on creating a campaign, please click here
Access to the PHP file or plugin installation rights
You can choose from two convenient methods:
1. Integrate via functions.php File
For users who are comfortable editing WordPress theme files, you can manually embed the conversion tracking code into your site's functions.php file.
To do so, add the following code to your functions.php file:
function add_gtm_head_script() {
?>
<!-- Google Tag Manager -->
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
})(window,document,'script','dataLayer','GTM-XXXX');
</script>
<!-- End Google Tag Manager -->
<?php
}
add_action('wp_head', 'add_gtm_head_script');
Note: Replace GTM-XXXX with your actual Google Tag Manager ID.
2. Use a Script Loader Plugin
If you prefer a no-code approach, you can install a script loader plugin to inject the tracking script into your website automatically.
Recommended Plugin Setup:
Install a plugin like Insert Headers and Footers, WPCode, or Header Footer Code Manager.
Add the tracking script to the Header section.
Save changes, and the script will be added site-wide.
Pro Tips
Use Separate Test Campaigns
Avoid mixing real and test data
Always Test After Installation
Verify tracking using test conversions
Keep Scripts in Header
Ensures tracking loads before user interaction
Avoid Duplicate Installations
Do not add SDK via both plugin and functions.php
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.
