How to create a custom pixel for Google Tag Manager in Shopify

Follow the steps below to create a custom pixel for Google Tag Manager

  1. Log in to https://admin.shopify.com
  2. Click "Settings"
    Add Custom Pixel to Shopify Settings with ProfitMetrics - GA4 - Step 2
  3. Click "Customer Events"
    Add Custom Pixel to Shopify Settings with ProfitMetrics - GA4 - Step 3
  4. Click "Add custom pixel"
    Add Custom Pixel to Shopify Settings with ProfitMetrics - GA4 - Step 4
  5. Name the custom pixel "PM - Google Tag Manager" and click "Add pixel"
    Add Custom Pixel to Shopify Settings with ProfitMetrics - GA4 - Step 7
  6. Click "Permissions" and select your preferred permission set.
    CAUTION: Choosing the correct "Permission" and "Data Sale" settings is ultimately your responsibility. Please consult a lawyer or legal expert.

    By default, the pixel will only fire when Marketing and Statistics consent is granted. Please ensure your Cookie Banner and Shopify Consent API are connected properly in order for consent to be registered. 

    Some countries allow the use of "basic statistic tracking" without consent. This requires that all Marketing related settings and options in Google Analytics 4 are disabled. If this relevant to you, you can opt for the "Not required" option under "Permissions" and "Data collection does not qualify as data sale" under "Data Sale. "
  7. Click "Permission"

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

  8. Select "Not required"

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

  9. Click "Data sale"

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

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

    Set Up Custom Pixel for Customer Events in Shopify - Step 11
  11. Delete all default text then copy the Pixel code from the 'Open Script Setup Guide' button  in ProfitMetrics Google Analytics connection and paste the code into the Code field

    Temporary code
    code

     



    Edit Shopify Pixel Settings and Clear Text. - Step 5

  12. Click "Save."
  13. Click "Connect" and then "Connect" again.
    Add Custom Pixel to Shopify Settings with ProfitMetrics - GA4 - Step 30
    Add Custom Pixel to Shopify Settings with ProfitMetrics - GA4 - Step 35

All done. The Custom Pixel will now track all e-commerce events except Purchase which is handled by ProfitMetrics.