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-encrypted layer script:
<script> var $A1Config = { webtagId: "bear.token", // Past your generated token from postman authentication request. tenantId: 999, // Example set the static tenant ID. host: "//url.endpoint.com" // Set the service endpoint URL accordding 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 priority to 20.
- Set Tag firing options to Once per page.
- In Tag Sequencing:
- Select the Fire a tag before CDP - Global fires checkbox.
- In Setup Tag, select CDP - Customer Object so that the tag fires right before the CDP - Customer Object tag.
- Click Triggering and set the triggering process to fire the tag at All Pages as Page View.
- 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:
- Set Tag firing priority to 10.
- Set Tag firing options to Once per page.
- In Tag Sequencing:
- Select the Fire a tag before CDP - Global fires checkbox.
- In Setup Tag, select the following tags so that the tag fires right before these tags:
- CDP - Login
- CDP - Logout
- CDP - PDP
- CDP - PDP - Add to Cart
- CDP - PLP
- CDP - PLP - Add to Cart
- CDP - Search
- CDP - Checkout
- Click Triggering and set the triggering process to fire the tag at All Page Views - Window Loaded as Window Loaded.
- Click Save.