Targetings

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.

...
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 seen on the "Tools" > "Retargeting tracking" page in the advertiser frontend

api.setAccount(1234)
setEmail

Sets the unique email address of the user. 

Note: We anonymise the submitted email address using the MD5 algorithm.

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

Sets the already anonymised unique email address of the user.

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

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: 1
})
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.

// String
api.setTransaction("TRANSACTION-ID")
 
JSON object
api.setTransaction({
    id: "TRANSACTION-ID",
    newCustomer: true
})
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!

String
api.setProduct("ID1")
 
// Array of strings
api.setProduct(["ID1", "ID2", "ID3"])
 
JSON object
api.setProduct({
    id: "ID1",
    price: 1.99
    quantity: 2
})
 
array of JSON objects
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, we automatically determine the device type based on the user agent.

// Mobile
api.setMobile()
 
// Tablet
api.setTablet()
 
Desktop
api.setDesktop()
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.

api.setDemarkUser()
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.

api.setDemarkProducts()
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().

api.setConversionCode("CONVERSION-CODE")
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)

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

Available "Track" methods

Method Description Example
The Retargeting Pixel

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

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()
trackProductPage

Must be used on all product detail pages.

The ID of the displayed product should be passed here via setProduct().

api.trackProductPage()
trackBasket

Must be used on all shopping cart or order overview pages.

Here the ID, the unit price and the number of products in the shopping basket should be transferred via setProduct().

api.trackBasket()
trackSale

Must be used on all order or booking confirmation pages.

The ID, the unit price and the number of products in the order should be transferred here via setProduct().

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

By means of setDemarkUser() or setDemarkProducts() you also have the possibility to demark users or products.

api.trackSale()

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.

Homepage / 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>
...

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>
...

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>
...

Shopping cart 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>
...

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>
...