1. Knowledge base
  2. Serverside Hybrid Universal Integration

How to install the Serverside Hybrid Universal Integration script in Google Tag Manager.

Follow the steps below to install the Serverside Hybrid Universal Integration script in Google Tag Manager.

The ProfitMetrics Serverside Hybrid Universal Integration is a universal integration that allows for ProfitMetrics to be implemented into any e-commerce platform that is not supported natively. The integration consists of two parts. Part 1 of the integration refers to the sending of orders to ProfitMetrics according to our documentation. Part 2 is to implement the tracking script to capture statistical and marketing-related tracking parameters from the browser and pair these with the orders. How to install the Serverside Hybrid Universal Integration Tracking script through Google Tag Manager.

Do you want to do it manually?
How to install the Serverside Hybrid Universal Integration script.

See this article if you haven't built your integration with ProfitMetrics yet: Sending orders to profitmetrics serverside


Instructions

Part 1: Download and install the custom tag template

Part 2: Create the "PM - Email" variable

Part 3: Create and configure the Tag

Part 1: Download and install the custom tag template

  1. Click here to Download the custom Tag Template
  2. Navigate to Templates
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 65
  3. Under "Tag Templates" click New
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 67
  4. Click the three-dot menu
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 68
  5. Click Import
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 69
  6. Select the tag template you downloaded in step 1
  7. Check "Agree to Community Template Gallery Terms of Service"
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 76
  8. Click save and then click X to close the window
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 79
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 80


Part 2: Create the "PM - Email" variable

  1. Navigate to Variables
    Step-by-step guide to configuring a Google Tag Manager container - Step 2
  2. Under "User-Defined Variables" Click New
    Step-by-step guide to configuring a Google Tag Manager container - Step 17
  3. Click Variable Configuration
    Step-by-step guide to configuring a Google Tag Manager container - Step 18
  4. Now you have three basic options.
    a - Select Constant if you already have an existing customer email variable.
    Step-by-Step Guide_ Creating a Custom JavaScript Variable in Google Tag Manager - Step 53
    b - Select Data Layer Variable if the customer email is available in the Data Layer.
    Step-by-Step Guide_ Creating a Custom JavaScript Variable in Google Tag Manager - Step 37
    c - Select DOM Element if the customer email is available on the order confirmation page.
    Step-by-Step Guide_ Creating a Custom JavaScript Variable in Google Tag Manager - Step 25
    d - Select any other variable type that can extract the customer email

    NOTE: you might need to involve a developer if the customer email is not available anywhere.
  5. Click Save

Part 3: Create and configure the Tag
  1. Navigate to Tags
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 34
  2. Click New
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 34 (1)
  3. Click Tag Configuration
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 35
  4. Select ProfitMetrics - Serverside Hybrid Universal Integration
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 36
  5. In the "Public ID" field, input the Public ID found in ProfitMetrics > Websites
  6. In the "Email input CSS selector" field, input the CSS selector of all available email input fields on your website. We recommend as many as possible. These can include Checkout, LogIn, Account Signup, Newsletter signup, ect.

    NOTE: If you don't know what a CSS selector is, we recommend using the Chrome extension https://selectorgadget.com/

  7. In the "Customer Email" field, input the 0 variable you just created
  8. The "Consent Control" dropdown, is set by default to listen for Google Consent Mode and set the marketing and statistics consent in ProfitMetrics accordingly. If you need to control consent using your own custom variables, you can select "Custom". If you with to ignore consent completely, select "Deactivate".
  9. Click Triggering
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 7-1
  10. Select All pages to make the script fire on all pages.
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 54
  11. Click Save
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 57
  12. Click Save again to confirm the name of the tag
    Creating a New Tag and Trigger with Google Tag Manager - Step 9

Thats it. You are now ready to publish the changes