1. Knowledge base
  2. Dandomain Classic

Dandomain Classic - How to insert the ProfitMetrics script

Follow the steps below to insert the ProfitMetrics script in Dandomain Classic


Part 1: Install the ProfitMetrics Script

Part 2: Install the setEmail Script on Bestil step 4 (Ordrebekræftelse)

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: Install the ProfitMetrics Scipt

  1. Copy this Snippet and remember to replace 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 2: Install the setEmail Script on Bestil step 4 (Ordrebekræftelse)

  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