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, or mobi24.es, our server generates a unique clickID (moeclid) which is appended as a query parameter to your landingpage URL. With the integration of our client-side script, the clickID is written into the local storage for 90 days. Our server does not get any requests 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.

Integration

The client-side salestracking 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 our portal. The script writes the appended moeclid parameter value of the landing page URL into the local storage of the browser.

Initialization Script per Portal

moebel.de Partners

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

meubles.fr Partners

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

meubelo.nl Partners

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

moebel24.at Partners

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

moebel24.ch Partners

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

mobi24.es Partners

<script src="https://www.mobi24.es/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 our portal.

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 (provided by your account manager).

Push Script per Portal

moebel.de Partners

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

meubles.fr Partners

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

meubelo.nl Partners

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

moebel24.at Partners

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

moebel24.ch Partners

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

mobi24.es Partners

<script src="https://www.mobi24.es/partner/push.js" data-partner-key="INSERT-YOUR-KEY-HERE"></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 sales function will do nothing. In addition, the script removes outdated clickIDs (older than 90 days) from the local cache.

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 our portal 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 bellow)
};

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, // Important: It is an integer, therefore 1 and not 1.0
    price: 60,
    category: "Moebel"
  },{
    item_id: "456",
    quantity: 1,// Important: It is an integer, therefore 1 and not 1.0
    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_PARTNER_KEY_HERE"></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

gross total basket value, without shipping costs and tax

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

yes

string

EUR

DIN Norm

orderId

your identifier for the order

no

string

1172210481407

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" }]