Overview
When deploying via tag manager:- High priority execution - Permutive should load before ad tags
- Data layer integration - Pass page properties from your data layer
- Consistent deployment - Use variables for credentials and properties
Google Tag Manager
Step 1: Create Permutive SDK Tag
- Go to Tags > New
- Click Tag Configuration > Custom HTML
- Name it “Permutive SDK”
- Add the SDK code:
Step 2: Create Credential Variables
- Go to Variables > User-Defined Variables > New
- Create a Constant variable for API Key:
- Name:
Permutive API Key - Value: Your API key
- Name:
- Create a Constant variable for Workspace ID:
- Name:
Permutive Workspace ID - Value: Your workspace ID
- Name:
Step 3: Set Up Trigger
- Under the tag, click Triggering
- Select All Pages trigger
- Click Advanced Settings > Tag Firing Options
- Set Tag firing priority to
9999(highest priority)
Step 4: Create Web Addon Tag
- Create another Custom HTML tag named “Permutive Web Addon”
- Add the web addon code:
- Set trigger to All Pages
- Set Tag Sequencing to fire after “Permutive SDK” tag
Step 5: Create Data Layer Variables
Create variables to read from your data layer:-
Page Type (Data Layer Variable)
- Variable Name:
page.type
- Variable Name:
-
Page Title (Data Layer Variable)
- Variable Name:
page.title - Or use built-in
{{Page Title}}
- Variable Name:
-
Page Categories (Custom JavaScript Variable)
Step 6: Data Layer Setup
On your website, push data to the data layer before GTM loads:Complete GTM Example
Tag 1: Permutive SDK- Trigger: All Pages
- Priority: 9999
- Trigger: All Pages
- Tag Sequencing: After “Permutive SDK”
Tealium
Step 1: Create JavaScript Code Extension
- Go to Extensions > Add Extension
- Select JavaScript Code
- Set Scope to Pre Loader (runs before all tags)
- Add the SDK code:
Step 2: Set Up Data Layer Variables
In Tealium, map your data layer to variables:permutive_api_key→ Your public API keypermutive_workspace_id→ Your workspace IDpermutive_organization_id→ Your organization IDpage_type→ Page typepage_title→ Page titlepage_categories→ Categories array
Step 3: Create Web Addon Extension
Add another JavaScript Code extension with All Tags scope:Step 4: Configure Execution Order
- Set the SDK loader extension order to 1 (first)
- Set the web addon extension order to 2 (second)
Adobe Launch
Step 1: Create Core Extension Action
- Go to Rules > Add Rule
- Name it “Permutive SDK”
- Under Events, add:
- Extension: Core
- Event Type: Library Loaded (Page Top)
Step 2: Add SDK Action
- Under Actions, click Add
- Select:
- Extension: Core
- Action Type: Custom Code
- Language: JavaScript
- Check Execute globally
- Add the SDK code:
Step 3: Create Data Elements
- Go to Data Elements > Add Data Element
- Create these data elements:
Permutive API Key(Constant)Permutive Workspace ID(Constant)Permutive Organization ID(Constant)Page Type(JavaScript Variable or Custom Code)Page Categories(JavaScript Variable or Custom Code)
Step 4: Create Web Addon Rule
- Create a new rule “Permutive Web Addon”
- Event: DOM Ready
- Add Custom Code action:
Step 5: Set Rule Order
- Set “Permutive SDK” rule order to 1
- Set “Permutive Web Addon” rule order to 10
Data Layer Best Practices
Standardize Your Data Layer
Use consistent property names across your site:Handle Identity in Tag Manager
Troubleshooting Tag Manager Deployments
Tags firing in wrong order
Tags firing in wrong order
Variables not resolving
Variables not resolving
Problem: Data layer variables return undefined.Solutions:
- Verify data layer is populated before GTM loads
- Check variable names match exactly
- Use default values:
{{Variable}} || 'default' - Debug with GTM Preview mode
SDK not loading consistently
SDK not loading consistently
Problem: SDK sometimes loads, sometimes doesn’t.Solutions:
- Check trigger conditions
- Verify no JavaScript errors blocking execution
- Ensure async script loading works in your environment
- Test with tag manager debug/preview mode
Consent not working with tag manager
Consent not working with tag manager
Problem: Events not tracking with consent management.Solution: Create a consent tag that fires before web addon:Then use tag sequencing to fire web addon after consent.
Best Practices
Use Variables for Credentials
Use Variables for Credentials
Never hardcode credentials directly in tags. Use tag manager variables for easy updates across environments.
Test in Preview/Debug Mode
Test in Preview/Debug Mode
Always test tag firing order and variable values in the tag manager’s preview mode before publishing.
Document Your Setup
Document Your Setup
Keep notes on:
- Tag names and purposes
- Variable mappings
- Data layer requirements
- Firing order dependencies
Version Control
Version Control
Use tag manager’s versioning features and maintain a changelog of deployments.