Campaign

Setting up the retargeting pixel

With the help of retargeting tracking, you have the option of tracking user or product activities on your site. Depending on the configuration, we use this information to deliver your retargeting campaigns. To do this, ensure that the product IDs transmitted via tracking pixels match those in your product feed exactly.

Step 1: Load JavaScript Retargeting API

In order to load our retargeting API, the following JavaScript file must be integrated into the <head> section of your website. By setting the attribute async="true" the browser is informed that the script should be loaded asynchronously, thereby not affecting the page loading time.

Important: It must be ensured that the retargeting API is only loaded once per page view, otherwise your data may be tracked multiple times under certain circumstances!

...
<script type="text/javascript" 
        async="true" 
        src="https://s.d.adup-tech.com/services/retargeting.js" >
</script>

...
<script type="text/javascript" 
        async="true" 
        src="https://s.d.adup-tech.com/services/retargeting.js" >
</script>

...
<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 executed automatically. Within this function, your logic for retargeting tracking must be stored. Our API object is passed as the first (and only) parameter, which can be used to perform tracking.

Important: If the global JavaScript function window.AdUpRetargeting has been initialized multiple times on your page, only the last function that occurs will be considered and executed!

...
<script type="text/javascript">
    window.AdUpRetargeting = function(api) {
        // Track data (Step 3)
    };
</script>

...
<script type="text/javascript">
    window.AdUpRetargeting = function(api) {
        // Track data (Step 3)
    };
</script>

...
<script type="text/javascript">
    window.AdUpRetargeting = function(api) {
        // Track data (Step 3)
    };
</script>


Step 3: Tracking Data

First, the data to be tracked is passed to the retargeting API object using various "Set" methods, and then transmitted asynchronously to us in the background using a "Track" method.

...
api.setAccount(1234)
   .setProduct(["ABC123", "DEF456"])
   .trackProductList();

...
api.setAccount(1234)
   .setProduct(["ABC123", "DEF456"])
   .trackProductList();

...
api.setAccount(1234)
   .setProduct(["ABC123", "DEF456"])
   .trackProductList();


Available "Set" Methods

Method

Description

Example

setAccount

Sets your unique account ID.

Note: Working examples for your account ID can also be viewed on the "Tools" > "Retargeting Tracking" page in the Advertiser Frontend. 


api.setAccount(1234)
api.setAccount(1234)
api.setAccount(1234)

setEmail

Sets the unique email address of the user. 

Note: The submitted email address is anonymised by us using the MD5 algorithm.


api.setEmail("info@adup-tech.com")
api.setEmail("info@adup-tech.com")
api.setEmail("info@adup-tech.com")

setHashedEmail

Sets the already anonymised unique email address of the user.


api.setHashedEmail("f3ada405ce890b6f8204094deb12d8a8")
api.setHashedEmail("f3ada405ce890b6f8204094deb12d8a8")
api.setHashedEmail("f3ada405ce890b6f8204094deb12d8a8")

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 then used as segmentation filters and/or placeholders in ad copy.

The desired values are passed in the form of a JSON object.


