Target group Name Version Version info Implementation steps Last modified
merchant xt:Commerce 4 Standard implementation XT:COMMERCE 4 VEYTON TRADETRACKER CONVERSION IMPLEMENTATION

SETTING UP THE REDIRECT
Seeing as XT:Commerce uses php you can download the redirect file here download index.php After downloading, please add your domainName to line 6.

For more information regarding setting up the redirect we refer you to setting up the redirect guidelines. When the redirect is working, follow the instruction for setting up the conversion registration below.

Log in to your FTP account and open and edit the file xtCore/pages/page_action/checkout.success.php

At the bottom of the file you will find a php closing tag ( ?> ) above this closing tag the code that is found here must be added:

// TradeTracker conversion script
$campaignID = '[marker]CAMPAIGN_ID[/marker]';
$productID = '[marker]PRODUCT_ID[/marker]';
$orderID = !empty($success_order->oID) ? htmlspecialchars($success_order->oID) : '';
$orderAmount = empty($success_order->order_total['total']['plain']) ? 0.00 : (float) $success_order->order_total['total']['plain'] / 1.2; // The 1.2 is your VAT ratio.
$trackingCode = "<script type=\"text/javascript\">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: '$campaignID',
productID: '$productID',
transactionID: '$orderID',
transactionAmount: '$orderAmount',
quantity: '1',
descrMerchant: '$descrMerchant',
descrAffiliate: '',
currency: '',
trackingGroupID: '[marker][/marker]'
});
</script>
<noscript>
<img src=\"//ts.tradetracker.net/?cid=$campaignID&amp;pid=$productID&amp;tid=$orderID&amp;tam=$orderAmount&amp;qty=1&amp;event=sales\" 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>";

define('TRADETRACKER_TRACKING_CODE', $trackingCode);

Save and/or upload the file to your server.

Navigate to: /templates/YOUR_THEME_SKIN_DIRECTORY/xtCore/pages/checkout/subpage_success.html

Open and edit the file subpage_success.html and at the top of this file add

{txt key=TRADETRACKER_TRACKING_CODE}
Save and/or upload the file to your server.

If your redirect is working the implementation can be tested.

Please keep in mind that although we do our very best to cover a wide variety of different implementations and web shop systems, programming languages and conversion registration methods for different situations, we want to state here that they are all merely examples and are not guaranteed to work for your specific situation or specific conversion or tracking needs. The reason for this is that the implementation descriptions provided are based on default system configurations and do not take system configuration settings, customisations and usage of plug-ins into account. Besides that there are also a lot of other variables that can have impact on the correct working of our tracking and conversion registration which we just can't know upfront. In case you do encounter or experience issues when implementing our tracking, please report this to your account manager and describe (in detail) the steps you took and if it's possible, provide the code and/or files you are using for your implementation to the account manager.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=39
14-Mar-2019 15:52:04
merchant xt:Commerce 3 Overview XT:COMMERCE 3 TRADETRACKER CONVERSION IMPLEMENTATION

SETTING UP THE REDIRECT
Seeing as XT:Commerce uses php you can download the redirect file here download index.php After downloading, please add your domainName to line 6.

For more information regarding setting up the redirect we refer you to setting up the redirect guidelines. When the redirect is working, follow the instruction for setting up the conversion registration below.

We have created a general TradeTracker conversion handler file for xt:Commerce 3 that must be placed on your server. No modifications must be made to this file.

Download the tradetracker.php file for xt:Commerce here

Log in to your FTP account and upload the tradetracker.php file to the /includes/ folder of your xt:Commerce installment.

Open and edit the file checkout_success.php that is located in the root of your XT:Commerce installation. Within checkout_success.php locate the following line of code:

$main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_success.html');
ABOVE this line place the following code:

// Begin Tradetracker xt:Commerce code
$tt_campaignID = '[marker]CAMPAIGN_ID[/marker]';
$tt_productID = '[marker]PRODUCT_ID[/marker]';
$tt_imageTag = include './includes/tradetracker.php';
$smarty->assign('tt_imageTag', $tt_imageTag);
// End TradeTracker xt:Commerce code

