Target group Name Version Version info Implementation steps Last modified
merchant General All Exclusive voucher codes EXCLUSIVE VOUCHER CODES

Exclusive voucher code tracking makes it possible for advertisers to make voucher codes in the TradeTracker interface exclusive for one affiliate. Although advertisers often hand out vouchers exclusively to one publisher, this feature offers full exclusivity. This implies that when the voucher is used by a consumer, the last touchpoint will always go to the exclusive affiliate. This means that even when another affiliate or website is communicating this voucher code and generates traffic using this voucher code, the last touchpoint will go to the publisher granted with the exclusivity.

If you are a new Advertiser, please proceed to our general conversion script page and implement the pixel.

If you are a existing Advertiser, please amend your conversion script with following (place in script that requires additions is marked):
- Add vc:'EXCLUSIVE_CODE', to conversion script
- Add &vc= parameter to image pixel

Note: EXCLUSIVE_CODE should be variable passed to the script from your system. It is case-sensitive and it should be passed from your voucher code field on checkout page.

Note 2: If you are using any form of deduplication, please make sure that our complete tracking script is always triggered if this exclusive voucher code is used by a consumer. Otherwise offline tracking will not be possible and the voucher will not be full-exclusive for the publisher.



<script type="text/javascript">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: 'CAMPAIGN_ID',
productID: 'PRODUCT_ID',
transactionID: 'ORDER_ID',
transactionAmount: 'ORDER_AMOUNT',
quantity: '1',
descrMerchant: '',
descrAffiliate: '',
[marker]vc:[/marker]'[marker]EXCLUSIVE_CODE[/marker]',
currency: ''
});
</script>
<noscript>
<img src="//ts.tradetracker.net/?cid=CAMPAIGN_ID&amp;pid=PRODUCT_ID&amp;tid=ORDER_ID&amp;tam=ORDER_AMOUNT&amp;data=&amp;qty=1&amp;descrMerchant=&amp;descrAffiliate=&amp;event=sales&amp;currency=EUR[marker]&amp;vc=[/marker]" alt="" />
</noscript>
<script type="text/javascript">
// No editing needed below this line.
(function(ttConversionOptions) {
var campaignID = 'campaignID' in ttConversionOptions ? ttConversionOptions.campaignID : ('length' in ttConversionOptions && ttConversionOptions.length ? ttConversionOptions[0].campaignID : null);
var tt = document.createElement('script'); tt.type = 'text/javascript'; tt.async = true; tt.src = '//tm.tradetracker.net/conversion?s=' + encodeURIComponent(campaignID) + '&t=m';
var s = document.getElementsByTagName('script'); s = s[s.length - 1]; s.parentNode.insertBefore(tt, s);
})(ttConversionOptions);
</script>
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=69
07-Jun-2019 18:24:35
merchant Tracking SDK 1.0 Android TradeTracker SDK provides functionalities to track statistics of app install, usage, leads and sales generated from the app. The SDK is compatible with Android 4.0 (API version 14) and above. Android Studio is the recommended development environment.

Downloading the SDK
Download the SDK from following link: TradeTracker Android SDK

Importing the SDK
To import AAR file into your Android Studio project, go to File -> New -> Import module -> import JAR/.AAR package -> Select the path to AAR file -> select ‘Finish’.

To add a dependency to the SDK, go to Module Settings -> Select your app module -> Select dependencies tab -> Select ‘+’ option -> Module dependency -> Select the TradeTracker SDK -> select ‘OK’.

Using the SDK

Permissions
Update your project's AndroidManifest.xml file to include the INTERNET and ACCESS_NETWORK_STATE permissions.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="your.app.package">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application android:name="MyApplication">
...
</application>
</manifest>

INSTALL_REFERRER broadcast receiver
In the AndroidManifest.xml, add the following receiver as the FIRST receiver for INSTALL_REFERRER.
<application

[......]

<receiver
android:name="com.tradetracker.CampaignTrackingReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>

</application>

