1. Knowledge base
  2. Dandomain Classic

How to Integrate Dandomain classic with ProfitMetrics

Follow these instructions to integrate DanDomain Classic and import your products automatically to ProfitMetrics


Part 1: DanDomain Classic Integration Setup
Part 2: Install the ProfitMetrics Script
Part 3: Install the setEmail Script


NOTE: If the screens here don't match what you see, confirm whether you are on Dandomain Classic or Dandomain, as the instructions are different. For Dandomain, please follow the instructions in ProfitMetrics Integrations


Part 1: DanDomain Classic Integration Setup

  1. Once you have created your business account and added your first website, click here to start the integration setup for DanDomain Classic.
  2. In a new tab open DanDomain and go to "Indstillinger" -> "Site"

    Find you site ID step 1

  3. Copy the DanDomain site ID from the "ID" column in the overview
    Find you site ID step 2

  4. Add the "DanDomain site ID" in ProfitMetrics

    Profitmetrics Workflow - Step 2-2

  5. To find your API key, go to "Indstillinger" > "Integration" then click "Tilføj ny burger"

    Find you site ID step 2

  6. Enter a name for the user and enable all read rights, then click "Gem"
    (the name of the user can be anything)

    Find you site ID step 2

  7. Copy the API key from Dandomain

    Find you site ID step 2

  8. Add the API key in ProfitMetrics

    Profitmetrics Workflow - Step 3

  9. Click "Create Integration"
    Profitmetrics Workflow - Step 3 (2)

Part 2: Install the ProfitMetrics Scipt

  1. Copy this Snippet and remember to replace both instances of PUBLIC_ID with the Public ID of your website in ProfitMetrics 
    <!-- Start ProfitMetrics - (v1) -->
    <script>
      window.profitMetrics = {
      pid: 'PUBLIC_ID',
      }
    </script>
    <script src="https://cdn1.profitmetrics.io/PUBLIC_ID/bundle.js" defer></script>
    <!-- End ProfitMetrics - (v1) -->
  2. Click "Indstillinger"
    Modify site configuration for ProfitMetrics integration. - Step 2
  3. Click "Site"
    Modify site configuration for ProfitMetrics integration. - Step 3
  4. Click the "Edit/Pencil" icon for the site you want to edit. 
    How to Add ProfitMetrics Script to Baufix Website - Step 4
  5. Insert the script at the bottom of "Kodefelter (head section)"
    Modify site configuration for ProfitMetrics integration. - Step 8
  6. Click "Gem" to save the change
    How to Add ProfitMetrics Script to Baufix Website - Step 28

Part 3: Install the setEmail Script 

  1. Copy this snippet
    <!-- Start ProfitMetrics - setEmail - (v1) -->
    <script>
       function _pm_tryemailorderconfirmation() {
           if (null != window.profitMetrics && null != window.profitMetrics.setEmail && typeof window.profitMetrics.setEmail === 'function') {
               window.profitMetrics.setEmail('[[CUSTOMEREMAIL]]');
             console.log('[[CUSTOMEREMAIL]]');
           } else {
               setTimeout(_pm_tryemailorderconfirmation, 500);
           }
       }
       _pm_tryemailorderconfirmation();
    </script>
    <!-- End ProfitMetrics - setEmail - (v1) -->
  2. Click "Design"
    Modify site configuration for ProfitMetrics integration. - Step 11
  3. Click "Tekster/Knapper"
    Modify site configuration for ProfitMetrics integration. - Step 12
  4. Click "Bestil step 4 (Ordrebekræftelse)
    Modify site configuration for ProfitMetrics integration. - Step 13
  5. Paste the snippet at the bottom of "Kodefelt"
    Modify site configuration for ProfitMetrics integration. - Step 18
  6. Click "Gem"
    Modify site configuration for ProfitMetrics integration. - Step 26

 Part 4: Import Your Product

Our module will automatically generate a product feed containing cost prices and import them into Profitmetrics.

If you don't have cost prices in DanDomain, you can create a separate product feed and set it up according to our specifications. Click here to read our Product Feed Specification.

1. In ProfitMetrics, navigate to "Products" -> "Product Feed"

2. Type "dandomain" in the URL field

Importing a Product Feed in Profit Metrics - Step 2

 

3. Select the fetch interval > click "Save Feed Configuration"

Importing a Product Feed in Profit Metrics - Step 3

 

4. Click "OK"

Importing a Product Feed in Profit Metrics - Step 4

 

5. Click "Import Feed Now"

Importing a Product Feed in Profit Metrics - Step 5

 

6. Click "OK"

Importing a Product Feed in Profit Metrics - Step 6

7. Done ✅