Save and/or upload the file to your server.

Locate your checkout_success.html template file. This file is part of the theme your are using. and normally would be found at the following location:

/templates/{TEMPLATE_NAME}/module/checkout_success.html

Open and edit the file checkout_success.html and at the bottom of this file add the following code:

<!-- TradeTracker conversion tracking start -->
{$tt_imageTag}
<!-- TradeTracker conversion tracking end -->

Save and/or upload the file to your server.

If your redirect is working the implementation can be tested.

Please keep in mind that although we do our very best to cover a wide variety of different implementations and web shop systems, programming languages and conversion registration methods for different situations, we want to state here that they are all merely examples and are not guaranteed to work for your specific situation or specific conversion or tracking needs. The reason for this is that the implementation descriptions provided are based on default system configurations and do not take system configuration settings, customisations and usage of plug-ins into account. Besides that there are also a lot of other variables that can have impact on the correct working of our tracking and conversion registration which we just can't know upfront. In case you do encounter or experience issues when implementing our tracking, please report this to your account manager and describe (in detail) the steps you took and if it's possible, provide the code and/or files you are using for your implementation to the account manager.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=14
28-Jan-2016 14:51:14
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 Weebly Webshop NA Standard implementation WEEBLY WEBSHOP TRADETRACKER CONVERSION IMPLEMENTATION

The code below must use your campaign ID and product ID that you received from us.

The code must be pasted as custom tracking code by navigating to:

STORE >> ADVANCED >> Add custom tracking code and add it to the Receipt page input field and Save it

COPY THIS CODE (if needed replace CAMPAIGN_ID and PRODUCT_ID with your own ID's)

<script type="text/javascript">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: '[marker]CAMPAIGN_ID[/marker]',
productID: '[marker]PRODUCT_ID[/marker]',
transactionID: '{txid}',
transactionAmount: {total} - {tax} - {shipping},
quantity: '1',
descrMerchant: '',
descrAffiliate: '',
currency: ''
});
</script>
<noscript>
<img src="//ts.tradetracker.net/?cid=[marker]CAMPAIGN_ID[/marker]&amp;pid=[marker]PRODUCT_ID[/marker]&amp;tid={txid}&amp;tam={total}&amp;event=sales" 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>


STEP-BY-STEP GUIDE
Login to your Weebly account and click edit for the site you want to add our conversion script.

Navigate to STORE >> ADVANCED >> Add custom tracking code:



Paste our conversion code to the Receipt page input field:



Click Update Changes.

The implementation can be tested.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=37
14-Mar-2019 15:51:22
merchant VirtueMart (Joomla) 2.0.0 and higher Standard implementation VIRTUEMART 2.0.0 AND HIGHER (JOOMLA) TRADETRACKER CONVERSION IMPLEMENTATION

Seeing as Virtuemart (Joomla) uses php you can download the redirect file here download index.php please add your domainName to line 6 like after downloading the index redirect file, like:

$domainName = 'yourdomainWithoutWWW.com';
After adding your domain to the index file, it should be uploaded to a folder in the root of your website. The folder must be named a word that best represents your webshop's content.

For more information regarding setting up the redirect we refer you to setting up the redirect guidelines.

VIRTUEMART CONVERSION IMPLEMENTATION
We have created a general TradeTracker conversion handler file for Virtuemart 2.0.0 and higher (Joomla) that also must be placed on your server.

Download: tradetracker.php No modifications must be made to this file.

Upload tradetracker.php to your server in folder /components/com_virtuemart/views/cart/tmpl/

After that open and edit the order_done.php file (also located in /components/com_virtuemart/views/cart/tmpl/ )

Within the order_done.php file locate the following line of code:

[marker]echo $this->html;[/marker]
Below that line copy and paste the following code:

$tt_campaignID = '[marker]CAMPAIGN_ID[/marker]';
$tt_productID = '[marker]PRODUCT_ID[/marker]';
$tt_trackingGroupID = '[marker][/marker]';
$tt_scriptTag = include_once 'tradetracker.php';
echo $tt_scriptTag;