api.setSearch({
    checkinDate: "YYYY-MM-DD",
    checkoutDate: "YYYY-MM-DD",
    adults: 2,
    children: 1,
    rooms

api.setSearch({
    checkinDate: "YYYY-MM-DD",
    checkoutDate: "YYYY-MM-DD",
    adults: 2,
    children: 1,
    rooms

api.setSearch({
    checkinDate: "YYYY-MM-DD",
    checkoutDate: "YYYY-MM-DD",
    adults: 2,
    children: 1,
    rooms

setTransaction

Sets transaction information (e.g. order number).

Either the transaction ID directly as a string or a JSON object with advanced information can be passed here.


// String
api.setTransaction("TRANSACTION-ID")
 
// JSON-Objekt
api.setTransaction({
    id: "TRANSACTION-ID",
    newCustomer: true
})
// String
api.setTransaction("TRANSACTION-ID")
 
// JSON-Objekt
api.setTransaction({
    id: "TRANSACTION-ID",
    newCustomer: true
})
// String
api.setTransaction("TRANSACTION-ID")
 
// JSON-Objekt
api.setTransaction({
    id: "TRANSACTION-ID",
    newCustomer: true
})

setProduct

Depending on the depth of the page, information about one or several products is set here. 

Either the product ID directly as a string or an array of several strings, or a JSON object or an array of several JSON objects with advanced information can be passed here.

Note: The product IDs passed here should exactly match those in your product feed!


// String
api.setProduct("ID1")
 
// Array von Strings
api.setProduct(["ID1", "ID2", "ID3"])
 
// JSON-Objekt
api.setProduct({
    id: "ID1",
    price: 1.99
    quantity: 2
})
 
// Array von JSON-Objekten
api.setProduct([
    {id: "ID1", price: 1.99, quantity: 5},
    {id: "ID2", price: 3.99, quantity: 2},
    {id: "ID3", price: 9.99, quantity: 1}
])
// String
api.setProduct("ID1")
 
// Array von Strings
api.setProduct(["ID1", "ID2", "ID3"])
 
// JSON-Objekt
api.setProduct({
    id: "ID1",
    price: 1.99
    quantity: 2
})
 
// Array von JSON-Objekten
api.setProduct([
    {id: "ID1", price: 1.99, quantity: 5},
    {id: "ID2", price: 3.99, quantity: 2},
    {id: "ID3", price: 9.99, quantity: 1}
])
// String
api.setProduct("ID1")
 
// Array von Strings
api.setProduct(["ID1", "ID2", "ID3"])
 
// JSON-Objekt
api.setProduct({
    id: "ID1",
    price: 1.99
    quantity: 2
})
 
// Array von JSON-Objekten
api.setProduct([
    {id: "ID1", price: 1.99, quantity: 5},
    {id: "ID2", price: 3.99, quantity: 2},
    {id: "ID3", price: 9.99, quantity: 1}
])

setMobile
setTablet
setDesktop

Sets the device type of the current website.

Note: By default, the device type is automatically determined by us based on the user agent.


// Mobile
api.setMobile()
 
// Tablet
api.setTablet()
 
// Desktop
api.setDesktop()
// Mobile
api.setMobile()
 
// Tablet
api.setTablet()
 
// Desktop
api.setDesktop()
// Mobile
api.setMobile()
 
// Tablet
api.setTablet()
 
// Desktop
api.setDesktop()

setDemarkUser

Demarkets the current user. 

This means that the user is no longer retargeted for the campaign (e.g. after a purchase or booking). 

Note: By default, users are not demarketed after a trackSale() and thus continue to be retargeted.


api.setDemarkUser()
api.setDemarkUser()
api.setDemarkUser()

setDemarkProducts

Demarkets the products passed via setProduct() for the current user. 

This means that the user is no longer retargeted for the said products of the campaign (e.g. after a purchase or booking). 

Note: By default, products are not demarketed after a trackSale() and thus continue to be retargeted.


api.setDemarkProducts()
api.setDemarkProducts()
api.setDemarkProducts()

setConversionCode

Tracks a conversion (e.g. after a purchase or booking).

The method must be called with an already created Conversion Code. The conversion is automatically extended by the order number set via setTransaction() and the product information set via setProduct().

Note: By default, no conversion is tracked after a trackSale().


api.setConversionCode("CONVERSION-CODE")
api.setConversionCode("CONVERSION-CODE")
api.setConversionCode("CONVERSION-CODE")

setGdpr

Normally, we automatically determine the required GDPR data via the TCF API integrated on the website.

If this is not present, or if it is not possible to use it for technical reasons, you have the option to pass the GDPR data manually here.

The values are passed 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)


api.setGdpr({
    gdpr: true,
    gdpr_consent: "CONSENT-STRING"

api.setGdpr({
    gdpr: true,
    gdpr_consent: "CONSENT-STRING"

api.setGdpr({
    gdpr: true,
    gdpr_consent: "CONSENT-STRING"


Available "Track" Methods

Method

Description

Example

trackHomepage

Must be used on your start page/homepage. No further product information needs to be passed via setProduct() here.


api.trackHomepage()
api.trackHomepage()
api.trackHomepage()

trackProductList

Must be used on pages where products are listed and/or search results are displayed.

Here, the IDs of the first 3 products should be passed via setProduct(). 


api.trackProductList()
api.trackProductList()
api.trackProductList()

trackProductPage

Must be used on all product detail pages.

Here, the ID of the displayed product should be passed via setProduct().


api.trackProductPage()
api.trackProductPage()
api.trackProductPage()

trackBasket

Must be used on all basket or order overview pages.

Here, the ID, individual price, and quantity of the products in the basket should be passed via setProduct().


api.trackBasket()
api.trackBasket()
api.trackBasket()

trackSale

Must be used on all order or booking confirmation pages.

Here, the ID, individual price, and quantity of the ordered products should be passed via setProduct().

In addition, the unique order number can be transmitted via setTransaction() and, optionally, a conversion can be tracked via setConversionCode().

Using setDemarkUser() or setDemarkProducts() you also have the option to demarket users or products here.


api.trackSale()
api.trackSale()
api.trackSale()


Retargeting Tracking Examples

The following examples serve as a template only and must be further adapted or expanded by you. Also, ensure that the product IDs passed via tracking pixel exactly match those in your product feed.  Further examples with your actual account ID can be viewed on the "Tools" > "Retargeting Tracking" page in the Advertiser Frontend.


Start Page / Homepage

...
<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 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 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();
    };
<


Results List or Category Page

...
<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 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 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();
    };
<


Product or Detail Page

...
<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 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 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();
    };
<


Basket or Order Overview

...
<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 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 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();
    };
<


Booking Completion or Order Confirmation

...
<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 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 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();
    };
<