Manual Client-Side Integration

How does it work?

When a user clicks on one of your products on moebel.de, meubles.fr, meubelo.nl, moebel24.at, moebel24.ch, mobi24.es, mobi24.it, living24.pl or living24.uk, our server generates a unique clickID (moeclid) which is appended as a query parameter to your landing page URL. With the integration of our client-side script, the clickID is written into the local storage for 90 days. Our server does not receive any sales data from you unless the user converts.

If the user makes a purchase on your site and has an existing moeclid value in the local storage of the browser, a conversion event is sent to our server including the clickID and further purchase-related data.

Prerequisites

Before you proceed with this integration, make sure the following conditions are met:

  • You have received your Partner ID or dedicated Sales Tracking Key.

  • You have told your account manager whether you report gross values (including tax) or net values, so that we can handle the tax correctly.

Integration

The client-side sales tracking consists of two main <script> tags - the initialization script and the push script.

1. Initialization Script

The initialization script needs to be inserted on any page where the user directly lands after clicking on a product on one of our portals. The script writes the appended moeclid parameter value of the landing page URL into the local storage of the browser.

Portal Initialization Script

moebel.de

<script src="https://www.moebel.de/partner/initialize.js"></script>

meubles.fr

<script src="https://www.meubles.fr/partner/initialize.js"></script>

meubelo.nl

<script src="https://www.meubelo.nl/partner/initialize.js"></script>

moebel24.at

<script src="https://www.moebel24.at/partner/initialize.js"></script>

moebel24.ch

<script src="https://www.moebel24.ch/partner/initialize.js"></script>

mobi24.es

<script src="https://www.mobi24.es/partner/initialize.js"></script>

mobi24.it

<script src="https://www.mobi24.it/partner/initialize.js"></script>

living24.pl

<script src="https://www.living24.pl/partner/initialize.js"></script>

living24.uk

<script src="https://www.living24.uk/partner/initialize.js"></script>

Example: Initialization script on the landing page

The initialization script can be placed in the head tag or at the bottom of the body tag of the page, where the user lands after clicking on a product on one of our portals.

Example 1. Head
<html>
    <head>
        <title>initialize script in head tag</title>
        <script src="https://www.moebel.de/partner/initialize.js"></script>
    </head>
    <body>
    ...
    </body>
</html>
Example 2. Body
<html>
    <head>
        <title>initialize script at the end of body tag</title>
    </head>
    <body>
      <div>A lot of content here</div>
      ...
      <div>A lot of content here</div>
      <script src="https://www.moebel.de/partner/initialize.js"></script>
    </body>
</html>
Since local storage cannot be shared across domains/subdomains, saving the clickID (moeclid) to use at checkout will not work if the actual checkout page is on a different domain/subdomain than the product page the user was sent from us.

2. Push Script

This script exposes a JavaScript API that shall be used to submit sales data. It should be placed on the checkout page and the API call should be made after the checkout is completed. Please note that you will need to enter your Partner ID or dedicated Sales Tracking Key exactly as provided by your account manager.

Portal Push Script

moebel.de

<script src="https://www.moebel.de/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="de"></script>

meubles.fr

<script src="https://www.meubles.fr/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="fr"></script>

meubelo.nl

<script src="https://www.meubelo.nl/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="nl"></script>

moebel24.at

<script src="https://www.moebel24.at/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="at"></script>

moebel24.ch

<script src="https://www.moebel24.ch/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="ch"></script>

mobi24.es

<script src="https://www.mobi24.es/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="es"></script>

mobi24.it

<script src="https://www.mobi24.it/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="it"></script>

living24.pl

<script src="https://www.living24.pl/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="pl"></script>

living24.uk

<script src="https://www.living24.uk/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="gb"></script>

When properly included, this script exposes a global MOEBEL_SALES object that allows the use of API functions. If the data-partner-key attribute is missing or empty, the API is not exposed.

If there is no clickID from the initialization script in the browser’s local storage, calling the sale function will do nothing. In addition, the script removes outdated clickIDs (older than 90 days) from the local cache.