After these steps are executed, the campaign is ready to be tested.

Make sure you use the TradeTracker Tracking Test URL before doing the test. If you don’t have the test URL, please ask your account manager to provide it to you.

Please keep in mind that although we do our very best to cover a wide variety of different implementations and web shop systems, programming languages and conversion registration methods for different situations, we want to state here that they are all merely examples and are not guaranteed to work for your specific situation or specific conversion or tracking needs. The reason for this is that the implementation descriptions provided are based on default system configurations and do not take system configuration settings, customisations and usage of plug-ins into account. Besides that there are also a lot of other variables that can have impact on the correct working of our tracking and conversion registration which we just can't know upfront. In case you do encounter or experience issues when implementing our tracking, please report this to your account manager and describe (in detail) the steps you took and if it's possible, provide the code and/or files you are using for your implementation to the account manager.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=28
12-Dec-2014 14:28:51
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 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 Strato Webshop All Single Country Campaign with campaign and order ID STRATO WEBSHOP TRADETRACKER SINGLE CAMPAIGN / COUNTRY CONVERSION IMPLEMENTATION

You can use the filter options above to select your shop system, the version of your shop. The Version info selection is a short description of the implementation method we created for the shop you selected.

GERMAN
Navigate to (or click the link and login): Einstellungen --> Warenkorbeinstellungen --> Texte

ENGLISH
Navigate to (or click the image or link and login): Settings --> Basket Settings --> Texts

Or just click this image:


Scroll down to: Texts in both order processes

Look for the entry: Text for confirmation page / Affiliate tracking code

In German, scroll down to: Texte in beiden Bestellprozessen

Look for the entry: Text für Bestätigungsseite / Affiliate-Tracking-Code



Click the < > html button. (Click in the text input field and click the < > html button).

It's advisable to add the script below for both language entries, seeing as a user can specify the language. Add the following codes to both entry fields.

NOTE: Make sure to click the < > html button first!

<script type="text/javascript">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: '[marker]CAMPAIGN_ID[/marker]',
productID: '[marker]PRODUCT_ID[/marker]',
transactionID: '#OrderNumber',
transactionAmount: '#OrderTotalAmountGross', // Format: 123.45
quantity: '1',
descrMerchant: '#CustomerNumber', // Detailed description of the order
descrAffiliate: '', // Description of the order.
currency: '#CurrencyCode' // Use the ISO 4217 standard, e.g. USD, EUR, GBP, SEK, DKK, NOK, HUF, PLN.
});
</script>
<noscript>
<img src="//ts.tradetracker.net/?cid=[marker]CAMPAIGN_ID[/marker]&pid=[marker]PRODUCT_ID[/marker]&tid=#OrderNumber&tam=#OrderTotalAmountGross&data=&qty=1&descrMerchant=#CustomerNumber&descrAffiliate=&event=sales&currency=#CurrencyCode" 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 the SAVE button to save these settings.

Please keep in mind that although we do our very best to cover a wide variety of different implementations and web shop systems, programming languages and conversion registration methods for different situations, we want to state here that they are all merely examples and are not guaranteed to work for your specific situation or specific conversion or tracking needs. The reason for this is that the implementation descriptions provided are based on default system configurations and do not take system configuration settings, customisations and usage of plug-ins into account. Besides that there are also a lot of other variables that can have impact on the correct working of our tracking and conversion registration which we just can't know upfront. In case you do encounter or experience issues when implementing our tracking, please report this to your account manager and describe (in detail) the steps you took and if it's possible, provide the code and/or files you are using for your implementation to the account manager.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=21
14-Mar-2019 15:53:44
merchant Strato Webshop All Multi country solution with tracking group ID STRATO WEBSHOP TRADETRACKER CONVERSION IMPLEMENTATION

GERMAN
Navigate to Einstellungen --> Warenkorbeinstellungen --> Texte

ENGLISH
Navigate to Settings --> Basket Settings --> Texts