Note : If your app has multiple broadcast receivers for INSTALL_REFERRER action, then you can write a custom broadcast receiver which receives the INSTALL_REFERRER broadcast and passes the broadcast intent to all other receivers from different SDKs.
public class CustomBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
CampaignTrackingReceiver tradeTrackerReceiver = new CampaignTrackingReceiver();
tradeTrackerReceiver.onReceive(context, intent);
}
}

Then in manifest file, you can add this as receiver for INSTALL_REFERRER action.
<application
[......]

<receiver
android:name="com.your.package.CustomBroadcastReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>

</application>

SDK initialization
Initialize the TradeTracker SDK in the Application class. This must be called before calling any other APIs on the shared singleton TradeTracker object.
public class MyApplication extends Application {

@Override
public void onCreate() {
super.onCreate();
TradeTracker.getInstance().init(this, "your-app-id");
}
}

SDK Logging (Optional)
You can enable the SDK logging to see the logs generated by the SDK during debugging. But remember to disable the logging before releasing the app.
TradeTracker.getInstance().enableLogging(LogLevel.DEBUG);
Installed Application
Deep linking has to be handled in your app to update the "referrer". In a case, if a user has already installed the app using an affiliate site and open the app using another affiliate site, the "referrer" has to be updated to get new MaterialID and AffiliateID. Following is an example;
import com.tradetracker.utility.Constants;
import com.tradetracker.utility.ParameterNames;
import com.tradetracker.utility.PreferenceUtility;
.....

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detailed_tracking);

Intent intent = getIntent();
Uri data = intent.getData();

if(data != null && data.isHierarchical()){
String referrer = data.getQueryParameter(ParameterNames.REFERRER);
Context context = getApplicationContext();
if (!TextUtils.isEmpty(referrer)) {
PreferenceUtility.saveStoreReference(context, referrer);
TradeTracker.getInstance().trackAppStart();
}
}

initViews();
}


Tracking of the app start event
Track the app start in onCreate() function of the Launcher activity.
public class LauncherActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_launcher);

TradeTracker.getInstance().trackAppStart();;
}


Tracking of custom leads
To manually trigger a lead you can use the following API.
TradeTracker.getInstance().trackCustomLead(descrMerchant, descrAffiliate, eml, pid, tid);

Tracking of custom sales (in-app purchases)
To manually trigger a sale you can use the following API:
TradeTracker.getInstance().trackCustomSales(tam, descrMerchant, descrAffiliate, eml, pid, tid);

In addition to the parameters listed in the table above, you may pass on the order amount ("tam") as a Double, e.g. 123.45.


Testing
After the integration of the TradeTracker SDK, make sure that SDK receives the install referrer properly.

Testing install referrer by uploading a beta app to play store
You can upload a beta version of your app to google play store & use a sample advertising link to install the app.
Ex : https://play.google.com/store/apps/details?id=your.package.name&referrer={{MaterialID}}::{{AffiliateID}}
On the first launch of the app, SDK receives the install referrer info from play store & uses it as a param in subsequent events fired. Enable the SDK logging as described in section 2.4 to see the event logs generated by the SDK.

Testing install referrer with ADB
To verify that SDK is receiving the install referrer info properly, install your app in the device & run the following command in the Terminal:

adb shell am broadcast -a com.android.vending.INSTALL_REFERRER -n
com.your.package/com.tradetracker.CampaignTrackingReceiver --es
"referrer" "test_referrer_key=test_referrer_value"


Enable the SDK logging as described above to see the event logs generated by the SDK.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=45
23-Sep-2019 13:03:14
merchant Tracking SDK 1.0 iOS TradeTracker SDK provides functionalities to track statistics of app install, usage, leads and sales generated from the app.

Downloading the SDK
Download the SDK from following link: TradeTracker iOS Swift 2.2 SDK or TradeTracker iOS Swift 3.0 SDK

Importing the SDK
Add TradeTracker.framework to your Xcode project folder. Drag and drop TradeTacker.framework to your project workspace. Make sure that framework is added in embedded frameworks section in Xcode App Target -> General section.



