This page provides instructions to configure WebTag 2.0 using Google Tag Manager (GTM).
Use the following checklist to configure WebTag:
S.No. | Task | Description |
---|---|---|
1 | Configure the Acquia Global tag (WebTag 2.0) | CDP - Global is a default essential tag for GTM. |
3 | Configure the Acquia Customer Object tag | CDP - Customer Object is a default essential tag for GTM. |
4 | Configure optional tags | The following are the default primary tags for GTM: |
Configuring the Acquia Global tag (WebTag 2.0)
- In the GTM user interface, click Tags > New.
- Name the tag as CDP - Global.
- Click Tag Configuration.
- In Choose tag type, click Custom HTML.
In HTML, create the Acquia Global tag script:
<script> var $A1Config = { webtagId: "your-webtag-id", // Paste your webtagId value provided by Acquia. tenantId: 999, // Example set the static tenant ID. host: "//url.endpoint.com" // Set the service endpoint URL according to your hosted environment and cloud region. }; </script> <script src="https://scripts.agilone.com/latest/acquia-cdp-webtag.js"></script>
- In Advanced Settings, set Tag firing options to Once per page.
Click Triggering and set the triggering process to fire the tag at Initialization - All Pages.
If you are using Google Tag Manager consent mode support, you must select the Consent Initialization - All Pages option.
- Click Save.
Configuring the Acquia Customer Object tag
- In the GTM user interface, click Tags > New.
- Name the tag as CDP - Customer Object.
- Click Tag Configuration.
- In Choose tag type, click Custom HTML.
In HTML, create the Acquia Customer Object script:
<script> var visitor = {"id" : "{{GA - ClientID}}"}; if ("{{GA - Data Layer - User Email}}" != "unknown") { visitor.email = "{{GA - Data Layer - User Email}}"; } var $a1vis = $A1.Customer(visitor); </script>
- In Advanced Settings > Tag Sequencing, do the following:
- Check the Fire a tag before CDP - Customer Object fires checkbox.
- In Setup Tag, select CDP - Global.
- Click Triggering and set the triggering process to fire the tag at All Page - Page View.
- Click Save.