The Retargeting Pixel
With the help of retargeting tracking, you have the possibility to track user and product activities on your site. Depending on the configuration, this information is used by us for the delivery of your retargeting campaigns. To do this, make sure that the product IDs transferred via the tracking pixel match exactly those in your product feed.
Step 1: Load Javascript retargeting API
To load our Retageting API the following javascript file must be included in the <head> area of your website. By setting the attribute async="true", the browser is informed that the script should be loaded asynchronously and thus does not affect the loading time of the page.
Important: It must be ensured that the retargeting API is loaded only once per page load, otherwise your data may be tracked multiple times!
...
<script type="text/javascript"
async="true"
src="https://s.d.adup-tech.com/services/retargeting.js" >
</script>
...
Step 2: Initialize callback
As soon as the retargeting API has finished loading, the global Javascript function window.AdUpRetargeting is automatically executed. Within this function, your logic for retargeting tracking must be stored. The first (and only) parameter passed here is our API object, which can be used to perform tracking.
Important: If the global Javascript function window.AdUpRetargeting was initializedseveral times on your page, only the last occurring function will be considered and executed!
...
<script type="text/javascript">
window.AdUpRetargeting = function(api) {
// tracking data (step 3)
};
</script>
...
Step 3: Tracking data
Here, the data to be tracked is first passed to the Retargeting API object using various "Set" methods and then transferred to us asynchronously in the background using a "Track" method.
Available "Set" methods
Method | Description | Example |
---|---|---|
setAccount | Sets your unique account ID. Note: Working examples for your account ID can also be seen on the "Tools" > "Retargeting tracking" page in the advertiser frontend. | |
setEmail | Sets the unique email address of the user. Note: We anonymise the submitted email address using the MD5 algorithm. | |
setHashedEmail | Sets the already anonymised unique email address of the user. | |
setSearch | Sets information about the search filters used or other user-defined values of the user. The values passed here can be assigned as tracking pixel parameters in the advertiser frontend and subsequently used as segmentation filters and/or placeholders in ad texts. The desired values are passed in the form of a JSON object. | |
setTransaction | Sets transaction information (e.g. order number). Here, either the transaction ID can be passed directly as a string or a JSON object with extended information. | |
setProduct | Depending on the page depth, the information about one or more products is set here. Here, either the product ID can be passed directly as a string or an array of several strings or a JSON object or an array of several JSON objects with extended information. Note: The product IDs passed here should exactly match those in your product feed! |
|
setMobile setTablet setDesktop | Sets the device type of the current website. Note: By default, we automatically determine the device type based on the user agent. | |
setDemarkUser | Deselects the current user. This means that the user will no longer be retargeted for the campaign (e.g. after a sale or booking). Note: By default, users are not demarked after a trackSale() and thus continue to be retargeted. | |
setDemarkProducts | Deselects the products passed by setProduct() for the current user. This means that the user will no longer be retargeted for said products in the campaign (e.g. after a sale or booking). Note: By default, products are not demarked after a trackSale() and thus continue to be retargeted. | |
setConversionCode | Tracks a conversion (e.g. after a sale or booking). The method must be called with a conversion code that has already been created. The conversion is automatically extended by the order number set by setTransaction() and the product information set by setProduct(). Note: By default, no conversion is tracked after a trackSale(). | |
setGdpr | Normally, we determine the required GDPR data automatically via the TCF API built into the website. If this is not available, or if it is not possible to use it for technical reasons, you have the option here to transfer the GDPR data manually. The values are transferred in the form of a JSON object with two properties: gdpr true = GDPR applies false = GDPR does not apply null = Unknown (default) gdpr_consent The IAB Consent String (base64url-encoded) |
Available "Track" methods
Retargeting Tracking Examples
The following examples are only a template and need to be further customized or extended by you. Also, make sure that the product IDs passed via tracking pixel match exactly with those in your product feed. More examples with your actual account ID can be viewed on the "Tools" > "Retargeting Tracking" page in the advertiser frontend.
...
<script type="text/javascript"
async="true"
src="https://s.d.adup-tech.com/services/retargeting.js">
</script>
<script type="text/javascript">
window.AdUpRetargeting = function(api) {
api.setAccount(1234)
.trackHomepage();
};
</script>
...
...
<script type="text/javascript"
async="true"
src="https://s.d.adup-tech.com/services/retargeting.js">
</script>
<script type="text/javascript">
window.AdUpRetargeting = function(api) {
api.setAccount(1234)
.setProduct(["PRODUCT ID1", "PRODUCT ID2", "PRODUCT ID3"])
.trackProductList();
};
</script>
...
...
<script type="text/javascript"
async="true"
src="https://s.d.adup-tech.com/services/retargeting.js">
</script>
<script type="text/javascript">
window.AdUpRetargeting = function(api) {
api.setAccount(1234)
.setProduct("PRODUCT ID")
.trackProductPage();
};
</script>
...
...
<script type="text/javascript"
async="true"
src="https://s.d.adup-tech.com/services/retargeting.js">
</script>
<script type="text/javascript">
window.AdUpRetargeting = function(api) {
api.setAccount(1234)
.setProduct([
{id: "PRODUCT ID1", price: 1.99, quantity: 2},
{id: "PRODUCT ID2", price: 3.99, quantity: 1}
])
.trackBasket();
};
</script>
...
...
<script type="text/javascript"
async="true"
src="https://s.d.adup-tech.com/services/retargeting.js">
</script>
<script type="text/javascript">
window.AdUpRetargeting = function(api) {
api.setAccount(1234)
.setProduct([
{id: "PRODUCT ID1", price: 1.99, quantity: 2},
{id: "PRODUCT ID2", price: 3.99, quantity: 1}
])
.setTransaction("TRANSACTION-ID") // Optional
.setConversionCode("CONVERSION-CODE") // Optional
.setDemarkProducts() // Optional
.trackSale();
};
</script>
...