How to install Shopify Custom Pixel for the ProfitMetrics tracking script and the Conversion Booster

In this article, you will guided on how to remove the PM tracking script and Conversion Booster snippets from 'Additional scripts' in Shopify, and thereafter in how to add these as custom pixels


Part 1: Create a custom pixel for "PM - Script"

Part 1: Remove the existing Conversion Booster Snippet in the Shopify checkout (IMPORTANT)

Part 3: Create a custom pixel for "PM - Conversion Booster Script"

Part 1: Create a custom pixel "PM - Script"

  1. Click "Settings"

    Google Chrome, Mail, and Brave Browser Workflow - Step 1-1

  2. Click "Customer events"

    Set Up Custom Pixel for Customer Events in Shopify - Step 3


  3. Click "Add custom pixel"

    Set Up Custom Pixel for Customer Events in Shopify - Step 4


  4. Click the "Pixel name" field and type "PM - Script"

    Set Up Custom Pixel for Customer Events in Shopify - Step 7

  5. Click "Add pixel"

    Set Up Custom Pixel for Customer Events in Shopify - Step 7 (1)

  6. Click "Permission"

    Set Up Custom Pixel for Customer Events in Shopify - Step 8

  7. Select "Not required"

    Set Up Custom Pixel for Customer Events in Shopify - Step 9

  8. Click "Data sale"

    Set Up Custom Pixel for Customer Events in Shopify - Step 10

  9. Select "Data collected does not qualify as data sale"

    Set Up Custom Pixel for Customer Events in Shopify - Step 11

  10. Copy this script

    analytics.subscribe("checkout_completed", async (event) => {
      console.log("checkout completed fired");
     // shopify ALWAYS sets the _cmp_a cookie that contains the result of the various consent settings.
     let consentMarketing = true;
     let consentAnalytics = true;


     try {
     const cmp_a = await browser.cookie.get( '_cmp_a' );
     const cookiedecoded = JSON.parse( decodeURIComponent( cmp_a ) );
     consentMarketing = cookiedecoded?.purposes?.m ?? consentMarketing;
    consentAnalytics = cookiedecoded?.purposes?.a ?? consentAnalytics;
     } catch( e ) {
     }


     if( consentMarketing || consentAnalytics ) {
     try {
     var pmShopifyLastOrder = {'orderId': event.data.checkout.order.id, 'ts': new Date / 1E3 | 0};
     browser.sessionStorage.setItem( 'pmShopifyLastOrderId', JSON.stringify( pmShopifyLastOrder ) );
     } catch( e ) {
     }
     }
    });
  11. Remove all existing text in the Code field and paste the script into the Code field

    Set Up Custom Pixel for Customer Events in Shopify - Step 15

  12. Click "Save"

    Set Up Custom Pixel for Customer Events in Shopify - Step 15 (1)

  13. Click "Connect"


    Set Up Custom Pixel for Customer Events in Shopify - Step 16

  14. Click "Connect" again

    Set Up Custom Pixel for Customer Events in Shopify - Step 17

Part 2: Remove the existing Conversion Booster Snippet in the Shopify checkout (IMPORTANT)

NOTE: You may skip this step if you already have Shopify Checkout Extensibility enabled, and additional scripts are fully greyed out.

WARNING: If you have set up Google Ads tracking for ProfitMetrics Conversion Booster via Google Tag Manager, you will need also to delete the Google Ads Conversion Tag for Revenue and Profit before you continue.

Failure to do so will result in double tracking.

  1. Navigate to the Conversion Booster integration and make sure you are on the correct website

  2. Select "Update integration"
  3. Open a new browser tab > log in to your Shopify store, and click "Settings"
    Customizing Shopify Order Status Page with Additional Script - Step 2
  4. Then "Checkout"
    Customizing Shopify Order Status Page with Additional Script - Step 3
  5. Scroll down to "Additional scripts" and delete the existing Conversion Booster snippet. The script might look different depending on when it was installed.
    If the script you find does not match the script below, look for the highlighted line as this will exist in all versions with different numbers.
    <!-- Start ProfitMetrics - Conversion Booster for Google Ads - (v1) -->

    <!-- End ProfitMetrics - Conversion Booster for Google Ads - (v1) -->
  6. Find the code and delete it. Customizing Shopify Order Status Page with Additional Script - Step 7
  7. Click "Save"
    Shopify Workflow - Step 2 (1)
  8. Check "I have removed the script from the website"
    Adjusting Google Ads conversion value integration in ProfitMetrics - Step 3 (1)

  9. Click "Next step"
    Adjusting Google Ads conversion value integration in ProfitMetrics - Step 4

Part 3: Create a custom pixel "PM - Conversion Booster Script"

  1. Click "Copy snippet"

    Adjusting Google Ads conversion value integration in ProfitMetrics - Step 5

  2. I Shopify: Navigate to "Settings" > "Customer events" and click "Add custom pixel"

    Set Up Custom Pixel for Customer Events in Shopify - Step 4

  3. Click the "Pixel name" field and type "PM - Conversion Booster Script"

    Set Up Custom Pixel for Shopify Conversion Tracking - Step 8

  4. Click "Add pixel"

    Set Up Custom Pixel for Shopify Conversion Tracking - Step 8 (1)

  5. Click "Permission"

    Set Up Custom Pixel for Shopify Conversion Tracking - Step 9

  6. Select "Not required"

    Set Up Custom Pixel for Customer Events in Shopify - Step 9

  7. Click "Data sale"

    Set Up Custom Pixel for Customer Events in Shopify - Step 10

  8. Select "Data collected does not qualify as data sale"

    Set Up Custom Pixel for Customer Events in Shopify - Step 11
  9. Remove all existing text in the Code field paste the Conversion Booster snippet into the Code field

    Set Up Custom Pixel for Shopify Conversion Tracking - Step 16

  10. Click "Save"

    Set Up Custom Pixel for Customer Events in Shopify - Step 15 (1)

  11. Click "Connect"


    Set Up Custom Pixel for Shopify Conversion Tracking - Step 18

  12. Click "Connect" again

    Set Up Custom Pixel for Shopify Conversion Tracking - Step 19

  13. That's it. You have now removed the old tracking and ensured compatibility with the new Shopify checkout page.