Integrating with your app
Import TrackeTracker.framework in AppDelegate as shown in the snippets below.
Swift:
import TradeTracker
Objective C:
@import TradeTracker;

Initialize SDK in application:didFinishLaunchingWithOptions: method.
Swift:
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) ->
Bool {
TradeTrackerManager.startTradeTrackerManagerWithAppID("SomeAppID"
)
return true
}

Objective C:
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[TradeTrackerManager startTradeTrackerManagerWithAppID:@"SomeAppID"];
return YES;
}


While integrating with Objective-C project you have to make sure that In Build settings->Build Options->‘Embedded Content contains Swift’ option is set as ‘Yes’.

Add a Run script in App TargetBuild Phases after embedded frameworks. Copy following code to to Run script

Strip framework:
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/TradeTracker.framework/strip-frameworks.sh"



Now you have successfully integrated SDK to your App.

Logging
You can enable the SDK logging to see the logs generated by the SDK during debugging. But remember to disable the logging before releasing the app.
Swift:
TradeTrackerManager.logLevel = TradeTrackerLogLevel.Verbose
Objective C:
[TradeTrackerManager setLogLevel:TradeTrackerLogLevelVerbose];

Tracking
Tracking of Install
Swift
TradeTrackerManager.trackInstall()
Objective C
[TradeTrackerManager trackInstall];
Tracking of app start
Swift
TradeTrackerManager.trackStart()
Objective C
[TradeTrackerManager trackStart];
Tracking of custom leads
To manually trigger a lead you can use the following call:
Swift
TradeTrackerManager.trackCustomLead(descrMerchant: merchant, descrAffiliate: affiliate, email: email, pid: pid, tid: tid)
Objective C
[TradeTrackerManager trackCustomLeadWithDescrMerchant:merchant descrAffiliate:affiliate email:email pid:pid tid:tid];

Tracking of custom sales (in app purchases)
To manually trigger a sale you can use the following calls:
Swift
TradeTrackerManager.trackCustomSale(amount: amount, descrMerchant:merchant, descrAffiliate: affiliate, email: email, pid: pid, tid: tid)
Objective C
[TradeTrackerManager trackCustomSaleWithAmount:amount descrMerchant:merchant descrAffiliate:affiliate email:email pid:pid tid:tid];

In addition to the above parameters in the table, you may use the amount as DecimalNumber (e.g. 123.45).
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=62
05-Mar-2019 11:37:30
merchant WP WooCommerce extension 1.x Generic Please note that Version 2.x is available now.
To ensure a seamless experience, make sure to implement the most recent version via the following guide: Version 2.x

In order to get the TradeTracker implementation up and running seamlessy with WooCommerce, you may add the TradeTracker WooCommerce Extension manually to your WP installation.

The zip-file in question may be found within your merchant dashboard under the "Support" heading at the top of the page:



Once you have downloaded the zip file, upload it to your Wordpress Plugins section by clicking the "Add new" button:



In the subsequent screen, click the "Upload Plugin" button and upload the above downloaded zip file:



This is also they way-of-working in case you're updating an existing TradeTracker WooCommerce plugin with a new version.

After a successful upload, head over to your plugins section and activate the plugin if not already done by clicking the "Activate" link:



After the plugin has successfully been activated, click "Settings":



On the subsequent page, enter your "Campaign ID" and "Product ID" as received from TradeTracker.


Optionally, you may enter a "Tracking Group ID" but only if explicitly instructed by TradeTracker to enter a value for it. If not, you may leave it blank.

Save these settings and you're good to go!

Now, please test the implementation together with your account manager.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=72
06-Dec-2021 16:46:35
merchant Shopify All Split basket items Login to the Shopify administration backend.

Go to Settings --> Checkout --> Order processing --> Additional content & scripts

Paste the script below to the Additional content & scripts input field. Be sure to substitute the CAMPAIGN_ID and PRODUCT_ID values with the values received from TradeTracker.

