Automated Tracking
This feature allows multiple tracking actions to be managed through a single configuration. Based on predefined conditions such as matching website paths, hostnames, or referral sources, the SDK automatically triggers the appropriate functions.
With this approach, tracking behavior can be controlled and customized without repeated setup, making it easier to manage and scale tracking across different scenarios.
Get Started
To start automated tracking with Offer18's web SDK, one needs to add a script tag in the website.
Placement : Header (All Pages)
<script src="https://web-resources.offer18.net/sdk/web/WebSDK.js"></script>TrackClick
To track clicks using the automated SDK script, add the following code to your website.
Placement : Header (All Pages)
<script>
window.Offer18SDK.init({
automatedTracking: true,
opeations: [{
triggerFunction: "trackClick",
triggerconditios: [
{
mode: "<condition-mode>", // contain or equal
type: "<condition-type>", // path / hostname / referral
value: "<condition-value>"
}
],
triggerConfig: {
trackingURL: "https://example.com?c/o=xxx&m=000&a=000",
keymapping: ['<OFFER18-PARAMETER>:<YOUR-PARAMETER>', '<OFFER18-PARAMETER>:<YOUR-PARAMETER>', ...]
}
}]
})
</script>TrackImpression
To track impressions using the automated SDK script, add the following code to your website.
Placement : Header (All Pages)
TrackConversion
Users must add the following code snippet into all landing pages except Order confirmation / Order Success (Thank you) page.
Placement : Header (All Pages)
After that add the following code in thankyou/order-confirmation page to your website.
Placement : Thank you page/Order Success Page (One Page)
Debug Mode
To enable debug mode in an SDK, one can add the following code inside your script:
Enabling debug mode allows user to get more detailed information about the working of the SDK, including any errors or debugging messages.
Example Code
Last updated
Was this helpful?