Scroll down to: Texts in both order processes

Look for the entry: Text for confirmation page / Affiliate tracking code

or for German, scroll down to: Texte in beiden Bestellprozessen

Look for the entry: Text für Bestätigungsseite / Affiliate-Tracking-Code



Click the < > html button. (Click in the text input field and click the < > html button).

It's advisable to add the script below for both language entries, seeing as a user can specify the language. Add the following codes to both entry fields.

NOTE: Make sure to click the < > html button first!

<script type="text/javascript">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: '[marker]CAMPAIGN_ID[/marker]',
trackingGroupID: '[marker][/marker]',
productID: '[marker]PRODUCT_ID[/marker]',
transactionID: '#OrderNumber',
transactionAmount: '#OrderTotalAmountGross',
quantity: '1',
descrMerchant: '#CustomerNumber',
descrAffiliate: '',
currency: '#CurrencyCode'
});
</script>
<noscript>
<img src="//ts.tradetracker.net/?tgi=[marker][/marker]&pid=[marker]PRODUCT_ID[/marker]&tid=#OrderNumber&tam=#OrderTotalAmountGross&data=&qty=1&descrMerchant=#CustomerNumber&descrAffiliate=&event=sales&currency=#CurrencyCode" 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>

This will result in something like:



Click the SAVE button to save these settings.

Please keep in mind that although we do our very best to cover a wide variety of different implementations and web shop systems, programming languages and conversion registration methods for different situations, we want to state here that they are all merely examples and are not guaranteed to work for your specific situation or specific conversion or tracking needs. The reason for this is that the implementation descriptions provided are based on default system configurations and do not take system configuration settings, customisations and usage of plug-ins into account. Besides that there are also a lot of other variables that can have impact on the correct working of our tracking and conversion registration which we just can't know upfront. In case you do encounter or experience issues when implementing our tracking, please report this to your account manager and describe (in detail) the steps you took and if it's possible, provide the code and/or files you are using for your implementation to the account manager.
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=22
14-Mar-2019 15:51:40
merchant Shopware 4 Standard implementation SHOPWARE 4 CONVERSION IMPLEMENTATION

You can use the filter options above to select your shop system, the version of your shop. The Version info selection is a short description of the implementation method we created for the shop you selected.

SETTING UP THE REDIRECT
Seeing as Shopware uses php you can download the redirect file here download index.php. After downloading, please add your domainName to line 6 like after downloading the index redirect file, like:

$domainName = 'yourdomainWithoutWWW.com';
After adding your domain to the index file, it should be uploaded to a folder in the root of your website. The folder must be named a word that best represents your web shop's content.
For more information regarding setting up the redirect we refer you to SETTING UP THE REDIRECT GUIDELINES.

SETTING UP THE CONVERSION
STEP 1 The conversion script below should be added to the finish.tpl file that is part of the front-end template you are using and should be located in the folder /templates/_yourtheme_local/frontend/checkout/finish.tpl

Please note: If you for example are using the theme emotion in pink. The colour variation of the theme is in the /emotion_pink/ folder. This folder contains only colour information.
The finish.tpl file should be added to the folder _emotion_local so the theme name starting with an underscore.

For you convenience you can download finish.tpl (from version 4.2.3) here and save it to your computer and upload it to the folder or download finish.tpl from the base template from your server and upload that to the _local folder of the theme you are using.

If you not sure what to do or how this works, please read the sections ABOUT THE SHOPWARE TEMPLATE STRUCTURE and HOW TO IDENTIFY THE USED TEMPLATE/THEME FOR YOUR SHOPWARE SYSTEM AND ADDING THE FINISH.TPL at the bottom of this article.

STEP 2 Open finish.tpl and add the following conversion code above [marker]{/block}[/marker] (the block piece of code is at the bottom of the finish.tpl file):