{% for line_item in line_items %}
<script type="text/javascript">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: 'CAMPAIGN_ID',
productID: 'PRODUCT_ID',
transactionID: '{{ order.order_number }}',
transactionAmount: parseFloat({{ line_item.price - line_item.line_level_total_discount | divided_by: 100 }}) || 0,
quantity: '{{ line_item.quantity }}',
descrMerchant: encodeURIComponent('SKU: {{ line_item.sku }}'),
descrAffiliate: '',
currency: '{{ checkout.currency }}',
vc: '{{ line_item.discount_allocations[0].discount_application.title | escape }}',
trackingGroupID: ''
});
</script>
<noscript>
<img src="//ts.tradetracker.net/?cid=CAMPAIGN_ID&amp;tgi=&amp;pid=PRODUCT_ID&amp;tid={{ order.order_number }}&amp;tam={{ line_item.price - line_item.line_level_total_discount | divided_by: 100 }}&amp;data=&amp;qty={{ line_item.quantity }}&amp;descrMerchant={{ line_item.sku }}&amp;descrAffiliate=&amp;event=sales&amp;currency={{ checkout.currency }}&amp;vc={{ line_item.discount_allocations[0].discount_application.title | escape }}" alt="" />
</noscript>
{% endfor %}
<script type="text/javascript">
(function(ttConversionOptions) {
var campaignID = 'campaignID' in ttConversionOptions ? ttConversionOptions.campaignID : ('length' in ttConversionOptions && ttConversionOptions.length ? ttConversionOptions[0].campaignID : null);
var tt = document.createElement('script'); tt.type = 'text/javascript'; tt.async = true; tt.src = '//tm.tradetracker.net/conversion?s=' + encodeURIComponent(campaignID) + '&t=m';
var s = document.getElementsByTagName('script'); s = s[s.length - 1]; s.parentNode.insertBefore(tt, s);
})(ttConversionOptions);
</script>


Hit the Save button to save the configuration.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=42
18-Nov-2020 15:09:13
merchant Shopify All Group basket items Login to the Shopify administration backend.

Go to Settings --> Checkout --> Order processing --> Additional content & scripts

Paste the script below to the Additional content & scripts input field. Be sure to substitute the CAMPAIGN_ID and PRODUCT_ID values with the values received from TradeTracker.

<script type="text/javascript">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: 'CAMPAIGN_ID',
productID: 'PRODUCT_ID',
transactionID: '{{ order.order_number }}',
transactionAmount: parseFloat({{ subtotal_price | divided_by: 100 }}) || 0,
quantity: '1',
descrMerchant: encodeURIComponent('Internal order ID: {{ order_id }}'),
descrAffiliate: '',
currency: '{{ checkout.currency }}',
vc: '{{ checkout.discount_applications[0].title | escape }}',
trackingGroupID: ''
});
</script>
<noscript>
<img src="//ts.tradetracker.net/?cid=CAMPAIGN_ID&amp;tgi=&amp;pid=PRODUCT_ID&amp;tid={{ order.order_number }}&amp;tam={{ subtotal_price / 100 }}&amp;data=&amp;qty=1&amp;descrMerchant={{ transaction.gateway }}&amp;descrAffiliate=&amp;event=sales&amp;currency={{ checkout.currency }}&amp;vc={{ discount.code }}" alt="" />
</noscript>
<script type="text/javascript">
(function(ttConversionOptions) {
var campaignID = 'campaignID' in ttConversionOptions ? ttConversionOptions.campaignID : ('length' in ttConversionOptions && ttConversionOptions.length ? ttConversionOptions[0].campaignID : null);
var tt = document.createElement('script'); tt.type = 'text/javascript'; tt.async = true; tt.src = '//tm.tradetracker.net/conversion?s=' + encodeURIComponent(campaignID) + '&t=m';
var s = document.getElementsByTagName('script'); s = s[s.length - 1]; s.parentNode.insertBefore(tt, s);
})(ttConversionOptions);
</script>


Click Save to save the configuration.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=71
18-Nov-2020 15:09:43