The data-market attribute decides which of our markets the sale is reported to. Set it to the market of the portal your visitor came from. It is this attribute that selects the endpoint, so please set it explicitly even though you load the script from your portal’s domain.

If you are active in several of our markets, enter both attributes as comma-separated lists:

<script src="https://www.moebel.de/partner/push.js" data-partner-key="YOUR-FIRST-KEY,YOUR-SECOND-KEY" data-market="de,at"></script>

The sale is then reported to every market you list. Each key is sent to each listed market, so two keys and two markets result in four requests. Our system assigns the sale to the partner account the click belongs to; unmatched combinations are recorded as not assignable.

3. JavaScript API

The JavaScript API is exposed through the push script on the global scope and is accessible through the properties of the global object MOEBEL_SALES.

Sale Function

The sale function is used to report sales for product(s). It reports sales only if the user came to your site by clicking on one of your products on one of our portals within the last 90 days.

Type signature
MOEBEL_SALES.sale(object: SaleObject)


SaleObject {
  total: Number, required (examples: 1 1.0 10.12)
  shipping: Number, required (examples: 1 1.0 10.12) OR String (examples: "100.00")
  currency: String, optional (missing currency assumes "EUR", examples: "EUR", "CHF", "USD")
  orderId: String, optional (examples: "e04cc718-85bf-11ed-a1eb-0242ac120002") OR Number (examples: 123)
  items: Array of Item, required, must not be empty ([{ITEM}, {ITEM}.... ], see description below)
};

Item {
  id: String, required (examples: "113b4c3c-85c0-11ed-a1eb-0242ac120002") OR Number (examples: 123)
  ALIAS item_id (can be used instead of `id` field)
  quantity: Number, Integer, required (examples: 1)
  price: Number, required (examples: 33, 33.33) OR String (examples "100.00")
  category: String, optional (examples: "Sofas" "Baumarkt")
  ALIAS item_category (can be used instead of `category` field)
}
Usage Example
MOEBEL_SALES.sale({
  total: 100.00, // Can be float or integer
  shipping: 10, // Can be float or integer
  currency: "CHF", // Optional, default: EUR
  orderId: "123", // Optional
  items: [{
    id: "123",
    quantity: 1, // Must be a whole number
    price: 60,
    category: "Moebel"
  },{
    item_id: "456",
    quantity: 1, // Must be a whole number
    price: 40,
    item_category: "Moebel"
  }]
});
Example of Push Script and API Call on Purchase Completion
<html>
    <head>
        <title>push script at the end of body tag with instant API call</title>
    </head>
    <body>
      <div>A lot of content here</div>
      ...
      <div>A lot of content here</div>
      <script src="https://www.moebel.de/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE" data-market="de"></script>
      <script>
        window.MOEBEL_SALES && MOEBEL_SALES.sale({
                    total: 100,
                    shipping: 0,
                    items: [
                        {
                            id: "test",
                            quantity: 1,
                            price: 100,
                            category: "testcategory",
                        },
                    ],
                });
      </script>
    </body>
</html>

An additional description of all parameters can be found here:

Parameter Description Mandatory Field Data Type Example Comment

total

total basket value, without shipping costs, gross or net as agreed with your account manager

yes

float

1499.97

2 digits, "." as decimal delimiter, no thousand delimiters

shipping

shipping costs

yes

float

29.99

2 digits, "." as decimal delimiter, no thousand delimiters

currency

currency of the amounts

no

string

EUR

ISO 4217 code of the currency your amounts are in; EUR when omitted, so always set it if your prices are not in euros

orderId

your identifier for the order

no

string

1172210481407

recommended, unique per order

items

array of unique items

- item_id: (string), alternatively: id: (string)

- quantity: (integer)

- price: (float)

- item_category: (string), alternatively: category: (string)

yes

array

[{ "item_id": "47886359", "quantity": 1, "price": 899.99, "item_category": "Boxspringbetten" }, { "item_id": "31118801", "quantity": 2, "price": 299.99, "item_category": "Heimtextilien" }]