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: Install the Tag from the template gallery

Part 2: Configure the tag


Part 1: Install the Tag from the template gallery

  1. Go to https://tagmanager.google.com/
  2. Click Tags
    Add ProfitMetrics Server-Side Hybrid Universal Tag to Workspace - Step 2
  3. Click New
    Add ProfitMetrics Server-Side Hybrid Universal Tag to Workspace - Step 5
  4. Click "Tag Configuration"Add ProfitMetrics Server-Side Hybrid Universal Tag to Workspace - Step 6
  5. Click "Discover more tag types in the Community Template GalleryAdd ProfitMetrics Server-Side Hybrid Universal Tag to Workspace - Step 7
  6. Search for "ProfitMetrics" and click "ProfitMetrics - Serverside Hybrid Universal Integration - Script"Add ProfitMetrics Server-Side Hybrid Universal Tag to Workspace - Step 16
  7. Click "Add to workspace"Add ProfitMetrics Server-Side Hybrid Universal Tag to Workspace - Step 17
  8. Click "Add"
    Add ProfitMetrics Server-Side Hybrid Universal Tag to Workspace - Step 18

Part 2: Configure the tag

  1. In the "Public ID" field, input the 16 character Public ID found in ProfitMetrics > Websites
    Add ProfitMetrics Server-Side Hybrid Universal Tag to Workspace - Step 44
  2. 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/ to easily click and get the CSS selector of any input field containing the users email.

  3. In the "Customer Email" field, insert a variable containing the customer's email. You essentially have 3 options based on the data available to you. If you do not have such a variable, you might need to consult your developer. We have outlined the three most common scenarios below
    1. Use an existing variable if you already have one for the customer's email.
      Create Tag Management Variable for Email Field in Google Tag Manager - Step 11
    2. Create a new Data Layer variable if the customer's email is available in the Data Layer.
      Step-by-Step Guide_ Creating a Custom JavaScript Variable in Google Tag Manager - Step 37
      c - Create a DOM Element variable if the customer email is visible on the order confirmation page and can be identified using a CSS selector.
      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's email

      NOTE: you might need to involve a developer if the customer email is not available anywhere.
  4. 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 wish to ignore consent completely, select "Deactivate". The script will automatically respect Cookiebot.com and Cookieinformation.com
  5. Click "Triggering"
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 7-1
  6. Select "DOM Ready" to make the script fire once all pages are loaded.
    Screenshot 2024-06-19 at 9.34.04 AM
  7. OPTIONAL: Add another trigger for "consent update", "cookie update" or any other event related to the client's cookie consent banner updating consent.

  8. Click Save
    Creating a Custom Trigger for ProfitMetrics - Serverside Hybrid Universal Integration - Step 57
  9. 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