<script type="text/javascript">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: '[marker]CAMPAIGN_ID[/marker]',
productID: '[marker]PRODUCT_ID[/marker]',
transactionID: '{$sOrderNumber}',
transactionAmount: '{$sAmountNet}',
quantity: '1',
descrMerchant: '{$sBasketItem.articlename}',
descrAffiliate: '{$sBasketItem.articlename}',
currency: '{$sBasketItem|currency:use_shortname:left}'
});
</script>
<noscript>
<img src="//ts.tradetracker.net/?cid=[marker]CAMPAIGN_ID[/marker]&amp;pid=[marker]PRODUCT_ID[/marker]&amp;tid={$sOrderNumber}&amp;tam={$sBasketItem.amount}&amp;data=&amp;qty=1&amp;descrMerchant={$sBasketItem.articlename}&amp;descrAffiliate={$sBasketItem.articlename}&amp;event=sales&amp;currency={$sBasketItem.additional_details.currency}" 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>

STEP 3 Save finish.tpl to your ftp account to the _yourtheme_local/frontend/checkout/ folder to complete and test the implementation.

When testing the campaign, please use the tracking test url you received from your account manager. If you did not receive this test url, please request this.

TRACKING GROUP ID EXAMPLE FOR IN FINISH.TPL
If you know what this is and if you have a tracking group ID, use this code, if you don't know what it is and do not have tracking group id, use the other code.

<script type="text/javascript">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: '[marker]CAMPAIGN_ID[/marker]',
productID: '[marker]PRODUCT_ID[/marker]',
transactionID: '{$sOrderNumber}',
transactionAmount: '{$sAmountNet}',
quantity: '1',
descrMerchant: '{$sBasketItem.articlename}',
descrAffiliate: '{$sBasketItem.articlename}',
currency: '{$sBasketItem|currency:use_shortname:left}',
trackingGroupID: '[marker][/marker]'
});
</script>
<noscript>
<img src="//ts.tradetracker.net/?tgi=[marker][/marker]&amp;pid=[marker]PRODUCT_ID[/marker]&amp;tid={$sOrderNumber}&amp;tam={$sBasketItem.amount}&amp;data=&amp;qty=1&amp;descrMerchant={$sBasketItem.articlename}&amp;descrAffiliate={$sBasketItem.articlename}&amp;event=sales&amp;currency={$sBasketItem.additional_details.currency}" 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>

ABOUT THE SHOPWARE TEMPLATE STRUCTURE
Best practice is to not make modifications to the actual template files, but to create a a local version of the template files you modified or want to modify. In Shopware you are able to create a local version of the template you are using by creating a folder in the template directory of your shop that starts with the name of the template followed by _local. The _emotion folder that is part of a default Shopware installation is the base emotion theme folder. As you can see in the templates folder on the ftp there are some variations on the emotion theme, for example emotion_black contains only some styling parts of the emotion theme. When a variation is selected in the back-end, the system will still check for modified files in _emotion_local folder and uses the files found as an override to the base theme folder.

Shopware template fallback method

_themename [Base template files]
_themename_local [Place to add modified theme files]
themename_somecolor [Independent variations on the theme]

This basically comes down to that the finish.tpl file that we want to modify must be in the folder /templates/_yourtheme_local/frontend/checkout/

HOW TO IDENTIFY THE USED TEMPLATE/THEME FOR YOUR SHOPWARE SYSTEM AND ADDING THE FINISH.TPL

1) Log in to the back-end of your shop and navigate to Configuration > Basic Settings > Shop settings > Templates to identify the active template.
2) Lets say you are using the theme yourtheme. Log in to your FTP account and navigate to the /templates/ folder .
3) Locate or create the folder /templates/_yourtheme_local/
4) Add the folder /frontend/ to /templates/_yourtheme_local/
5) Add the folder /checkout/ to /templates/_yourtheme_local/ frontend/
6) This folder structure will be in place: /templates/_yourtheme_local/frontend/checkout/
7) The location of finish.tpl will be like: /templates/_yourtheme_local/frontend/checkout/finish.tpl
Shortlink to this article: https://sc.tradetracker.net/implementation/overview?f[id]=25
14-Mar-2019 15:48:17