Web SDK
Get started
To start tracking with Offer18's web SDK, one needs to add a script tag in the website.
Placement : Header (All Pages)
Track Clicks
To track clicks using the SDK, add the following code to your script.
Placement : Header (All Pages)
trackingURL (Mandatory) : Tracking URL which can be extracted from Offer18 dashboard.
keymapping : is an array of Offer18 parameters and Native parameters in a format of
<OFFER18-PARAMETER>:<YOUR-PARAMETER>
. User can replace<OFFER18-PARAMETER>
with Offer18 Parameters like aff_sub1, aff_sub2 and<YOUR-PARAMETER>
with their parameters in which user is getting values from their network.
Example code
In above example
a
is
Affiliate ID
in Key Mapping
Track Impressions
To track impressions using the SDK, add the following code to your script
Placement : Header (All Pages)
impressionURL (Mandatory) : Impression URL which can be extracted from Offer18 dashboard.
keymapping : is an array of Offer18 parameters and Native parameters in a format of
<OFFER18-PARAMETER>:<YOUR-PARAMETER>
. User can replace<OFFER18-PARAMETER>
with Offer18 Parameters like aff_sub1, aff_sub2 and<YOUR-PARAMETER>
with their parameters in which user is getting values from their network.
Example code
In above example
a
is
Affiliate ID
in Key Mapping
Track Conversions
Users must add the following code snippet into all landing pages except Order confirmation / Order Success (Thank you) page.
Placement : Header (All Pages)
After adding the script one needs to add the following script in thankyou/order-confirmation page
Placement : Thank you Page/Order Success Page (One Page)
domain (Mandatory) : Postback domain of the user.
accountId (Mandatory) : Offer18 account id of the user.
offerId (Mandatory) : Id of the campaign.
coupon : Coupon code can be used here
postbackType : It can be either
'iframe'
or'pixel'
, default value is'iframe'
.isGlobalPixel : User can configure global pixel by setting this
true
, default value isfalse
.allowMultiConversion : User can allow MultiConversion by setting this
true
, default value isfalse
.conversionData : This object contains the parameters which can be used to get values from network.
Example code
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.
Last updated