How to set up Universal Client-Side Integration through Google Tag Manager
Follow the steps below to integrate ProfitMetrics Universal Integration through Google Tag Manager
NOTE: You will need your Public ID, we recommend recording it from here in advance
Create the "All pages" tag
- Navigate to https://tagmanager.google.com to select your account and container
- Click Tags
- Click New
- Click Tag Configuration
- Click Discover more tag types in the Community Template Gallery
- Search for "ProfitMetrics"
- Click PM Client-side Integration - All pages
-
Click "Add to workspace"
-
Click "Add"
- Paste the Public ID found in ProfitMetrics > Websites
- Leave "Consent Control" set to Google Consent Mode (Recommended) OR change it based on your preferences.
-
Click"Triggering"
-
Click "DOM Ready". You can also choose a custom event specific to your Cookie Consent Banner to ensure the tag fires AFTER consent has been updated.
- Click "Save"
-
Click "Save"
Create the "Purchase" tag
- Click Tags
- Click New
- Click Tag Configuration
- Click Discover more tag types in the Community Template Gallery
- Search for "ProfitMetrics"
- Click PM Client-side Integration - Purchase
-
Click Add to workspace
-
Click Add
- Paste the Public ID found in ProfitMetrics > Websites
- Leave "Select dataLyaer type for quick setup" set to Auto (Recommended) OR change it based on the structure of you dataLayer implementation. You can also choose Custom for manual configuration.
-
Go through the list of "Additional fields" and insert variables for email, phone, payment method, shipping method, shipping country, Shipping zipcode and Shipping weight. If you do not have variables for these, ProfitMetrics will be limited to work with the values you have provided. Email is necessary for Enhanced Conversions in Google Ads.
-
Click Triggering
- Select the "Purchase" event OR any other event that fires ONLY ONCE on the order confirmation page AFTER consent has been updated.
- Click "Save"
-
Click "Save"
Create document.cookie variable
- Click on "Variables", then click "New"
-
Click the block to select the variable type.
-
Click "JavaScript Variable."
-
Click the text box for Global Variable Name
-
Type "document.cookie"
-
Copy/Paste the name "document.cookie" from the Global Variable name to the variable name at the top left
- Click "Save"
Once those changes are completed, your basic setup should be complete!
Verify changes by publishing and waiting for an order, or by placing a test order in preview (knowledge base article pending)